Thomas changed the topic of #kspmodding to: Welcome to #kspmodding - the channel for discussing, and learning about, modding Kerbal Space Program. Code of Conduct: https://git.io/vSQh6 | Always provide logs (do !support for help). | *** PSA: https://kerbalspaceprogram.com/api/index.html | <Red5> Guy was asked for a log file, he gave this link: http://pastebin.com/wfVarZPf
<taniwha> good grief
<Virindi> I guess he thinks it is just unavoidable floating point error
<Virindi> I have a different opinion
<Virindi> the orbit is known before going off rails, then he does some application of force, then the orbit should be identical after that even if that means somehow restoring the orbit
<Virindi> I mean the naive answer would be just to store the orbit then restore it the frame after
<soundnfury> Virindi: I blame KSP's 23 different co-ordinate systems, half of which are left-handed, and none of which is a stable, inertial, well-behaved, usable reference.
<Virindi> there would be no "floating point error" if we just restored the same orbit so...
<Virindi> yeah there may be a coordinate system problem not sure
<Virindi> the orbit changing seems to happen more when you have gone around the planet a bit during warp
<soundnfury> basically, modding that touches any of that stuff is just excessively confusing :(
<soundnfury> (that's why konrad has to reconstruct position and velocity vectors from the orbital elements, rather than trusting the ones KSP would give it. Jeb only knows what co-ordinate system those are in.)
<Virindi> I'm not saying it's not confusing, all I'm saying is that even if the physics system is breaking this situation it should be worked around
<Virindi> the end result for the player should be avoiding the problem
<soundnfury> Virindi: sure; I'm just grumbling because I don't have anything more useful to contribute right now
<taniwha> soundnfury: it is not floating point error
<soundnfury> most people with any sense just ignore me, I'm sure of it ;)
<taniwha> it is an integration error by PR
<soundnfury> taniwha: I never said it was‽
<taniwha> ok
<soundnfury> I was just trying to defend the author, on the grounds that Modding Is Hard.
<taniwha> don't
<Qboid> [#19] title: Orbit changes upon exiting timewarp while rotating | The orbit of the vessel changes upon exiting timewarp while rotating. This seems to depend on the distribution of mass of the vessel and the rotation rate.... | https://github.com/MarkusA380/PersistentRotation/issues/19
<taniwha> and KSP does not have 23 coordinate systems, either
<Virindi> should probably read his answer rather than taking my word for it
<soundnfury> taniwha: I *may* have exaggerated slightly for comic effect. It's a vice of mine.
<Virindi> "23" was "2-3"? :P
<Virindi> parent body relative and vessel relative?
<taniwha> KSP does have a few, and they gave NK nightmares, but he got warp/dewarp working
<soundnfury> Virindi: and world, and probably another one I've forgotten
<taniwha> Virindi: fixed and rotating frame
<taniwha> I won't argue about fixing PR being difficult (I'm sure it is), but it is doable
<soundnfury> I just remember seeing some of the Frame code in principia, and how many hoops it has to go through to get vectors into a basis it can use
<taniwha> I imagine principia introduced many of those hoops
<taniwha> also, if you looked before 1.2, then there was the out-by-one-frame issue
<soundnfury> ehh, some of them are things like "A left-handed co-ordinate system? Seriously, KSP? Let's fix that."
* xShadowx is too scared of egg math to read principia code
<soundnfury> xShadowx: an entirely appropriate reaction
<taniwha> xShadowx: s/math//
* Qboid is too scared of egg to read principia code
<xShadowx> that too
<soundnfury> hehe
<Virindi> yeah it doesn't actually move my vessel com, just applies a net force
<Virindi> it's easy to see if you set your vessel spinning then cheat set orbit repeatedly heh
<Virindi> changing those calculations to vector3d changed nothing
<Virindi> I wonder
<Virindi> maybe if I sum the total force then subtract that from the whole vessel
<Virindi> one would think that should be zero
<taniwha> Virindi: attempting to fix PR?
<Virindi> well if the author refuses to entertain the bug report I figure I might as well mess around with it
<taniwha> if so, first check that it's using the correct CoM (getting it from vessel rather than calculating it itself)
<Virindi> maybe to no success
<Virindi> but whatever
<taniwha> also, might be as simple as script execution order
<taniwha> hmm, or maybe even using MFI
<Virindi> yeah I was looking at that and it seems like it should be right
<Virindi> I removed ALL mods but PR
<Virindi> not even modulemanager present
<taniwha> well, to fix, PR might need MFI
<taniwha> (note! I don't actually know!)
<Virindi> what does MFI actually do, I thought it just overwrote aero
<taniwha> no, that's FAR
<Virindi> well yes of course
<taniwha> MFI makes the flight integrator modular so FAR can do its thing
<Virindi> but I mean I thought it had a HOOK to let you overwrite aero.
<taniwha> also other mods
<taniwha> best to talk to Sarbian about its details
<Virindi> I summed up all linear forces applied to the craft on gooffrails and it is not even close to zero
<Virindi> I really think the sum of linear force should be zero? maybe I am wrong?
<Virindi> hmm
<Virindi> if you want to rotate, you push one side and pull the other, but the push and pull has to be equal across the com
<taniwha> Virindi: if you want to induce only rotation, then yes, it must be 0
<Virindi> right so when going off rails PR loops through every part on the vessel and applies 1) torque, and 2) linear force to that part
<Virindi> my reasoning was that if we ignore the source of those calculations, the sum should be zero
<Virindi> for linear force, ignoring torque
<taniwha> torque: obviously the sum must not be 0 (assuming there's rotation to apply)
<Virindi> right
<taniwha> linear: sum must be 0
<taniwha> should see if just not applying linear forces does the trick
<taniwha> (applying torque /anywhere/ to a rigid body is the same as applying it to the CoM)
<Virindi> yeah I am pretty sure this is a logical error in the computation of applied forces.
<taniwha> it's weird and counterintuitive, but true
<Virindi> well right, say you applied torque to the entire vessel magically
<Virindi> that alone should cause parts to start rotating the right way
<taniwha> especially if we temporarily force all joints to be rigid
<taniwha> well, you :)
<Virindi> if I do that the rotation comes out less than it started
<Virindi> but the orbit is completely unchanged
<Virindi> look at that, I just took my vessel into timewarp rotating, it came out rotating, and it has the same orbit
<taniwha> need to adjust the torque to provide the required acceleration for one frame
<Virindi> it's almost like it took me 5 minutes of messing around to disprove the author's claim
<Virindi> :\
<Virindi> yeah uh
<Virindi> hmm
<taniwha> required ω / frametime
<taniwha> er, with I in there somewhere
<taniwha> ωI/frametime, probably
<Virindi> well he is using forcemode.velocitychange
<Virindi> which isn't actually torque
<Virindi> it's just adding rotational velocity.
<taniwha> ok, that makes it easier
<Virindi> I suspect the reason he adds linear force is to deal with nonrigid joints
<taniwha> well, we now have rigid joints :)
<taniwha> (did not prior to 1.2, true)
<xShadowx> so friend behind me is a stock purist, exact words "i only play stock because mods are buggy as shit and nobody fixes them" now brb while i get duct tape to tape his face to the screen to see this channel :)
<Virindi> stock is buggy, mods are buggy, the world is buggy
<Virindi> if he hasn't encountered stock bugs either he doesn't play much and this is all based on assumption, or he has blinders on when he encounters them
<xShadowx> i taped the tablet to his head :D
<xShadowx> so PR is fixed?;o
<Virindi> no
<Virindi> it doesn't come out rotating the same as it went in
<xShadowx> that bug annoys me too ;x heh
<xShadowx> oh
<taniwha> xShadowx: however, it seems that Virindi is hot on the bug's trail and will have its head on a plaque soon enough :)
<Virindi> nah I neglected the fact that that was also a velocitychange for linear
* xShadowx gives Virindi a cookie for the idea
<xShadowx> i just had a thought
<xShadowx> spinning too fast = make kerbal sick
<Virindi> meh kerbals are pros
<Virindi> they spend years in the centrifuge at the ksc
<Virindi> in the basement
<Virindi> hmmm
* taniwha notes kerbals should be able to handle 4x the spin humans can
<xShadowx> taniwha: plaque is if you want to remember em, in this case a pike is more appropriate :P
<taniwha> what with their world spinning 4x as fast
<xShadowx> hmm......
<taniwha> xShadowx: I have the disappearing target encounter node on a plaque
<xShadowx> thats still slow speed though
<taniwha> to remind me to not screw up swap functions :P
<xShadowx> doesnt mean max rpm tolerance would be diff
<taniwha> xShadowx: you sure?
<Virindi> taniwha: the one you want is the "you can't click on your orbit line" bug
<Virindi> THAT one freaking kills me
<Virindi> wait I mean
<Virindi> that bug does not exist
<taniwha> Virindi: I introduced that swap bug in 1.1. thankfully, found it for 1.2
<Virindi> because only mods have bugs.
<Virindi> in 1.2.2 there is still often a situation where your orbit line does not accept clicks and you cannot add a maneuver
<Virindi> often when hyperbolic
<Virindi> or in high orbit
<taniwha> what sort of angle is the orbit to the camera? that's the usual cause
<Virindi> any angle
<Virindi> when this happens I spin the camera all over the place trying to get a click
<taniwha> I'm pretty sure I put a delegate in there for the find click point
<Virindi> ksp has "can't click on this!!!!! PWNT" issues in general
<taniwha> feel free to replace the code }:>
<Virindi> like selection of parts in construction mode
<Virindi> specifically when doing translation
<Virindi> often parts simply won't accept clicks
<Virindi> and yes rotating the camera can help
<taniwha> yeah, raycast issues
<taniwha> for orbits, camera rotation affects accuracy in calculating the point relative to the orbit
<taniwha> and if the calculated point is too far from the mouse pointer, it's rejected
<Virindi> well
<Virindi> dunno
<Virindi> it's not terrible
<Virindi> not being able to add a node is worse :P
<taniwha> might be something else with Unity's canvases. I've had some fun selecting my stations
<taniwha> but I've not encounter node placement issues
<taniwha> unless KSP chooses the wrong vessel's orbit
<taniwha> (maybe because I instinctively adjust the camera view)
<Virindi> most often it's like, in sun orbit on my way to an encounter, or, I'm flying by laythe reaaaaaaaaallllllllllllly fast and I am trying to capture but I don't have the twr
<Virindi> that kind of thing
<Virindi> I figured it was because of high speed
<taniwha> oh, I know what it is
<taniwha> the orbit is too tight to get a good angle
<taniwha> ie, even when the camera angle is ideal, there's no precision in the calculated true anomaly of the mouse click
<taniwha> (at for laythe. such for sun would be tricky)
<Virindi> I will pay more attention and see if I can get a quicksave that always does the same thing when you load it
<taniwha> ie, the velocity vector of the orbit near the mouse is nearly parallel to the radius vector to the mouse
<Virindi> if I ever play
<Virindi> heh
<taniwha> welcome to modding
<Virindi> modding has been more interesting than the prospect of playing
<taniwha> however, I have work to do
<Virindi> :)
<Virindi> yeah net linear momentum is also not zero
<Virindi> so yeah
<Virindi> if he applies a velocity to each part in the direction of rotation the sum of applied m*v should be zero
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
<Virindi> sum of linear m*v is not even close to zero with his code, so I calculated CoM myself over the parts being iterated and it differs by like 20% over the value he was using, now net linear momentum is like 1e-13
<Virindi> 1e-13 does alter the orbit but it is a LOT better
<Virindi> typical values went from like, 1*10^1 to 1*10^-13
<Virindi> 10^-15 at low rotation
<Virindi> NOW it's floating point error.
<taniwha> yes
<Virindi> it is still not insignificant.
<xShadowx> what is this "playing" thing you speak of
<taniwha> Virindi: check your timing
<taniwha> because 1e-13 /is/ insignificant
<Virindi> yes it should be.
<Virindi> it is still acting like there is something else going on
<Virindi> like this is two problems
<taniwha> thus my suggestion to check timing
<Virindi> yeah
<Virindi> wait hold on
stratochief is now known as stratosleep
<Virindi> in the first 20 ticks of being off rails vessel does a smoothing operation
<Virindi> but PR just applies full force instantly
<Virindi> oh maybe it isn't 20 ticks.
<Virindi> oops
<Virindi> nm
<Virindi> I was just thinking of KJR
<Virindi> too sleepy for this I guess :(
NathanKell|AWAY is now known as NathanKell
<Virindi> yeah the actual velocity change in orbital velocity is like 1m/s
<Virindi> that isn't just from 10^-13
* xShadowx lurds
<xShadowx> lurks*
<xShadowx> so if kerbals spinning too fast makes kerbals sick......what effect does sick have?
NathanKell is now known as NathanKell|AFK
<xShadowx> could just have em be dizzy....move camera a bit weird for a few sec but eh
<Virindi> meh
<Virindi> spinning for a short time should add "happy" points
<Virindi> spinning for a long time should penalize "happy" points
<Virindi> just like being crammed into a tiny pod for a long time. or strapped into a seat
<Virindi> kerbals should be "happy" to go on eva, or sit in a rover seat, but after awhile they hate it
<Virindi> I like the "unhappy kerbals refuse to work" idea, nice and realistic
<Virindi> (since that has actually happened)
<Virindi> it feels....not harsh enough though
<Virindi> just throw a probe core on the ship and ignore the problem
riocrokite has joined #kspmodding
<riocrokite> onAwake is called before onStart and onLoad?
<xShadowx> ya
<xShadowx> awake > load > start
<riocrokite> cheers
<taniwha> note that Awake and OnAwake are separate
<taniwha> in PartModule, best to stick to OnAwake as Awake is unity specific and you would have to call base.Awake for the part module to work correctly
<taniwha> also, OnAwake is PartModule specific (relevant for when you get into other things like scenarios or addons)
<riocrokite> yah
<riocrokite> oh man fighting with code is like fighting with blender in the early days... tough
<riocrokite> few things are straightforward
<taniwha> but rewarding
<taniwha> however, for me, it's not code with which I fight (normally), but rather the logic
<riocrokite> well yah both things
<taniwha> code is better than a second language for me
<taniwha> (sometimes, I think it has become my first language)
<taniwha> so instead of thinking "how do I write this code?" I think "what do I want to code to do?"
<riocrokite> man if I solve this particles not showing up problem I'll have to do 'hot invisible' air particles for molten regolith machinery :D
<taniwha> heh
<riocrokite> anyway will need to control particles in runtime depending on the harvester drum speed
<riocrokite> so yah custom code again
<taniwha> I need to rewrite Kethane's particle code :(
<taniwha> (it's using obsolete interfaces)
<riocrokite> just saw open particle emitter probalby used in kethane http://forum.kerbalspaceprogram.com/index.php?/topic/59358-openparticleemitter-kethane-derived-alternate-particles-module/#comment-887196
<riocrokite> for now I managed to export particle emitter to ksp (without animation component) so maybe I can control that component from code then
<taniwha> riocrokite: btw: blender --background -noaudio truss.blend --python-text mass-export.py
<riocrokite> what's the result?
<taniwha> 10 .mu files, and 10 .cfg files generated from matching .cfg.in files :)
<riocrokite> hmmm interesting
<riocrokite> those cfg files are empty?
<taniwha> no, when io_object_mu exports foo.mu, it checks for foo.cfg.in
<taniwha> if it finds one, it reads it in, checks for PART and if found, stuffs in node_* if the source object tree has empties named node_*
<taniwha> then writes the .cfg
<riocrokite> nice
<taniwha> yeah. needed it for my crazy truss parts with their nasty positions and angles
<riocrokite> taniwha btw do you know any mod that implements rotating solar panel or dish in 2 axles?
<taniwha> no, but Kethane does such for its scanner
<riocrokite> ah yeah I remember this part is rotated towards the planet
<riocrokite> yah, will have to look into that later on
<riocrokite> http://i.imgur.com/aHAl6jc.png success
<taniwha> nice
<taniwha> is that using Unity's newer particles interface?
<riocrokite> probably not
<riocrokite> still using 5.2.4f unity
<taniwha> do you get warnings when you compile?
<riocrokite> ksp particle emitter bundled with ksp tools
<taniwha> oh, ok, new then
<taniwha> this has to be one of my more unusual designs: http://taniwha.org/~bill/screenshot4092.png
<riocrokite> lol
<taniwha> however, I'll be putting those parts to the actual test :)
<taniwha> riocrokite: btw, that part you're working on will be popular with EL users
<riocrokite> code is unoptimized as hell but hey - it works so i'm good for now :)
<riocrokite> regolith harvester?
<riocrokite> it's pretty big, they will have to wait till I finish stork 2.0 mod
<riocrokite> :P
<riocrokite> the most vicious part is that you have to drive vehicle for the harvester to be most efficient
<riocrokite> stationary efficiency = 0.1% :P
<taniwha> I think that's for the best, really
<riocrokite> and keep speed constant probably between 1 and 2 m/s
<riocrokite> so lazy players can just stop and fast forward
<riocrokite> but there's a catch - durability is connected with operation rate, not efficiency
<riocrokite> so lazy players will get the lowest durability that is lowest total amount of ore harvested before machine wears out
<taniwha> hehe
<riocrokite> it's all in cfg so there shouldn't be any complaints
<taniwha> oh, there will be :)
<riocrokite> i'll make big red letters = no support
<taniwha> now to work on integrating kerbnet into kethane
<riocrokite> so what would be suitable and player friendly ore -> rocket parts chain?
<riocrokite> assuming I have bigger parts that other mods (I think?)
<riocrokite> ore -> crushed ore -> metals-> rocket parts?
<riocrokite> there are some good news and bad news
<taniwha> probably
<taniwha> though just Metal will work nicely as that's what EL uses (Metal->RocketParts)
<riocrokite> do you get metal directly from ore?
<taniwha> riocrokite: EL's default chain is explained in http://taniwha.org/~bill/EL_Manual.pdf
<taniwha> yes
<riocrokite> yah cheers
<taniwha> (lots of other stuff in there, too)
<taniwha> so if you want to get fancy, you can :)
<riocrokite> well there are only good news taniwha https://gfycat.com/WelloffDistantJumpingbean
<riocrokite> proof of concept; particle generation depending on working speed
<taniwha> nice
<riocrokite> will need to fine tune a lot to look nice, but code works \o/
<taniwha> always a good start :)
<riocrokite> well I don't have smelter, however can repurpose molten regolith unit for that :P
<riocrokite> it melts ore anyway
<riocrokite> and yah it can melt scrap as well
<riocrokite> ohmy I probably could connect particle fall with planetary G
<riocrokite> so many nice tinkering options
<taniwha> kethane has atm affect rise
<taniwha> (but I need to replace those things)
<riocrokite> my best reference for regolith is lunar rover driving ;)
<riocrokite> assuming it's not fake :P
<taniwha> (might be similar)
* taniwha wants to strangle Majiir
<riocrokite> i meant dust effect simulation :P
<taniwha> oh, heh
<riocrokite> the problem i'm facing now is that i don't know how to make gray / black smoke particles since darker colors = more transparency
<taniwha> make sure the alpha is high
<taniwha> (but I noticed the same problem with EVE's clouds)
<riocrokite> hmmm need to look into that, there are currently 3 ksp particle shaders additive (additive blended) and alpha blended
<riocrokite> additive just make transparency out of grayscale so black = transparent white = opaque and everything inbetween
<riocrokite> alpha blended looks like SRB smoke, you can get black but it's a bit ugly
<taniwha> ugly usually means you need to pre-multiply
<riocrokite> ?
<taniwha> look up pre-multipied alpha blending
<taniwha> (I don't know the details, or I'd tell you)
<riocrokite> k thx
<riocrokite> too much to understand for me now
<riocrokite> need to take a break after that code marathon :P
<taniwha> yeah, don't burn out
<riocrokite> one more question taniwha since I never really debugged stuff -> can you look at my log?
<riocrokite> there's single nullRef exception in the middle, do you know what it might be related to?
<taniwha> hangon
<taniwha> [EXC 13:27:16.942] NullReferenceException: Object reference not set to an instance of an object
<taniwha> ScreenMessages.DestroyMessage (.ScreenMessage message)
<taniwha> ScreenMessages.Update ()
<taniwha> that means the exception happened in ScreemMessages.DestroyMessage
<taniwha> did you create any screen messages?
<riocrokite> yah started appearing a bit ago, probably some other mod
<riocrokite> probably GTI resource switcher thanks taniwha
<taniwha> no worries, but that's how to read it
<taniwha> those lines below the exception are the stack trace
<riocrokite> yah rgr that
<riocrokite> now I will now
<riocrokite> anyway it's cool future that this stuff is showing up so you have indication in red when something is wrong
<taniwha> yeah
<riocrokite> ah it's stock feature
<riocrokite> clicked show all log erros on the screen
<riocrokite> so it's stock nullrefError then :P
<taniwha> not really. it's a mod tickling stock
<taniwha> by doing something incorrect with ScreenMessages
<taniwha> (from the looks of it, trying to write one while KSP is loading)
<riocrokite> k rgr
<riocrokite> nothing serious then and not my mod
<taniwha> true, but it would be good if the offending author knew about it
<taniwha> I've got a few exceptions here and there, but nothing in ScreenMessages
<taniwha> none in my lightweight install (just a few mods)
<riocrokite> well i have like 7 mods in total
<riocrokite> but it's hard to tell which one is offending just from log, isn't it?
<taniwha> then it would be pretty easy to eliminate the offender
<riocrokite> ah yah delete mod and recheck?
<taniwha> as a guess, I'd suspect KermangeddonIndustries
<riocrokite> man I would do it but not now lol
<riocrokite> really tired
<riocrokite> it's me!
<taniwha> oh, heh
<taniwha> mind you, it could be MagicSmokeIndustries
<taniwha> well, if you know it's not yours, start with the others
<riocrokite> i'll get to it eventually :)
<riocrokite> but not now lol
<taniwha> yeah
<riocrokite> k time for one more video
<riocrokite> need to vary forward particle speed depending on speed so the drum is covered in dust no matter what speed
<riocrokite> but would need speed vector relatively to drum placement so it always pull dust in front
Thomas|AWAY is now known as Thomas
riocrokite has quit [Quit: http://www.mibbit.com ajax IRC Client]
Olympic1 is now known as Olympic1|Away
Iskierka has quit [Ping timeout: 204 seconds]
APlayer has joined #kspmodding
Iskierka has joined #kspmodding
APlayer has left #kspmodding [#kspmodding]
Olympic1|Away is now known as Olympic1
Ezriilc has joined #kspmodding
stratosleep is now known as stratochief
stratochief is now known as stratochief|away
APlayer has joined #kspmodding
Olympic1 is now known as Olympic1|Away
regex has joined #kspmodding
APlayer has quit [Ping timeout: 204 seconds]
APlayer has joined #kspmodding
APlayer has quit [Ping timeout: 204 seconds]
Sigma88 is now known as SigmaAway
riocrokite has joined #kspmodding
smoke_fumus has joined #kspmodding
SigmaAway is now known as Sigma88
riocrokite has quit [Quit: http://www.mibbit.com ajax IRC Client]
stratochief|away is now known as stratochief
stratochief is now known as stratochief|AFK
<Virindi> weird, if I delay the addition of velocity a few frames into a fixedupdate it doesn't do anything at all...sigh, I still don't understand much about the game
<Virindi> oh whoops.
<Virindi> *facepalm*
<Virindi> I bet if I just manually set the orbit it would cause other vessels to change orbit too
<Virindi> ones that were in load range
<Virindi> wonder if this is something like the order of calculation in the physics engine itself
<Virindi> like if I apply a linear velocity to something and it is also rotating it's not like that linear velocity is instant, it lasts as long as the physics tick
<Virindi> I could iteratively remove the error over several frames I guess
<xShadowx> <Virindi> weird, if I delay the addition of velocity a few frames into a fixedupdate it doesn't do anything at all - still in timewarp?;p
<Virindi> no I copypastad the wrong variable reference for my rotation value
<Virindi> :)
* xShadowx claps slowly
<Virindi> I suck.
<xShadowx> unless you're a hot blond, i dont wanna know :P
<xShadowx> jk
<xShadowx> everyone uses wrong variables from time to time
<Virindi> I really want this to work without messing with the orbit itself :(
<Virindi> I think I got it.
* Virindi reloads to try a different test
* xShadowx places a bug in Virindi's code
<Virindi> wobbbbbbbbbbbble
<kmath> YouTube - PersistentRotation Application of linear force test
<Virindi> yep it's IMPOSSIBLE to keep your orbit the same
<Virindi> it's just a function of floating point inaccuracy, bug closed, notabug
<Virindi> :D
<Virindi> I think the slight slowing is due to joint wobble
<Virindi> I noticed that the existing code adds rotational velocity, then adds force based on THAT rotational velocity, but that is not necessarily accurate
<Virindi> the part inertia is actually based on the TOTAL rotational velocity, not the added rotational velocity...he must have assumed it was zero, it is not
<Virindi> or unchanged
<Virindi> hmm
<Virindi> when I changed the linear application of velocity to reference the part's TOTAL angular velocity it now magically applies no net velocity change to the vessel
<Virindi> however that would not be exactly correct either if the vessel had significant spin beforehand, presumably this matters if the reference frame is rotating
<Virindi> taniwha will have to tell me what the secret sauce is to lock joints for a frame
<Virindi> hmm
<Virindi> hrm
<Virindi> maybe not
<Virindi> something else is going on again, dangit.
<Virindi> guess it doesn't take the rotation into account and it is zero
<Virindi> so that is wrong
<Virindi> oh well
<Virindi> scratch all that then :)
<Virindi> I mean in theory there should be no joint force
<Virindi> well change in it
* Virindi adds more debug lines
Olympic1|Away is now known as Olympic1|Semi
<Virindi> yeah angular movement at the start is zero
<Virindi> back to the drawing board
kmath has quit [Remote host closed the connection]
kmath has joined #kspmodding
Olympic1|Semi is now known as Olympic1
smoke_fumus has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
technicalfool_ has quit [Ping timeout: 190 seconds]
<Virindi> wait, he is applying linear force based on the part position
<Virindi> shouldn't that be part CoM
<Virindi> parts don't have the same CoM as position do they...
<soundnfury> Virindi: that sounds like a eureka...
<Virindi> could it be that simple, god damnit wow.
* Virindi applies head to desk at high speed
<soundnfury> Virindi: are you applying your head to the desk's position, or its CoM?
<Virindi> just verified that I am applying both linear and rotation velocity to parts and now the orbit is unchanged.
<xShadowx> Virindi: so fixed?o.o
<xShadowx> and not a stock bug?:P
<Virindi> need to log my rotational velocity to verify since I went down that road of doom already
<Virindi> I also have been running with all joints locked and unbreakable, went and figured out how to do that
<Virindi> to remove any possibility of that having an effect
<Virindi> we already knew it wasn't a stock problem though
<xShadowx> i give cookies if fixed :D
<Virindi> mainly I just want to prove my bug report was correct heh
<xShadowx> you say that like its a bad thing :P
<Virindi> why does my vessel's angular velocity slow down over time when the plugin isn't doing anything
<Virindi> with sas off
<xShadowx> atmo drag?
<Virindi> I am at 100km
<Virindi> the plugin isn't doing anything and I am slowing down
<Virindi> and now I am speeding up, maybe there is some kind of gyroscopic calculation going on
<Virindi> I mean it makes sense I guess since my vessel is not of uniform mass on each axis
<Virindi> yeah I guess it is just gyroscopic effects
<Virindi> it looks wrong :)
<Virindi> I should test that in totally stock game to see if it does it there
<Virindi> but anyway yeah I resume from rails now at the same angular velocity as I enter, and the orbit does not change during that operation
<Virindi> I will try turning off super joints
<xShadowx> so fixed :)
<Virindi> I think it's pretty unquestionable that applying momentum based on part location rather than part com is a logic error on the part of PR
<xShadowx> you ever seen the resource xfer drives?
<Virindi> yes
<xShadowx> that also annoys me :D
* xShadowx nudge nudge
<Virindi> it is only because fuel transfer does not transfer momentum, fuel just magically disappears from one part and appears in another
<xShadowx> and CoM gets moved
<xShadowx> wish the resource xfer method was a delegate i could replace :|
* xShadowx has become a fan of delegates
<Virindi> anything can be replaced ]:D
<Thomas> replace the replacer
<Virindi> here it what it looks like now, I disabled all the code that messes with joints: https://www.youtube.com/watch?v=smTLWH-PgLU
<kmath> YouTube - 2017 04 28 18 19 24
<Virindi> the slowdown over time is weird though
<Virindi> it seems quite wrong
<Virindi> I need a plugin that does nothing but spit out spin rate, or better, angular momentum
<xShadowx> make a partmodule, slap on PART[*]
<xShadowx> ive made so many 1 liner partmodules doing that just to watch data x.x
<Virindi> pffft
<Virindi> that would require me to run modulemanager, jeez such excess plugin for a debug game!!
<Virindi> :D
<xShadowx> or not
<xShadowx> use NP++ to add module to every part cfg :P
<xShadowx> NP++ batch editing....oh god the time saver
<Virindi> well the effect happens in stock
<Virindi> so WHATEVA
<Virindi> it is quite strange though
<xShadowx> maybe you can find a pattern and apply an extra force based on orbit position ;3
regex has quit [Remote host closed the connection]
<Virindi> heh I removed my code that delayed the rotation a few frames and suddenly no worky, oops something else I guess.
<Virindi> did not think I should need that now
<Virindi> apparently a combination of two factors then
<Virindi> yeah waiting only 1 frame works
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
<taniwha> waiting 1 frame usually is a result of script execution order
<Virindi> yeah the way he was doing it before was to apply velocity instantly upon gooffrails which happens after unpack without an intervening physics run
<Virindi> so you were dead on, both the com distance calculation was wrong (part com vs. part location) and it was off by one frame
<Virindi> testing cleaned up code, I can spin my vessel to insanity and still no orbit change :)
<taniwha> :)
<taniwha> btw, your vessel isn't spinning to insanity until its joints have stretched by over a meter
<taniwha> :)
<taniwha> (for mk16 chute, mk1 pod, decoupler, fl-t400, lv-909)
<Virindi> it might explode before that
<taniwha> was testing spin-orbit interacting with NK. after watching the nicely stable orbit in map view, I noticed my navball going nuts
<taniwha> went back to flight view to behold that :)
<Virindi> unbreakable joints on? :P
<taniwha> no
<taniwha> I suspect I accidentally had trim on
<taniwha> oh, and no effect on the orbit :)
<Virindi> hah I just noticed another problem with PR
<Virindi> hmm
<Virindi> dunno how to fix that
<xShadowx> hass anyone ever calculated what kerbin is made of, to have high enough density to explain its mass?
<taniwha> xShadowx: I went the other way
<Virindi> since the joints reset coming off rails now the application of force is to the nonstretched joints
<taniwha> xShadowx: Kerbals made a mistake in their calculation of G
<xShadowx> heh
<Virindi> thus the vessel loses angular momentum when joints are stretched and you warp
<taniwha> so density is only slightly higher than Earth's
<taniwha> but G is 10x as high
<taniwha> either they made a mistake, or they found something (via a monolith?) that stated G is 6.67e-11 but for them it's really 6.67e-10
<taniwha> (and so they've miscalculated the masses of their planets)
<Virindi> simple taniwha, they just use a different definition of gram
<taniwha> g=4/3πGρr
<taniwha> Virindi: after reading Raft (a few times now), I have no trouble increasing G by a factor of 10 (Raft did it by 1e9 or so)
<Virindi> not sure what to do about the fact that joints unstretch
<xShadowx> compress?
<xShadowx> also, can ksp be made so joints dont stretch? just calc force>x and break?
<taniwha> xShadowx: that would be silly
<Virindi> yes but
<Virindi> try setting rigid connection sometime :P
<taniwha> Virindi: use angular momentum
<xShadowx> taniwha: whats silly is seeing parts seperate by a meter of nothingness and still be attached :P
<taniwha> xShadowx: joint is too strong
<Virindi> right when you come out of timewarp and your joints are suddenly unstretched your rotation rate should be made FASTER
<taniwha> Virindi: if you do everything based on angular momentum, you'll set the correct velocity
<taniwha> right
<taniwha> angular momentum and current MoI
<taniwha> that will give the correct angular velocity
<taniwha> then when the joints stretch, physics will take care of the rest
<Virindi> yeah
<Virindi> I want this to be correct so :)