MuMech / MechJeb2

MechJeb2 - KSP mod
Other
994 stars 250 forks source link

Improvements to DeltaVToChange{Apoapsis,Periapsis} #758

Open dewiniaid opened 8 years ago

dewiniaid commented 8 years ago

As currently implemented, DeltaVChangeApoapsis and DeltaVChangePeriapsis perform a binary search in order to determine the dV required for the new maneuver.

I've been puzzling over a better approach to this for awhile and asked about it on StackExchange -- as well as having the opportunity to test the formula presented in the answer in KSP (using kOS):

For the simple cases of a burn at apoapsis/periapsis (the most common case), it is sufficient to merely solve the formula for precise orbital speed: v = sqrt(mu * (2/r)-(1/a)) where r is the magnitude of the ship's position vector (or apoapsis/periapsis + body radius) and a is the target semi-major axis (r + target apoapsis or periapsis / 2)

sarbian commented 8 years ago

I saw this and I will most likely look into it when I have more free time in 2 or 3 weeks.

lamont-granquist commented 5 years ago

Love the shout out to my old SE post.

I suspect this should get implemented as an optimization problem, though, using Levenburg-Marquardt or something like that.