egg changed the topic of #principia to: READ THE FAQ: http://goo.gl/gMZF9H; The current version is Christoffel. We currently target 1.2.2, and 1.3.1. <scott_manley> anyone that doubts the wisdom of retrograde bop needs to get the hell out | https://xkcd.com/323/
<lamont> hrm, J2 = 0 could be a good reason to replace the CSE routine with an rkf45 integrator
<egg> lamont: oh do you want integrators?
<lamont> ahahahaha
* egg fetches the bucket of integrators
<lamont> rkf45 is all i need
<kmath> <eggleroy> <Majiir> I really am imagining egg just drowning in a sea of papers https://t.co/P2iqkDT7CN
<lamont> i should take a pic of all of mine now
<lamont> i may have caught up
* UmbralRaptor pictures various Centaur stages half-buried in papers.
<egg> lamont: we should join forces
<awang> MechJeb learns real physics
<awang> I can get behind that
<egg> principia learns guidance
<awang> Principia goes to flight school
<awang> The über-mod to end all mods
<lamont> i think PEG in MechJeb will work well enough under Principia
<lamont> the only thing that matters for PEG is accurate trajectory extrapolation
<lamont> if you wanted to give me access to that in Principia all i need is orbit.GetOrbitalStateVectorsAtUT() that does integration to UT
<lamont> and it doesn’t need to be hideously accurate, because i don’t care about accuracy or stability (or even energy conservation) out to 100 orbits or whatever
<egg> lamont: assuming no further thrust?
<lamont> no thrust
<egg> lamont: this is not possible right now (the vessel doesn't exist before eggsiting the atmosphere), but after ferram4's next release it will be
<lamont> actually i need to be able to construct an orbit with UpdateFromStateVectors() (at UT = now) and then read off one GetOrbitalStateVectorsAtUT() at a known UT
<egg> and that seems like a feasible and sensible entry point (need to make sure that it piggybacks on exsiting prediction computation and doesn't retrigger an integration, so some care needed)
<egg> lamont: ah that's much iffier
<lamont> take (r0, v0) to (r1, v1) at t = t1
<egg> yeah now you need to get your hands directly to the ephemeris
<egg> hmm
<lamont> yeah r0, v0 is going to be close to my position, but not equal
<lamont> and if i go to burn-coast-burn then i’d need 3 calls
<egg> ah you still need to integrate with burns?
<lamont> i already built the ability to only run PEG every X seconds though
<lamont> peg doesn’t integrate, its analytic approximations
<egg> I'm not sure I understand your burn-coast-burn question
<lamont> ah sorry
<lamont> yeah i need to approximate integration of gravity through the burn arc with a “nearby” coasting arc
* egg is still confused
<lamont> yeah its confusing
<egg> if you have a burn arc, why are you integrating without the burn? Ꙩ_ꙩ
<lamont> so deltav = integral g dt + integral F/m uF dt or deltav = vgrav + vthrust
<lamont> but you have to integrate those over the path that you’re taking (but the problem is to minimize the thrust over the path) so its coupled
<egg> but that's a lie
<egg> since gravity depends on your position which will depend on your thrust
<lamont> but PEG breaks that up and analytically treats the thrust separate from the gravity integral and approximates the gravity integral to first order by a nearby coasting trajectory
<egg> huh
<lamont> well you could just assume the average radius of the burn was good enough to use as the gravity integral — because gravity at 100km is pretty close to gravity at 185km, so just take 142.5 km and call it good
<egg> well yes but then it turns out J2 matters actually :-p
<lamont> yeah what matters a bit more is the shape of the burn
<lamont> you spend a bunch more time up near 185 than down at 100
<lamont> so what you do is construct vc1 = v + 6/5 rthrust / tgo = vthrust / 10 ; rc1 = r - rthrust / 10 - vthrust * tgo / 30; and integrate that starting state from t= 0 to t= tgo
<lamont> that gives you a good enough approximation to vgrav and rgrav over the burn, then it lets you analytically integrate vthrust and rthrust without having to consider gravity
<lamont> and since its predictor-corrector the errors at the start get driven to zero as tgo goes to zero
<egg> lamont: anyway; a FlowBodyCentric(centre_index, world_body_centred_degrees_of_freedom, t_initial, t_final) seems like a sensible entry point, file a feature request and we'll see what we can do. One problem is that you need to have the plugin object, which is owned by the ksp plugin adapter if it exists and which I'm really reluctant to expose too much... maybe I could have a static variable with the current plugin, and
<egg> have your entry point use that one, but that sounds like it might be brittle?
<egg> lamont: document your PEG usage in the feature request and link the relevant technical reports for my and phl's amusements, we like drowning in papers :-p
<lamont> lulz
<ferram4> egg: You have made sure that Principia plays nice with the dev version of FAR where I added whatever it was you asked me to add, right?
<ferram4> I haven't added or changed anything that should break it, but just wanna make sure
egg is now known as egg|zzz|egg
<egg|zzz|egg> ferram4: yeah, I checked that it worked if I told Principia to look at the vessels inside the atmosphere, then I told principia to not look so it is compatible with Liebe
<ferram4> cool
<GH> [Principia] lamont-granquist opened issue #1659: Need Principia analog of UpdateFromStateVectors() + GetOrbitalStateVectorsAtUT() https://git.io/vb62I
<egg|zzz|egg> ferram4: so when you release your new version I can have that distinction ifdefed on 1.3.1 vs. 1.2.2 so the 1.3.1 build no longer has a border between the egg and ferram sectors
<ferram4> Cool
<egg|zzz|egg> lamont: don't worry about the inv rotation, we handle rotating the universe so we can give you whatever you want
<egg|zzz|egg> lamont: the thing is I'm not sure what you want
<egg|zzz|egg> (as far as axes go)
<lamont> heh i’m not sure what i want either
<egg|zzz|egg> do you want them in world coords (that may be rotating) or in some non-rotating coords (but then what's your reference)
<egg|zzz|egg> we could expose Barycentric but that's right-handed and weirdly oriented so probably unhelpful
<lamont> ECI i think
<egg|zzz|egg> okay, so ECI, but what axes
<egg|zzz|egg> ECI tells me how the axes (don't) rotate
<egg|zzz|egg> but where do they point
<lamont> oh
<egg|zzz|egg> which handedness, too
<lamont> uhrm
<lamont> too many choices
<lamont> hrm, i need to dive into AliceWorld at some point, i still haven’t tamed inverse rotation issues
<lamont> but no fuck that don’t use it
<egg|zzz|egg> aliceworld is just world with flipped axes
<egg|zzz|egg> lamont: to put it another way, how will you compute the numbers that you feed into this function
<lamont> vessel.CoMD and vessel.obt_velocity should match i think
<lamont> so earth north is north
<lamont> earth rotates
<lamont> er no
<egg|zzz|egg> uuuuh CoMD is world? so earth doesn't always rotate
<lamont> CoM - vessel.mainBody.position
<egg|zzz|egg> still, earth may not rotate
<egg|zzz|egg> [earth rotation subject to conditions. restrictions may apply]
<lamont> no, those don’t inverse rotate (or if the positions rotate they cancel)
<lamont> so ECI, earth doesn’t rotate, left handed/no swizzle, Z is earth axis north, and X-Y is chosen so that vessel.obt_velocity and vessel.CoMD - vessel.mainBody.position agree
<egg|zzz|egg> lamont: CoMD is in world coordinates. those axes do rotate. (check CalculatePhysicsStats, it's a barycentre of worldCenterOfMass of parts)
<egg|zzz|egg> (I know how to transform to world coords though, so that's good, but the axes rotate)
<lamont> if you subtract off vessel.mainBody.position does that rotation get peeled off?
<egg|zzz|egg> no
<lamont> thats weird ‘cuz that gets used all over MJ and works fine and doesn’t go screwy at 145km
<egg|zzz|egg> (a lot of the time at high speed the CoMD will be 0, so you'll just be looking at the mainBody position though)
<egg|zzz|egg> but even the mainBody position is in world coords
<egg|zzz|egg> do you actually rely on the axes being fixed though
<egg|zzz|egg> it's possible not to (the entire stupid game does that >_<)
<lamont> maybe i don’t?
NolanSyKinsley has joined #principia
<lamont> at some point all this shit makes my head hurt and i just do math on vectors and stuff works
<egg|zzz|egg> lamont: mind you, you end up with the Fun stuff where you have velocities in ECI given in rotating axes
<egg|zzz|egg> yes this makes no sense
<egg|zzz|egg> yes KSP is full of it
<egg|zzz|egg> nonrotating velocities with rotating axes *baaarf*
<egg|zzz|egg> lamont: anyway, seems that you just handle world coords, and we know how to transform those to our internal sensible inertial coords so that's fine
<egg|zzz|egg> (in fact we define the transformation, since we're the ones tilting the universe :D)
<lamont> so i use r = vessel.CoMD - vessel.mainBody.position and v = vessel.obt_velocity and everything works
<egg|zzz|egg> yeah obt_velocity is the ECI velocity, but in those rotating axes
<egg|zzz|egg> lamont: thing is you don't reuse vectors from an old frame in the current one, you just use those and run your integration and do stuff with the result, right?
<egg|zzz|egg> so the fact that the axes will rotate doesn't matter to you
<lamont> correct
<egg|zzz|egg> KSP world coords: they're stupid but sometimes you can pass through the stupidity
<lamont> i still really don’t grok them at all
<ferram4> Don't worry.
<ferram4> No one does.
<GH> [Principia] lamont-granquist commented on issue #1659: Per discussion on IRC, the r,v that I need must be ECI with Z being earth north axis up and left handed. Beyond that I get confused, but ` r = vessel.CoMD - vessel.mainBody.position` and `v = vessel.obt_velocity` should be the r,v of where the active vessel is. https://git.io/vb6a8
<GH> [Principia] eggrobin commented on issue #1659: (that's ECI but with KSP's ineffable occasionally-rotating `World` axes, we know how to handle that better than we know how to explain it) https://git.io/vb6au
<egg|zzz|egg> I tried to document them at some point, in the days of the anatid documentaton
<GH> [Principia] lamont-granquist commented on issue #1659: egg explains to me that those are still in rotating axis world coordinates and that hurts my damn brain a lot, but those are the vectors that MechJeb operates on and everything seems to work. https://git.io/vb6aa
<egg|zzz|egg> then I made principia and I just wrote giant geometry libraries to guard against the madness instead of trying to understand it
<lamont> yeah just write some math transforms that are correct and let the computer solve the madness
<egg|zzz|egg> this is the only thing that stands between us and the madness of Unity transforms
<egg|zzz|egg> all hail the Lie algebras
<lamont> angular velocity of reference frames ergh
<egg|zzz|egg> (that's actually the derivative of the thing that the unity transform represents but whatever)
<egg|zzz|egg> a RigidMotion is its derivative
<egg|zzz|egg> stronk typing
<egg|zzz|egg> lamont: so there are two possibilities, either we go with a 10 s timestep and you don't get any error control, or we use a variable step integrator and then you can pass a tolerance (but the API might be less stable, what if we change integrators)
<egg|zzz|egg> or you trust that we pick a sane tolerance and we say 1cm or whatever and everyone's happy
<egg|zzz|egg> anyway I should sleep
egg|phone|egg has joined #principia
icefire has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
<egg|zzz|egg> lamont: bear in mind that we have quite a bit of technical debt, in particular the Plugin class is very poorly tested, so we'll spend the next release or two focusing on that; your feature request is unlikely to get much love before we get that done
<lamont> that’s fine, i’m not really ready to use it right now
<lamont> 10s of integration smells a bit too accurate, variable step integrator with tolerance sounds better, API stability is not super concerning
pizzaoverhead_ has joined #principia
pizzaoverhead has quit [Ping timeout: 198 seconds]
<awang> egg|zzz|egg: Want to hold off on the engine selecting stuff I have for Principia for the next few lunations then?
<lamont> holy fuck wait…
<lamont> so a vector that i stuffed into a Vector3d 10 minutes ago gets rotated and no longer points to the same point
<lamont> certain things just became clear i think
awang has quit [Ping timeout: 186 seconds]
Wetmelon has quit [Ping timeout: 186 seconds]
Wetmelon has joined #principia
awang has joined #principia
bees has quit [Ping timeout: 207 seconds]
bees has joined #principia
<egg|zzz|egg> lamont: :D
<egg|zzz|egg> isn't KSP Fun
<egg|zzz|egg> lamont: this is why there are those caveats everywhere in frames.hpp
<lamont> yeah, i had one of those brief moments of clarity, then like my IQ suddenly dropped 50 points, i ate some curry, killed some dinosaurs and i’m trying not to think about it any more tonight…
<lamont> blew a bit of a tableflip fuse in my head
awang has quit [Killed (NickServ (GHOST command used by awang_))]
awang_ has joined #principia
awang_ has quit [Client Quit]
awang has joined #principia
ferram4 has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
ferram4 has joined #principia
egg|phone|egg has quit [Ping timeout: 207 seconds]
egg|phone|egg has joined #principia
egg|cell|egg has joined #principia
egg|phone|egg has quit [Ping timeout: 198 seconds]
egg has joined #principia
egg|zzz|egg has quit [Ping timeout: 207 seconds]
egg|phone|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
egg|mobile|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has quit [Ping timeout: 186 seconds]
egg|phone|egg has joined #principia
egg|mobile|egg has quit [Ping timeout: 186 seconds]
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #principia
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #principia
egg|mobile|egg has joined #principia
egg|phone|egg has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
egg|cell|egg has quit [Ping timeout: 186 seconds]
Jesin has quit [Quit: Leaving]
ferram4_ has joined #principia
ferram4 has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
stratochief has quit [Remote host closed the connection]
Jesin has joined #principia
e_14159 has left #principia [#principia]
egg|phone|egg has joined #principia
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|mobile|egg has quit [Ping timeout: 186 seconds]
Jesin has quit [Quit: Leaving]
UmbralRaptor is now known as SimulatedRaptor
Jesin has joined #principia
awang has quit [Ping timeout: 186 seconds]
egg|phone|egg has joined #principia
egg|cell|egg has quit [Ping timeout: 186 seconds]
awang has joined #principia
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has quit [Ping timeout: 186 seconds]
Hypergolic_Skunk has joined #principia
pizzaoverhead_ is now known as pizzaoverhead
egg|phone|egg has joined #principia
icefire has joined #principia
awang has quit [Read error: Connection reset by peer]
awang has joined #principia
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
xShadowx has quit [Ping timeout: 186 seconds]
Jesin has quit [Quit: Leaving]
stratochief has joined #principia
awang has quit [Ping timeout: 200 seconds]