KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
691 stars 229 forks source link

BODY needs a sphere of influence radius suffix #342

Closed Dunbaratu closed 8 years ago

Dunbaratu commented 9 years ago

Something like BODY:SOIRADIUS.

Returns: the radius of the body's sphere of influence. If your orbit goes higher than that number you will escape the body EVEN IF your math still shows an elliptical rather than hyperbolic orbit. This is a place where you have to break from roleplaying the reality a bit and look at the simulation artifact to get the autopilot to do the correct thing because doing what should work in the real world will NOT work in the simulated world of KSP.

Alternatively: BODY:SOIALTITUDE. (The difference being whether it's measured from the body center or the body surface. Periapsis and apoapsis numbers are reported in terms of altitude not radius so this might be the better way to show it to the user.)

Either number will be sufficient, because you can add or subtract BODY:RADIUS to get the other one. It's just a matter of which we want to show.

ndevenish commented 9 years ago

This would be very useful. I'm writing a periapsis kicker and need to enter this information manually at the moment.

abenkovskii commented 9 years ago

Looks easy enough. Can I do it?

erendrake commented 9 years ago

@abenkovskii go for it!