Jump to content

Calculate true anomaly from eccentric anomaly?


Recommended Posts

Trying to do some orbital position calculations in a mod, and run into a problem. According to the docs and the wiki, there should be a method double Orbit.getTrueAnomaly(double E) which looks like it would be what I want, but trying to use it gives this result:

double targ_true_anom = targorb.getTrueAnomaly(targ_anomaly);

VelocimeterModule.cs(118,38): error CS1061: Type `Orbit' does not contain a definition for `getTrueAnomaly' and no extension method `getTrueAnomaly' of type `Orbit' could be found. Are you missing an assembly reference?
/home/rosuav/.steam/steam/steamapps/common/Kerbal Space Program/KSP_Data/Managed/Assembly-CSharp.dll (Location of the symbol related to previous error)

Any ideas what I'm doing wrong here?

Link to comment
Share on other sites

13 hours ago, HebaruSan said:

Oof. Apparently I was looking at buggy docs this whole time. When I search for docs via the Almighty Google, I came across https://anatid.github.io/XML-Documentation-for-the-KSP-API/ which looks identical to the official site as linked above, so I didn't notice that the information was wrong. In fact, it almost never *is* wrong; and I've no idea why it's wrong on just this one tiny example. Thank you for pointing that out, and I'll try to keep a better eye on my URL in the future!

(BTW, apologies if I've messed something up in this post; the forums CSS is all borked at present so I'm not entirely sure what I'm posting.)

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