SuperNOVAS v1.2
The NOVAS C library, made better
|
Functions | |
short | earth_sun_calc (double jd_tdb, enum novas_planet body, enum novas_origin origin, double *position, double *velocity) |
short | earth_sun_calc_hp (const double jd_tdb[2], enum novas_planet body, enum novas_origin origin, double *position, double *velocity) |
void | enable_earth_sun_hp (int value) |
short | solarsystem (double jd_tdb, short body, short origin, double *position, double *velocity) |
short | solarsystem_hp (const double jd_tdb[2], short body, short origin, double *position, double *velocity) |
int | sun_eph (double jd, double *ra, double *dec, double *dis) |
SuperNOVAS plane calculator functions for the Earth and Sun only, with an orbital model based on the DE405 ephemerides by JPL.
Based on the NOVAS C Edition, Version 3.1:
U. S. Naval Observatory
Astronomical Applications Dept.
Washington, DC
http://www.usno.navy.mil/USNO/astronomical-applications
short earth_sun_calc | ( | double | jd_tdb, |
enum novas_planet | body, | ||
enum novas_origin | origin, | ||
double * | position, | ||
double * | velocity | ||
) |
Provides the position and velocity of the Earth and Sun only at epoch 'jd_tdb' by evaluating a closed-form theory without reference to an external file. This function can also provide the position and velocity of the Sun.
REFERENCES:
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
body | NOVAS_EARTH (3) or NOVAS_SUN (10) only. | |
origin | NOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to return positions and velocities. (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
[out] | position | [AU] Position vector of 'body' at 'tjd'; equatorial rectangular coordinates in AU referred to the mean equator and equinox of J2000.0. |
[out] | velocity | [AU/day] Velocity vector of 'body' at 'tjd'; equatorial rectangular system referred to the mean equator and equinox of J2000.0, in AU/Day. |
References NOVAS_BARYCENTER, NOVAS_EARTH, NOVAS_PLANETS, NOVAS_SSB, NOVAS_SUN, precession(), radec2vector(), sun_eph(), T0, and TWOPI.
short earth_sun_calc_hp | ( | const double | jd_tdb[2], |
enum novas_planet | body, | ||
enum novas_origin | origin, | ||
double * | position, | ||
double * | velocity | ||
) |
It may provide the position and velocity of the Earth and Sun, the same as solarsystem_earth_sun(), if enable_earth_sun_hp() is set to true (non-zero). Otherwise, it will return with an error code of 3, indicating that high-precision calculations are not provided by this implementation.
NOTES:
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
body | NOVAS_EARTH (3) or NOVAS_SUN (10) only. | |
origin | NOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to return positions and velocities. (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
[out] | position | [AU] Position vector of 'body' at 'tjd'; equatorial rectangular coordinates in AU referred to the mean equator and equinox of J2000.0. |
[out] | velocity | [AU/day] Velocity vector of 'body' at 'tjd'; equatorial rectangular system referred to the mean equator and equinox of J2000.0, in AU/Day. |
References earth_sun_calc().
void enable_earth_sun_hp | ( | int | value | ) |
Specify whether the high-precision call is allowed to return a low-precision result. If set to 0 (false) solarsystem_earth_sun_hp() will return with an error code 3 indicating that a high-precision calculation is not possible. Otherise, a non-zero value (true) will let the function to be used without errors, returning the low-precison result of solarsystem_earth_sun() instead.
value | (boolean) A non-zero value enables the error-free use of the earth_sun_calc_hp() by allowing to return the low-precision result. Otherwise, earth_sun_calc_hp() will return an error code 3 indicating that the high-precision result is not available (this latter is the default behavior). |
short solarsystem | ( | double | jd_tdb, |
short | body, | ||
short | origin, | ||
double * | position, | ||
double * | velocity | ||
) |
A default implementation for regular (reduced) precision handling of major planets, Sun, Moon and the Solar-system barycenter. See DEFAULT_SOLSYS in Makefile to choose the implementation that is built into with the library as a default. Applications can define their own preferred implementations at runtime via set_planet_provider().
Since this is a function that may be provided by existing custom user implementations, we keep the original argument types for compatibility, hence 'short' instead of the more informative enums).
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date | |
body | Major planet number (or that for the Sun, Moon, or an appropriate barycenter), as defined by enum novas_planet, e.g. NOVAS_MARS (4), NOVAS_SUN (10) or NOVAS_SSB (0). (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
origin | NOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to return positions and velocities. (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
[out] | position | [AU] Position vector of 'body' at 'tjd'; equatorial rectangular coordinates in AU referred to the mean equator and equinox of J2000.0. |
[out] | velocity | [AU/day] Velocity vector of 'body' at 'tjd'; equatorial rectangular system referred to the mean equator and equinox of J2000.0, in AU/Day. |
References earth_sun_calc().
short solarsystem_hp | ( | const double | jd_tdb[2], |
short | body, | ||
short | origin, | ||
double * | position, | ||
double * | velocity | ||
) |
A default implementation for high precision handling of major planets, Sun, Moon and the Solar-system barycenter (and other barycenters). See DEFAULT_SOLSYS in Makefile to choose the implementation that is built into the library as a default. Applications can define their own preferred implementations at runtime via set_planet_provider_hp().
Since this is a function that may be provided by existing custom user implementations, we keep the original argument types for compatibility, hence 'short' instead of the more informative enums).
jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date, broken into high and low order components, respectively. Typically, as the integer and fractional parts for the highest precision. | |
body | Major planet number (or that for the Sun, Moon, or an appropriate barycenter), as defined by enum novas_planet, e.g. NOVAS_MARS (4), NOVAS_SUN (10) or NOVAS_SSB (0). (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
origin | NOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to return positions and velocities. (For compatibility with existing NOVAS C compatible user implementations, we keep the original NOVAS C argument type here). | |
[out] | position | [AU] Position vector of 'body' at 'tjd'; equatorial rectangular coordinates in AU referred to the mean equator and equinox of J2000.0. |
[out] | velocity | [AU/day] Velocity vector of 'body' at 'tjd'; equatorial rectangular system referred to the mean equator and equinox of J2000.0, in AU/Day. |
References earth_sun_calc_hp().
int sun_eph | ( | double | jd, |
double * | ra, | ||
double * | dec, | ||
double * | dis | ||
) |
Computes equatorial spherical coordinates of Sun referred to the mean equator and equinox of date.
Quoted accuracy is 2.0 + 0.03 * T2 arcsec, where T is measured in units of 1000 years from J2000.0. See reference.
The obliquity equation is updated to equation 5.12 of the second reference.
The linear fit to DE405 primarily corrects for the difference between "old" (Lieske) and "new" (IAU 2006) precession. The difference, new - old, is -0.3004 arcsec/cy.
REFERENCES:
jd | [day] jd (double) Julian date on TDT or ET time scale. | |
[out] | ra | [h] Right ascension referred to mean equator and equinox of date (hours). |
[out] | dec | [deg] Declination referred to mean equator and equinox of date (degrees). |
[out] | dis | [AU] Geocentric distance (AU). |