Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

(suggest) a way to read the encounter periapsis. #242

Closed Dunbaratu closed 10 years ago

Dunbaratu commented 10 years ago

If you're trying to make a good shot at a planet or moon, usually you want to get the encounter with it as close to its surface as possible (with the caveat that you don't want to go low enough to mountains, and maybe you need to go a bit higher if there's air.)

As far as I can tell, there's no way to obtain this information from KOS at the moment. I can figure out if i have an encounter coming up and which body it's with, but not how close it is. if I just stop my Hohmann transfer the moment there's an encounter at all, then I usually get a very high-altitude periapsis on the target planet.

It is possible to obtain a maneuver node's periapsis, but that's relative to the parent body I'm orbiting now, not the target I'm going to have an encounter with.

weissel commented 10 years ago

encounter:periapsis doesn't work anymore?

Dunbaratu commented 10 years ago

The readme claimed ENCOUNTER returns the Body of the encounter, but I see it's just been updated by a2710 to say it returns a struct called ENCOUNTER that includes periapsis and apoapsis that just defaults to printing the body name when you print it (so it fooled me into thinking it was a Body struct).

I guess this makes the issue moot. I'll close it. Thanks.