-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could there be a way to read "Closest Approach"? #275
Comments
I wrote plugin which did that (now abandoned) - and KSP don't have simple internal function to do it. So it have to be code from other plugin, like Protractor (is on GPL3), but i see that currently soruce is missing. http://forum.kerbalspaceprogram.com/threads/21544-22-Protractor-Rendezvous-Plugin-v-2-4-3 But i think that much better would be some function to get Planet position at certain time and your position at certain time. Those are simple functions in KSP, just need mapping. That way you can build your own code to find closest approach, and also do other stuff. |
"Either you're close enough". I reckon KSP calls it an encounter when you enter the bodies SOI. |
The problem with Hohmann transfers is that they presume you start from a circular orbit and are going to meet a body that is on a circular orbit. They don't work for the general case where your target body can be a planet in an eccentric ellipse. |
Another reason for this is when you're trying to approach a different vessel in orbit around the same body as you are. There won't even be an "encounter" in that case. The simplest method would probably be that you select your target, and ask for closest approach, where it goes along all the conics (as it does when finding what you're encountering) and running some code (e.g. ripped from mechjeb) that tells you about your closest encounter, returning the result to the user. |
file:http://imageshack.com/a/img51/5956/x5uk.jpg
(Not my image - taken from a google search)
I don't think there's currently any way to obtain that "closest approach" information in a kos script. This sort of makes encounters rather boolean. Either you're close enough to have KSP call it an 'encounter', or you're not. If you're not, the script can't tell the difference between an 'almost' encounter of say 1 million km, versus a "not even close" pass of 40 million km.
Being able to obtain that information would really help speed up algorithms to iteratively search for an encounter, as it would allow you to perform "geting warmer / getting colder" search techniques.
The text was updated successfully, but these errors were encountered: