-
Notifications
You must be signed in to change notification settings - Fork 5
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
Planning Transfers between Vessels in same SOI hierarchy #8
Comments
@meep366 Thanks for the thoughtful feedback and happy new year to you too! First the good news - this feature should be theoretically possible. Background Technical context Let's use your example of a rendezvous from a ship in orbit around Minmus to a ship in orbit around Kerbin.
So how could your suggestion be implemented? There's no direct common parent but one idea is to use a simplifying trick. The destination ship is in elliptical orbit around Minmus, which is in elliptical orbit around Kerbin. By combining the ship's position and velocity with Minmus's position and velocity respectively, we could "erase" Minmus and pretend that the destination ship is in a strange orbit around Kerbin that speeds up and slows down and wobbles (this approach could also be recursively applied to sub-moons). The Lambert solver only considers zero-dimensional points, so would provide a transfer solution. Now for the first tricky part. The script uses a simple hill climbing algorithm to find the best transfer window. This assumes a "smooth" gently sloping porkkchop plot that has an obvious valley. For example here is the plot from Kerbin to Duna with a single valley that the algorithm will nearly always converge to (notice the diagonal ridge from bottom left to top middle that can throw off the some searches). Kerbin to Moho is more challenging, the features repeat (at the synodic interval), and are much more "rugged" with local minima that the alogorithm could get trapped in. To workaround this the script simply starts many searches and usually one will find the global minimum (for the given search parameters). The trick suggested above would add a layer of wrinkles (or noise) to the porkchop plot that could throw off the hill climbing algorithm. Instead of a single smooth curve from peak to valley, it would rise and fall in a bumpy manner (although overall decreasing). However this is just one idea - I'm sure there are other approaches that you could try. Alternatives |
@maneatingape Thank you for this excellent explanation, that adds a lot of clarity to what's going on behind the scenes. I have been working towards Plan B occasionally over the last week or so, and so far seems like if I target an elliptical orbit dropping in on Minmus with the periapsis close to the orbit of my target vessel, and there doesn't seem to be a huge delta-v penalty versus what might be the optimal transfer. I'll let you know if I manage to get something working, and maybe I'll go back and try to do the full implementation after getting the simpler one working. Thanks again! |
Feature Request
Before creating a feature request please check that:
Is your feature request related to a problem? Please describe.
Happy New Year! It is currently not possible to plan a vessel intercept when the destination vessel is around a child of the current body, even if the inverse is possible. For example, a vessel in orbit around Kerbin cannot plan an intercept with a vessel around Minmus, however, a vessel in orbit around Minmus can plan an intercept with a vessel around Kerbin.
Describe the solution you'd like
Ideally, it would be possible to plan these transfers as it would appear to be the same 2-body SOI problem that's been solved so well with your library. All the standard options for vessel intercept planning would still apply.
Describe alternatives you've considered
The obvious solution being simply planning a transfer out to the second body, say Minmus, then planning a transfer from there is the immediate work-around, however sub-optimal the deltaV of that transfer set up might be. I expect there's probably a good reason for this feature not being in the current release, but I will try to go through the code myself as well to see what would be required to get this functioning. Creating this issue to see what roadblocks there might be, and happy to put up a PR with my implementation if by some miracle I understand enough orbital mechanics to make it work.
Additional context
Appreciate the library a lot already and hope for some helpful feedback!
The text was updated successfully, but these errors were encountered: