pub fn mercury(jde: f64) -> RectangularCoordinates
Expand description
Calculates VSOP87A solution for Mercury.
This function calculates the VSOP87A solution (heliocentric ecliptic rectangular coordinates
for the equinox J2000.0) for the planet Mercury. The parameter needed is the Julian Day (JD)
for the given date. It returns the VSOP87A solution in a RectangularCoordinates
structure.
Those values are the rectangular coordinates of the planet, in AU, with the Sun in the center
and the ecliptic plane as reference z = 0
.
Example
Given a date in JD, we can get the position of the planet Mercury in the solar system using rectangular coordinates. In this case, we calculate where Mercury was in December 31st, 1899.
use vsop87::vsop87a;
let coordinates = vsop87a::mercury(2415020.0);
assert!(coordinates.x > -0.3897246932 && coordinates.x < -0.3897246930);
assert!(coordinates.y > -0.1502242200 && coordinates.y < -0.1502242198);
assert!(coordinates.z > 0.023618 && coordinates.z < 0.023622);