Jump to content

Q: How does KSP calculate true anomaly?


monstah

Recommended Posts

True anomaly (ν) is the angle centered on primary (orbited body), from periapsis to position orbiting body (satellite). It is easily calculated from Eccentric anomaly (E), which in turn is calculated from Mean anomaly (M), which is linear on time.

The thing is, the equation that relates M and E (M = E - e*sin(E), where e is eccentricity) can't be solved for E. It is usually either approximated by a sine series or calculated by iteration, say, with Newton's method.

The sine series is pretty inaccurate when e is not "very small", and I'd say in KSP e is almost never "very small". Newton's method is safer, but I'm not sure calculating something by iteration, for every vessel/celestial body, for every frame, is the best way.

Does anyone know it KSP takes a third way out that I don't know of, or if it brute forces Newton?

Link to comment
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
Reply to this topic...

×   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...