[][src]Function vsop87::uranus

pub fn uranus(jde: f64) -> VSOP87Elements

Calculates VSOP87 solution for Uranus.

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

let vsop87_elts = vsop87::uranus(2232395.0);

assert!(vsop87_elts.a > 19.2497356422 && vsop87_elts.a < 19.2497356424);
assert!(vsop87_elts.l > 4.5777275752 && vsop87_elts.l < 4.5777275754);
assert!(vsop87_elts.k > -0.0466529112 && vsop87_elts.k < -0.0466529110);
assert!(vsop87_elts.h > 0.0051308956 && vsop87_elts.h < 0.0051308958);
assert!(vsop87_elts.q > 0.0019206656 && vsop87_elts.q < 0.0019206658);
assert!(vsop87_elts.p > 0.00655819 && vsop87_elts.p < 0.00655895);

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