[][src]Function vsop87::vsop87b::jupiter

pub fn jupiter(jde: f64) -> SphericalCoordinates

Calculates VSOP87B solution for Jupiter.

This function calculates the VSOP87B solution (heliocentric ecliptic spherical coordinates for the equinox J2000.0) for the planet Jupiter. 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 Jupiter in the solar system using spherical coordinates. In this case, we calculate where Jupiter was in December 29th, 1599.

use vsop87::vsop87b;

let coordinates = vsop87b::jupiter(2305445.0);

assert!(coordinates.longitude() > 2.4323346133 && coordinates.longitude() < 2.4323346135);
assert!(coordinates.latitude() > 0.0145957281 && coordinates.latitude() < 0.0145957283);
assert!(coordinates.distance() > 5.3439451 && coordinates.distance() < 5.3439459);