[][src]Function vsop87::saturn

pub fn saturn(jde: f64) -> VSOP87Elements

Calculates VSOP87 solution for Saturn.

This function calculates the VSOP87 solution (heliocentric ecliptic orbital elements for the equinox J2000.0) for the planet Saturn. 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 Saturn. In this case, we calculate the orbit of Saturn in December 29th, 1599.

let vsop87_elts = vsop87::saturn(2305445.0);

assert!(vsop87_elts.a > 9.5727100002 && vsop87_elts.a < 9.5727100004);
assert!(vsop87_elts.l > 3.5107821038 && vsop87_elts.l < 3.5107821040);
assert!(vsop87_elts.k > -0.0048218813 && vsop87_elts.k < -0.0048218811);
assert!(vsop87_elts.h > 0.0575514202 && vsop87_elts.h < 0.0575514204);
assert!(vsop87_elts.q > -0.0090348990 && vsop87_elts.q < -0.0090348988);
assert!(vsop87_elts.p > 0.01965756 && vsop87_elts.p < 0.01965832);

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);