Skip to content
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

Option to enable maneuver nodes (feature request) #1873

Closed
MuhsinFatih opened this issue Jul 3, 2018 · 6 comments
Closed

Option to enable maneuver nodes (feature request) #1873

MuhsinFatih opened this issue Jul 3, 2018 · 6 comments

Comments

@MuhsinFatih
Copy link

Could you add an option to enable adding old school maneuver nodes for quick dirty estimations? As much as I love this mod, I find it very tedious to make a flight plan with the flight planner window. In fact what would be even cooler is to integrate this mod with stock maneuver nodes, so we wouldn't even need the planner window in the first place. That would even make it compatible with mods like Precise Node

@pleroy
Copy link
Member

pleroy commented Jul 3, 2018

The stock manœuvre nodes are instantaneous. Our manœuvres are extended in time. Therefore, the stock UI is not capable of providing the parameters that we need for our manœuvres. Also, the stock manœuvre nodes can only exist on the stock trajectories, i.e., the patched conics.

It might be possible to modify/replace the stock manœuvres to represent extended burns, but it seems like a lot of deep interactions with the KSP UI and to be honest I wouldn't even know where to start.

@MuhsinFatih
Copy link
Author

I see. How about implementing your own maneuver node? I am not very familiar with unity and especially modding, so I am not sure how valid this question is so forgive me :). In the meantime though, could you add the option to enable old patched conic maneuver nodes? I know they don't represent real trajectories but for quick dirty estimations it would save a lot of time

@DocRockwell
Copy link

Muhsin, MechJeb can still generate patched conic maneuver nodes. Pretty handy for simple maneuvers that don't warrant using the flight planner.

@lamont-granquist
Copy link
Contributor

@pleroy a more useful thing would be to be able to use instantaneous maneuver nodes but with properly integrated n-body trajectories that could be pulled off of them.

The reference frame for the Vector3d of the burn might be an issue. I think KSP maneuver nodes are in (prograde, radial, normal) which I would say is on the user to use (tangent, normal, binormal) instead -- although there would need to be utility routines available to convert from KSP barycentric world coordinates to tangent/normal/binormal in the ship frame to make that sane for the end user. Then what you've got should be a well defined dV and UT to apply it at. Integrating forwards from where the ship is to the maneuver node time would give the "before" trajectory and integrating forwards from the maneuver node (n-body integration) would give the "after" trajectory. Then it can be the responsibility of a finite-burn integrator to actually get the spacecraft from the "before" trajectory to the "after" trajectory (most of which in the real-world don't bother with n-body or J2 over the course of the burn since they're run closed-loop).

That'd allow for a bit easier integration of Principia with MechJeb, kOS, kRPC, etc. Higher level algorithms can build a maneuver node, pull the integrated trajectories off of it, calculate the real n-body-calculated miss, then do whatever minimization to drive that miss to zero, and what the user gets is an impulsive burn which is (presumably) optimal and accurate since it used Principia to do the integration.

@lamont-granquist
Copy link
Contributor

Also this is typically how most trajectory optimization is done. It generally starts out with impulsive burn approximations with patched conics and then that solution is "perturbed" by adding finite burns or n-body effects. For PEG in the Shuttle it doesn't bother with J2 for the burn phase, only the coast phase, and doesn't bother with perturbations from the Moon or the restricted three body problem (inaccuracies are dealt with by running it closed-loop and driving the errors to zero along the burn).

@eggrobin
Copy link
Member

eggrobin commented Apr 3, 2019

Closing this.
There are UI issues with the flight plan, and they should be addressed; the way to address them is not to use stock or a third-party mod, see also #1964 (comment).

When MechJeb wants to do Principia-aware guidance, it will have to call a Principia API to perform the integration anyway; it can also read the Principia flight plan.

Sorry, something went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants