Function vsop87::vsop87e::sun [] [src]

pub fn sun(jde: f64) -> (f64, f64, f64)

Calculates VSOP87E solution for the Sun

This function calculates the VSOP87E solution (barycentric ecliptic rectangular coordinates for the equinox J2000.0) for the Sun. The parameter needed is the Julian Day Efemeris (JDE) for the given date. It returns, in order, a tuple with the values x, y, z of the VSOP87E solution. Those values are the rectangular coordinates of the Sun, in AU, with the barycenter of the solar system in the center and the ecliptic plane as reference z = 0.

Examples

use vsop87::vsop87e;

let (x, y, z) = vsop87e::sun(2451545.0);

assert!(x > -0.0071415280 && x < -0.0071415278);
assert!(y > -0.0027881716 && y < -0.0027881714);
assert!(z > 0.0002041 && z < 0.0002081);