SuperNOVAS v1.5
The NOVAS C library, made better
Loading...
Searching...
No Matches
solsys-ephem.c File Reference

Major planet ephemeris lookup via the function, which was configured by set_ephem_provider(). More...

Functions

short planet_ephem_provider (double jd_tdb, enum novas_planet body, enum novas_origin origin, double *restrict position, double *restrict velocity)
 Major planet ephemeris data via the same generic ephemeris provider that is configured by set_ephem_provider() prior to calling this routine.
 
short planet_ephem_provider_hp (const double jd_tdb[restrict 2], enum novas_planet body, enum novas_origin origin, double *restrict position, double *restrict velocity)
 Major planet ephemeris data via the same generic ephemeris provider that is configured by set_ephem_provider() prior to calling this routine.
 

Detailed Description

Major planet ephemeris lookup via the function, which was configured by set_ephem_provider().

Date
Created on Jan 29, 2024
Author
Attila Kovacs
See also
ephemeris.c, solsys-calceph.c, solsys-cspice.c, orbital.c

Function Documentation

◆ planet_ephem_provider()

short planet_ephem_provider ( double jd_tdb,
enum novas_planet body,
enum novas_origin origin,
double *restrict position,
double *restrict velocity )

Major planet ephemeris data via the same generic ephemeris provider that is configured by set_ephem_provider() prior to calling this routine.

This is the regular (reduced) precision version, but in reality it's exactly the same as the high-precision version, except for the way the TDB-based Julian date is specified.

Parameters
jd_tdb[day] Barycentric Dynamical Time (TDB) based Julian date.
bodyMajor planet number (or that for Sun, Moon, SSB...)
originNOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to report positions and velocities.
[out]position[AU] Position vector of 'body' at jd_tdb; equatorial rectangular coordinates in AU referred to the ICRS.
[out]velocity[AU/day] Velocity vector of 'body' at jd_tdb; equatorial rectangular system referred to the ICRS, in AU/day.
Returns
0 if successful, or else an error code defined by novas_planet_provider.
Since
1.0
Author
Attila Kovacs
See also
planet_ephem_provider_hp(), set_ephem_provider()

References planet_ephem_provider_hp().

◆ planet_ephem_provider_hp()

short planet_ephem_provider_hp ( const double jd_tdb[restrict 2],
enum novas_planet body,
enum novas_origin origin,
double *restrict position,
double *restrict velocity )

Major planet ephemeris data via the same generic ephemeris provider that is configured by set_ephem_provider() prior to calling this routine.

This is the highest precision version.

Parameters
jd_tdb[day] Barycentric Dynamical Time (TDB) based Julian date, split into high and low order components (e.g. integer and fractional parts) for high-precision calculations.
bodyMajor planet number (or that for Sun, Moon, SSB...)
originNOVAS_BARYCENTER (0) or NOVAS_HELIOCENTER (1) relative to which to report positions and velocities.
[out]position[AU] Position vector of 'body' at jd_tdb; equatorial rectangular coordinates in AU referred to the ICRS.
[out]velocity[AU/day] Velocity vector of 'body' at jd_tdb; equatorial rectangular system referred to the ICRS, in AU/day.
Returns
0 if successful, or else an error code of solarsystem_hp().
Since
1.0
Author
Attila Kovacs
See also
planet_ephem_provider(), set_ephem_provider()
solarsystem_hp()

References get_ephem_provider(), NOVAS_BARYCENTER, NOVAS_HELIOCENTER, NOVAS_PLANET_NAMES_INIT, NOVAS_PLANETS, NOVAS_SSB, and NOVAS_SUN.