xeger / kos-ramp

Relatively Adequate Mission Planner: a rudimentary, scriptable autopilot for kOS.
Other
55 stars 23 forks source link

There is no "Transfer to another planet" script #16

Open fellipec opened 6 years ago

fellipec commented 6 years ago

Jebediah need to boldly go where no kerbal was gone before!

mathuin commented 6 years ago

Would this same script allow for Mun<->Minmus transfers?

xeger commented 6 years ago

The math is the same for a Mun-Minus transfer as for an interplanetary transfer, so in principle, yes.

I have a very feeble understanding of the math, but when I did a bit of preliminary web research, I encountered a lot of precomputed lookup tables for ejection angles and transfer windows. Obviously a solution that relies on those lookup tables would not work for moon-to-moon transfers.

For Kerbin and its satellites, the energy difference between orbits is so small that it's probably best to just escape Mun, circularize, and perform a Hohmann to Minus.

For something like the Jool system, however, a robust general solution would save a looooot of fuel over time.

On Mon, Jan 22, 2018 at 9:12 PM Jack Twilley notifications@github.com wrote:

Would this same script allow for Mun<->Minmus transfers?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xeger/kos-ramp/issues/16#issuecomment-359678587, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEemNKapjStzJYnBQt6E7toJ_3pSs8Bks5tNWo1gaJpZM4QoKLY .

boiler1 commented 6 years ago

To transfer to Duna

  1. Calculate when Kerbin and Duna align for hohman transfer.
  2. Warp on the pad, to just before this point in time.
  3. Launch to orbit.
  4. match inclination with Duna.
  5. Calculate hyperbolic escape parallel to Kerbin prograde.
  6. Calculate hohmann transfer deltaV to Duna.
  7. Create and execute maneuver node to transfer to Duna. Ideally should be 180 degrees from current position.
  8. Match inclination at inclination next crossing.
  9. Mid coarse correction to decrease Duna Apoapsis.
  10. Warp to SOI.
  11. After entering SOI, correct inclination and lower Apoapsis to target if needed.
  12. Circularize at Duna Apoapsis.
  13. land at a target under current orbit.
boiler1 commented 6 years ago

xeger, as you have pointed out a transfer to Duna is similar to a hohmann transfer to the Mun. There are two main differences. Duna has a slightly elliptical orbit. So your hohmann transfer script has to be able to calculate elliptical transfers. The second is calculating a hyperbolic escape trajectory parallel with Kerbin prograde. I don't understand the math. I fudge the numbers a little and correct the burn afterwards.