egg|zzz|egg changed the topic of #principia to: READ THE FAQ: http://goo.gl/gMZF9H; The current version is Clifford. 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/
<egg|anbo|egg> anyway, that code generator is a big time saver (and also prevents lots of annoying bugs that were only caught when playing the game if it called an endpoint with a typo)
<awang> Want a PR for those, or is it simple enough to take care of on your end?
<awang> Runtime bugs are the best
<awang> Sounds like reflection bugs
<egg|anbo|egg> eh, mostly we tend to think that the code generator is fine as-is
<egg|anbo|egg> I've never really seen a readable code generator, and this one has at least proven maintainable
awang has quit [Ping timeout: 186 seconds]
Rokker has joined #principia
awang has joined #principia
EricSan has quit [Quit: Web client closed]
NathanKell|AFK is now known as NathanKell
icefire has quit [Quit: Leaving]
icefire has joined #principia
icefire has quit [Remote host closed the connection]
icefire has joined #principia
icefire has quit [Client Quit]
icefire has joined #principia
icefire has quit [Remote host closed the connection]
icefire has joined #principia
icefire has quit [Remote host closed the connection]
icefire has joined #principia
icefire has quit [Remote host closed the connection]
icefire has joined #principia
Daz has quit [Ping timeout: 182 seconds]
Daz has joined #principia
NathanKell is now known as NathanKell|Twitch
<lamont> so egg, for your finite burn model, if you’re doing say 100 dV burn prograde, do you model that over the burn arc as thrust which is always in the prograde direction?
icefire has quit [Quit: Leaving]
icefire has joined #principia
egg|anbo|egg has quit [Read error: Connection reset by peer]
egg|anbo|egg has joined #principia
Dazzyp has joined #principia
Daz has quit [Ping timeout: 383 seconds]
Dazzyp is now known as Daz
Dazzyp has joined #principia
Daz has quit [Ping timeout: 383 seconds]
Dazzyp is now known as Daz
<lamont> ah hrm is principia killing my throttle?
<awang> lamont: I don't think Principia touches the throttle?
<awang> And I think your understanding of the finite burn model is right?
<awang> It'd explain why the maneuver direction is 180 degrees off when on the other side of the orbit from the maneuver
<lamont> ah yeah
<lamont> yeah so that is an incorrect finite burn model
NathanKell|Twitch is now known as NathanKell
<lamont> yeah i don’t see mainThrottle anywhere in Principia, but that’s weird...
<awang> Incorrect?
<lamont> optimal finite burns use linear tangent steering, you don’t burn exactly prograde all the time (or exactly tangent)
<awang> idk if egg was going for optimal finite burns?
<lamont> yeah but then you might as well model it impulsively and let a proper finite burn optimizer figure out the finite burn solution
<awang> Also, what's linear tangent steering?
<awang> ehhhh
<awang> The current way seems like a better choice to me than impulsive burns
<awang> Especially with the longer burns in RSS/RO
<awang> Get something more accurate than impulsive burns, especially with the more complex trajectories
<awang> Even if it's not totally optimal
<lamont> but PEG can accurately hit the target orbit of an impulsively planned burn, but it should slightly beat Principia’s finite burn model when it comes to efficiency of executing the burn
<awang> Which is good
<awang> But I think the feature is more geared towards manual piloting
<awang> Since PEG wasn't around in its current form at the time
<awang> (or so I'd guess)
<awang> And even now, I'd guess most players would prefer to fly manually
<awang> So a finite burn seems like it'd be a good compromise
<awang> But that's just me
<awang> idk if that makes sense
<lamont> yeah i guess that makes sense for manual control, but then people have issues because the navball doesn’t burn down
<awang> Which is what the countdown is for
<awang> Or at least until burning down is implemented
<awang> However far in the future that is
<lamont> well principia doesn’t seem to touch mainThrottle anywhere, but i don’t understand where in the MJ code it’d be killing my throttle
<lamont> it seems to be killing it exactly on the maneuver node, which is curious
<awang> Is MJ doing the half burn before half after thing?
<lamont> yeah it leads it by burntime / 2
<lamont> which isn’t quite optimal actually but good enough
<awang> Maybe Principia does something weird with maneuver node placement?
<awang> Since it models finite burns
<awang> So KSP maneuver nodes wouldn't exactly fit
<awang> Does maneuver node T-0 occur at the same time Principia says the burn should start?
<lamont> oh its the maneuver node updating and triggering the angle thingy in the node executor i bet
<awang> Oh, the overwriting thing?
<awang> Angle thingy?
<lamont> the “whoah you are pointing the wrong way lets stop and reset” logic
<awang> Oh
<lamont> oh no it is principia
<lamont> principia nuked the maneuver node
<awang> ?
<lamont> poof its gone
<lamont> it is no more
<lamont> it is an ex-C#-object
<awang> Ah
<awang> Didn't know it did that
<lamont> yeah i just had focus on the maneuver node and suddenly my focus went to Kerbin when the node went away
<awang> Oh
<awang> Huh
<awang> Was it removed/replaced? Or gone permanently?
<lamont> gone gone
<lamont> it was an impulsive burn, so once i went past it, it was in the past, so poof
<awang> Hm
<awang> I never paid attention to the maneuver node Principia created, so I never noticed
Mike` has quit [Ping timeout: 207 seconds]
Majiir has quit [Ping timeout: 186 seconds]
Mike` has joined #principia
Wetmelon has quit [Ping timeout: 186 seconds]
icefire has quit [Read error: Connection reset by peer]
<lamont> ah the maneuver planner window is throwing
Snoozee has joined #principia
Snoozee is now known as Majiir
NathanKell is now known as NathanKell|Twitch
awang has quit [Ping timeout: 207 seconds]
NolanSyKinsley has quit [Remote host closed the connection]
NathanKell|Twitch is now known as NathanKell
stratochief has quit [Ping timeout: 186 seconds]
NathanKell is now known as NathanKell|AFK
<lamont> okay finally got a decent burn, and my periapsis at the Mun is 46 km instead of 43 km, but that is without RCS precision trim
CommandoDiamond has joined #principia
Wetmelon has joined #principia
<egg|anbo|egg> lamont: so, yes, it's fixed in the frenet frame unless you tick 'inertially fixed'; the point is that whatever trajectory you plan with the planner is at least *possible*; that might not be the best way to obtain it, but it's possible
<egg|anbo|egg> lamont: the impulsive burn thing is a last resort (and it's not even an impulsive burn, it's just a very fast one). It is a terrible way to pick a reference orbit anyway (if the whole goal is to define an orbit, there is no need to link it to the current one, by impulsive burns or otherwise)
<egg|anbo|egg> lamont: also, I'm confused, isn't the linear tangent thing an ascent thing?
ferram4_ has joined #principia
ferram4 has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
ferram4 has joined #principia
ferram4_ has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
CommandoDiamond has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
awang has joined #principia
stratochief has joined #principia
awang has quit [Ping timeout: 186 seconds]
awang has joined #principia
uj8efdjkfdshf has quit [Quit: Connection closed for inactivity]
stratochief has quit [Remote host closed the connection]
NolanSyKinsley has joined #principia
Hypergolic_Skunk has joined #principia
<lamont> egg: no its general. all optimal finite burns use it. falls out of calculus of variations and primer vector theory
ferram4_ has joined #principia
ferram4 has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
ferram4_ is now known as ferram4
<egg|anbo|egg> lamont: anyway, we could add other (open-loop) burn modes, but the general principle remains that if it is done with burns from the current trajectory it makes sense to have it try to integrate something possible
<egg|anbo|egg> lamont: conversely, if we wanted a tool whose sole purpose was to specify a target trajectory, there would be no need to link that to the current one, via impulsive burns or otherwise
egg|laptop|egg has joined #principia
<egg|laptop|egg> also chrome remote desktop for IRC is silly
<lamont> yeah i’m still not entirely convinced that you really need to plan finite burns. the dV cost between an impulsive burn and a finite one seems to be consistently less than 1% (playing around with an actual TPBVP solver in Matlab has been entertaining me for awhile). until you actually start talking about low-thrust ion burns, but then you’re doing multiple revolutions and spiral orbits and that is a completely different class of
<lamont> trajectory optimization. planning with impulsive burns and then doing finite burn execution is going to broadly work fine.
<lamont> i do think getting the n-body curve will be useful though
<lamont> i got the node exectuor working last night finally and got one burn done though
<egg|laptop|egg> lamont: yeah, but if you're flying mostly open-loop (plus manual control from map view) 1% is a lot (especially on n-body fanciness)
<egg|laptop|egg> (also the angle differences, etc.; here you know where to start your burn)
<lamont> you should design a mission that fails and make a video and show me =)
<lamont> i’ll do a PEG release soonish with the bugfixes so that it works
<egg|laptop|egg> I mean, on a long burn I have *no intuition* of where the position of an impulsive burn is
<egg|laptop|egg> (remember that the flight planner is not just for MJ PEG users, it has to be usable on its own)
<lamont> long burns though i think you’re probably doing the wrong math as well
<egg|laptop|egg> e.g. on a TLI burn, this allows you to plan and execute consistently; impulsive burns require knowing how far ahead you need to start
<lamont> how are you solving the finite burn problem?
<egg|laptop|egg> and yes, I could have better open-loop guidance probably but *that* is starting to get minor
<egg|laptop|egg> what finite burn problem?
<egg|laptop|egg> I just integrate the thing?
<lamont> because if you’re e.g. just thrusting along the tangent vector that is incorrect
<egg|laptop|egg> burn direction is fixed in the Frenet frame; it's not correct or incorrect, it's the definition of what my burn does
<egg|laptop|egg> it might be suboptimal
<egg|laptop|egg> but it is what it is
<lamont> yeah that’s suboptimal, i suspect you’ll have to change that for the kind of ion burns and stuff you’re talking about
<egg|laptop|egg> (if inertially fixed is checked, the burn direction is inertially fixed; that's not incorrect either, it's just another guidance strategy, e.g., spin-stabilization)
<lamont> Longuski, et al has another matlab example of a low-thrust orbit
<lamont> yeah the only reason i tick inertially fixed is to pull the resultant orbit off of the maneuver node
<lamont> its hackery because i don’t have that API you need to give me
<egg|laptop|egg> so, question about that API
<egg|laptop|egg> if we do it all in ECI it will be good for near-Keplerian stuff, less so for transfers, and likely shit for fancy n-body magic
<lamont> hrm
<egg|laptop|egg> I'm wondering whether it could be adapted to something fancy like "nearest to the given point, putting the given point in the EMB frame, and plotting the trajectory there too"
<egg|laptop|egg> (i.e. optimizing towards whatever mad trajectory you actually want, rather than its ECI version which may look very like another ECI trajectory that's not what you want in EMB)
<lamont> probably need to do some research on how they do those kinds of things for real
<lamont> i suspect the convergence properties of peg running against that will be horrible
<egg|laptop|egg> :D
<lamont> any time i fuck around with peg it tends to destabilize, it seems the people who designed the thrust integrals actually knew what the hell they were doing
<lamont> (lyapunov yadda yadda yadda...)
<egg|laptop|egg> Ляпунов!
<egg|laptop|egg> Ляпунов eggsponents
<lamont> indeedy
<lamont> eggsponents eggsplode
<lamont> would probably need Ping Lu’s explicit guidance rather than PEG at a minimum
<lamont> that replaces PEGs predictor-corrector which a proper multipoint TPBVP solver and newton-raphson with a numerically calculated jacobian. still does analytical coast and burn arcs, and has thrust integrals like PEG so its faster than numerical integration of the trajectory. could drop numerical trajectory integration into it and see what happens.
<egg|laptop|egg> :D
<egg|laptop|egg> but you need to integrate with thrust too now
<egg|laptop|egg> which sounds fun
<lamont> that’s burn arcs
<egg|laptop|egg> yeah
<lamont> the matlab code i’ve got does that — the ode function there is passed into some runge-kutta something or other under the bpv4 routine and integrates the burn arc
<egg|laptop|egg> okay but you can't actually do that because you don't have gravitation
<lamont> i just set the thrust to zero for coast arcs (which is terrible ‘cuz non-symplectic yadda yadda)
<lamont> yeah i do, there’s central point gravity there
<egg|laptop|egg> so you'd need to ask Principia to do it, but then you need to specify thrust to Principia
<lamont> and i’ve got the EoMs for N-body as well
<egg|laptop|egg> which might get interesting
<lamont> i can actually easily extend that matlab code to Earth-Moon or Earth-Sun-Moon
<egg|laptop|egg> yeah but it will be shit for J2 etc., also it won't know the Principia positions of those bodies in the future
<lamont> right right
<egg|laptop|egg> integration really should go through us
<lamont> so all that shit becomes more tedious, and you’ve solved that
<egg|laptop|egg> so, then the question is how to specify thrust
<lamont> i know how to do that in my case, i have no idea how to do that in your case
<egg|laptop|egg> because if principia is to integrate that it needs to know thrust
<egg|laptop|egg> what kind of function is thrust in your integration
<egg|laptop|egg> (what is it a function of, and how)
<lamont> also you’re not integrating the primer vector equiation
<lamont> principia’s integrators would need to be able to deal with that
<lamont> rdot = v;
<lamont> vdot = - MU * r / r3 + Fm * u;
<lamont> pvdot = pr;
<lamont> prdot = - MU / r5 * ( 3 * r' * r - r2 * eye(3,3) ) * pv;
<lamont> Fm is thrust / m and u is a unit vector in the thrust direction in the second line there
<lamont> those are the first-order ODEs of the system. top two are just central force motion with thrust. bottom two are the primer vector equation.
<lamont> r2/r3/r5 are scalar mangitudes to the power of
<egg|laptop|egg> but what is u as a function of time
<lamont> that is what you’re solving for
<lamont> and u = pv / norm(pv) so you’re solving for pv really
<lamont> (eye(3,3) is matlab for the 3x3 identity matrix as well)
<egg|laptop|egg> argh those names
<egg|laptop|egg> what is pv
<lamont> primer vector
<egg|laptop|egg> yeah I know what eye is, I had to endure some matlab
<lamont> ‘k =)
<egg|laptop|egg> welp the full name is hardly more helpful
<lamont> yep
<lamont> its calculus of variations voodoo
<egg|laptop|egg> okay, so you need to solve that fancy ODE
<egg|laptop|egg> well, it's fancy, but fancy ODEs are in scope for Principia
<lamont> yeah the problem is that you know r(t0) and v(t0) but you have constraints (depending on the problem) on r(tf) and v(tf), along with “transversality conditions” and constraints on the magnitude of the primer vector at interior switching points.
<lamont> so it is not an intiial value problem — the intiial values of pr and pv are what you are solving for
<egg|laptop|egg> wait what
<lamont> yep
<egg|laptop|egg> screams
<lamont> Two Point Boundary Value Problem
<egg|laptop|egg> okay
<egg|laptop|egg> um
<lamont> so the easier to grok method is multiple shooting
<egg|laptop|egg> yeah that's just plain old IVPs
<lamont> you guess values of pr and pv and now you have an IVP and you shoot
<egg|laptop|egg> IVP machine gun
<lamont> yeah, then you calculuate your “miss” at tf and turn it into a multidimensional root finding problem
<egg|laptop|egg> so if you're willing to do the shooting we can give you an endpoint for the IVP I guess
<lamont> then you either run a multidimensional secant method, or multidimensional newton’s method on the root finding problem, and update your IVP guess
<egg|laptop|egg> doing a boundary value problem solve is going to be quickly a rabbit hole for us
<lamont> rabbit hole for me, i’m stumbling my way through it
<lamont> anyway, i need to implement all this stuff in C# in MechJeb for stockish non-N-body things first
<egg|laptop|egg> yeah
<lamont> we’re months away from me having any of this to try with Principia
<egg|laptop|egg> lamont: but I'll ping phl so we can start giving you the first endpoints already
<egg|laptop|egg> yeah, same
<egg|laptop|egg> but we should think about it
<lamont> giving me the endpoint for the coasting trajectory on the other side of the burn would be immediately useful for PEG
<egg|laptop|egg> lamont: that is slightly trickier than the first endpoint you requested (because of the backward integration)
<egg|laptop|egg> but I'll poke phl with it tonight
<lamont> yeah
<lamont> so at least i don’t need backwards integration to yesterday, i only need backwards integration to now, where now is going to be on the order of burntime / 2 - 10 seconds before the burn
<lamont> (before the impulsive appx point — burn centroid — whatever)
<lamont> ish
<egg|laptop|egg> yeah, I get that; but the difficult part is of course not long backward integration, just getting the plumbing to allow *any*
<egg|laptop|egg> (at the lowest level it's running the integrator backward, but the trajectories are append-only, no prepending, so the ephemeris flows forward only, etc.)
<lamont> ah
CommandoDiamond has joined #principia
<egg|laptop|egg> lamont: okay, duscussed that a bit; backward integration is probably going to take a couple of lunations of plumbing but it's feasible
<lamont> cool
<lamont> i still have tons to do anyway
<egg|laptop|egg> lamont: the IVP with your shiny pv stuff sounds interesting and we'd definitely like to do it
<lamont> well let me teach myself how to do it properly in matlab first =)
<egg|laptop|egg> (why are you doing this to yourself :-p)
<lamont> that PDF i gave you actually has a pile of useful info on the TPBVP that i’d forgotten i’d read before that may be immediately applicable
egg|laptop|egg_ has joined #principia
egg|laptop|egg has quit [Ping timeout: 180 seconds]
<GH> [Principia] pleroy commented on issue #1702: Can one of the admins verify this patch? https://git.io/vNQvH
<UmbralRaptor> …awang's github account has a botlike name.
<UmbralRaptor> Then again, so does mine.
<awang> UmbralRaptor: Sorry?
<awang> I'm not exactly creative
<UmbralRaptor> It's fine.
<awang> What's yours?
<UmbralRaptor> pdn4kd
<UmbralRaptor> ie: my assigned username/email account at UMKC. ¯\_(ツ)_/¯
<awang> heh
<awang> Seems a lot more vague than the other university emails I've seen
<awang> First initial + last name + numbers, in some combination
<awang> Or just initials + numbers
<awang> Unless you have 5 parts to your name?
<UmbralRaptor> Yeah, my other accounts have been first initial + last name + numbers
stratochief has joined #principia
<egg|laptop|egg_> lamont: today in principia development: phl tries to run a benchmark that gives unexpected results under the profiler, his machine power-cycles O_o
egg|laptop|egg_ is now known as egg|laptop|egg
icefire has joined #principia
<awang> egg|laptop|egg: Wait, the benchmark causes a power cycle?
<awang> ....what
egg|laptop|egg has quit [Ping timeout: 180 seconds]
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
egg|laptop|egg has joined #principia
<egg|laptop|egg> if run with the profiler.
<egg|laptop|egg> it's deterministic.
<egg|laptop|egg> wtf.
Jesin has joined #principia
<awang> wat
<awang> Is it just his machine?
<awang> Or other Windows boxes too?
<egg|laptop|egg> awang: I don't know
<awang> egg|laptop|egg: Is this master?
<awang> I'm tempted to try it on my Windows install
<egg|laptop|egg> it works if you don't profile it though
<awang> Hmmm
<awang> Huh
<awang> Looks like it may be related to the Meltdown/Spectre patches?
<egg|laptop|egg> yeah trying to see if it could be that
<awang> Unless phl isn't on Windows 7?
<egg|laptop|egg> he is on 7
<egg|laptop|egg> awang: phl thanks you for the link
<awang> Tell him no problem
<awang> As annoying as the behavior is, I couldn't help looking around
<awang> It's fascinating behavior
<lamont> killing the O/S takes talent
<egg|laptop|egg> !wpn lamont
* Qboid gives lamont a frigorific monopoly
<egg|laptop|egg> !wpn awang
* Qboid gives awang a Kerbal
stratochief_ has joined #principia
stratochief has quit [Ping timeout: 198 seconds]
stratochief_ is now known as stratochief
egg|phone|egg has joined #principia
egg|laptop|egg has quit [Ping timeout: 180 seconds]