pub fn mercury(jde: f64) -> VSOP87Elements
Expand description
Calculates VSOP87 solution for Mercury.
This function calculates the VSOP87 solution (heliocentric ecliptic orbital elements for the
equinox J2000.0) for the planet Mercury. The parameter needed is the Julian Day (JD) for the
given date. It returns the VSOP87Elements
of the VSOP87 solution.
Example
Given a date in JD, we can get the orbit of the planet Mercury. In this case, we calculate the orbit of Mercury in December 31st, 1899.
let vsop87_elts = vsop87::mercury(2415020.0);
assert!(vsop87_elts.a > 0.3870977205 && vsop87_elts.a < 0.3870977207);
assert!(vsop87_elts.l > 3.1341564064 && vsop87_elts.l < 3.1341564066);
assert!(vsop87_elts.k > 0.0452159417 && vsop87_elts.k < 0.0452159419);
assert!(vsop87_elts.h > 0.2005915793 && vsop87_elts.h < 0.2005915795);
assert!(vsop87_elts.q > 0.0405500077 && vsop87_elts.q < 0.0405500079);
assert!(vsop87_elts.p > 0.04576328 && vsop87_elts.p < 0.04576404);
It can then be converted into keplerian elements:
use vsop87::{KeplerianElements, VSOP87Elements};
let k_elements: KeplerianElements = vsop87_elts.into();
let convert_back = VSOP87Elements::from(k_elements);