Jump to content
  • 0

How does KSP calculate orbit lines?


Question

3 answers to this question

Recommended Posts

  • 0

Welcome to the forums. Just so long as you assume that there is only one gravitational influence on a ship, there are closed-form solutions for converting from (x, y, z, dxdt, dydt, dzdt) to the standard Keplerian Orbital Parameters.

Have you looked at wikipedia? Are you a math whiz who knows everything there is to know about quaternions?

 

Link to post
Share on other sites
  • 0

Also, this doesn't directly answer your question... but if you want to see lots and lots of actual code for calculating orbital parameters, it's worth looking at the source code for MechJeb, which (like every mod, and unlike the source code for KSP) is publicly posted.  Lots of good stuff in there.  It'll give you a feel for the kind of code you'll need, even if it doesn't have the actual literal stuff you're looking for.  Basically, look for any file there that has "orbit" or "orbital" in the file name.

Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...