[][src]Function vsop87::vsop87b::saturn

pub fn saturn(jde: f64) -> SphericalCoordinates

Calculates VSOP87B solution for Saturn.

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

use vsop87::vsop87b;

let coordinates = vsop87b::saturn(2268920.0);

assert!(coordinates.longitude() > 0.9812189104 && coordinates.longitude() < 0.9812189106);
assert!(coordinates.latitude() > -0.0369435534 && coordinates.latitude() < -0.0369435532);
assert!(coordinates.distance() > 9.0669210 && coordinates.distance() < 9.0669218);