[−][src]Function vsop87::vsop87b::mars
pub fn mars(jde: f64) -> SphericalCoordinates
Calculates VSOP87B solution for Mars.
This function calculates the VSOP87B solution (heliocentric ecliptic spherical coordinates for
the equinox J2000.0) for the planet Mars. 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 Mars in the solar system using spherical coordinates. In this case, we calculate where Mars was in December 29th, 1699.
use vsop87::vsop87b; let coordinates = vsop87b::mars(2341970.0); assert!(coordinates.longitude() > 2.9897807829 && coordinates.longitude() < 2.9897807831); assert!(coordinates.latitude() > 0.0280781216 && coordinates.latitude() < 0.0280781218); assert!(coordinates.distance() > 1.6584693 && coordinates.distance() < 1.6584701);