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

Functions

short ephem_close (void)
 
short ephem_open (const char *ephem_name, double *jd_begin, double *jd_end, short *de_number)
 
short planet_ephemeris (const double tjd[2], enum de_planet target, enum de_planet origin, double *position, double *velocity)
 

Detailed Description

Author
G. Kaplan and A. Kovacs
Deprecated
This NOVAS C planetrary ephemeris reader supports older JPL planetary ephemerides DE200 – DE421 only. We recommend using the SuperNOVAS plugin interfaces to the CALCEPH or CSPICE libraries instead, for more complete, more-up-to-date, and more generalized ephemeris support. See solsys-calceph.c, solsys-cspice.c

SuperNOVAS planetary ephemeris manager for the planet_eph_manager() and planet_eph_manager_hp() functions.

This module exposes a lot of its own internal state variables globally. You probably should not access them from outside this module, but they are kept ad globals to ensure compatibility with existing NOVAS C applications that might access those values.

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

See also
solsys1.c
solsys-calceph.c, solsys-cspice.c

Function Documentation

◆ ephem_close()

short ephem_close ( void )
Deprecated
This NOVAS C planetary ephemeris reader supports older JPL planetary ephemerides DE200 – DE421 only. We recommend using the SuperNOVAS plugin interfaces to the CALCEPH or CSPICE libraries instead, for more complete, more-up-to-date, and more generalized ephemeris support. See solsys-calceph.c, solsys-cspice.c

Closes a JPL planetary ephemeris file and frees the memory.

REFERENCES:

  1. Standish, E.M. and Newhall, X X (1988). "The JPL Export Planetary Ephemeris"; JPL document dated 17 June 1988.

NOTES:

  1. Includes fix for the known resource leak issue in NOVAS C 3.1.
Returns
0 if the file successfully closed or was closed already, or else EOF.
See also
ephem_open()

◆ ephem_open()

short ephem_open ( const char * ephem_name,
double * jd_begin,
double * jd_end,
short * de_number )
Deprecated
This NOVAS C planetary ephemeris reader supports older JPL planetary ephemerides DE200 – DE421 only. We recommend using the SuperNOVAS plugin interfaces to the CALCEPH or CSPICE libraries instead, for more complete, more-up-to-date, and more generalized ephemeris support. See solsys-calceph.c, solsys-cspice.c

This function opens a JPL planetary ephemeris file and sets initial values. This function must be called prior to calls to the other JPL ephemeris functions.

REFERENCES:

  1. Standish, E.M. and Newhall, X X (1988). "The JPL Export Planetary Ephemeris"; JPL document dated 17 June 1988.
Parameters
ephem_nameName/path of the direct-access ephemeris file.
[out]jd_begin[day] Beginning Julian date of the ephemeris file. It may be NULL if not required.
[out]jd_end[day] Ending Julian date of the ephemeris file. It may be NULL if not required.
[out]de_numberDE number of the ephemeris file opened. It may be NULL if not required.
Returns
0 if successful, or -1 if any of the arhuments is NULL, or else 1 if the file could not be opened, 2–10 if (= line + 1) if there was an error reading the header line, or 11 if the type of DE file is not supported.
See also
ephem_close()

◆ planet_ephemeris()

short planet_ephemeris ( const double tjd[2],
enum de_planet target,
enum de_planet origin,
double * position,
double * velocity )
Deprecated
This NOVAS C plnaetary ephemeris reader supports older JPL planetary ephemerides DE200 – DE421 only. We recommend using the SuperNOVAS plugin interfaces to the CALCEPH or CSPICE libraries, for more complete, more-up-to-date, and more generalized ephemeris support. See solsys-calceph.c, solsys-cspice.c

Retrieves planet position and velocity data from the JPL planetary ephemeris.

(If nutations are desired, set 'target' = 13; 'center' will be ignored on that call.)

REFERENCES:

  1. Standish, E.M. and Newhall, X X (1988). "The JPL Export Planetary Ephemeris"; JPL document dated 17 June 1988.
Parameters
tjd[day] Two-element array containing the Julian date, which may be split any way (although the first element is usually the "integer" part, and the second element is the "fractional" part). Julian date is in the TDB or "T_eph" time scale.
targetThe integer code (see above) for the planet for which coordinates are requested, e.g. DE_JUPITER.
originThe integer code of the planet or position relative to which coordinates are measured.
[out]position[AU] Position vector array of target relative to center.
[out]velocity[AU/day] Velocity vector array of target relative to center.
Returns
0 if successful, or -1 if one of the pointer arguments is NULL, or else the error returned from state().
See also
ephem_open()