[−][src]Function vsop87::vsop87b::mercury
pub fn mercury(jde: f64) -> SphericalCoordinates
Calculates VSOP87B solution for Mercury.
This function calculates the VSOP87B solution (heliocentric ecliptic spherical 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 VSOP87B solution ina SphericalCoordinates
struct. Those values
are the spherical coordinates of the planet, with the Sun in the center and the ecliptic plane
as reference latitude = 0
.
Example
Given a date in JD, we can get the position of the planet Mercury in the solar system using spherical coordinates. In this case, we calculate where Mercury was in January 1st, 2000.
use vsop87::vsop87b; let coordinates = vsop87b::mercury(2451545.0); assert!(coordinates.longitude() > 4.4293481042 && coordinates.longitude() < 4.4293481044); assert!(coordinates.latitude() > -0.0527573412 && coordinates.latitude() < -0.0527573410); assert!(coordinates.distance() > 0.4664711 && coordinates.distance() < 0.4664719);