Skip to content

Question about Nyx::Orbit.ecc() #258

Closed Answered by ChristopherRabotin
gwbres asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Guillaume,

Yes, the ecc function returns the eccentricity of the osculating orbit, specifically, the norm of the eccentricity vector calculated with this formula.

For an end-to-end example, I'd recommend looking at the "cosmic" integration test here. Essentially, you need to load the planetary information (using Cosm::de438s() for example), retrieve the relevant frame (in your case, it's the Earth Mean Equator J2000, or EME2000, also called Earth J2000 -- it's the Earth centered inertial frame), define the epoch, and then build an orbit structure.

Ignoring the imports, your code will look like something like this:

let cosm = Cosm::de438();
let eme2000 = cosm.frame("EME2000");
let epoch = 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gwbres
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants