10
in turn calls other Fortran subroutines in the JPL ephemeris software package. The user
must obtain the Fortran ephemeris package, set up the binary, random-access ephemeris
file, and link the applicable JPL Fortran code with NOVAS-C. For details, see the
discussion of function solarsystem version 2 in Section 4.18.1.1.
File solsys3.c contains the software (function solarsystem, version 3) that provides
the position and velocity of the Earth or Sun without reference to an external data file.
This version of solarsystem is ideally suited for computing coordinates of stars, with
errors not exceeding several milliarcseconds. For details, see the discussion of function
solarsystem version 3 in Section 4.18.1.2.
3.2.2 Minor Planets
In order to access the USNO minor planet ephemerides (USNO/AE98), function
ephemeris calls function readeph. Function readeph is part of the USNO/AE98 minor
planet ephemeris package and is not part of, or supplied with, NOVAS-C. A dummy
version of readeph is provided in file readeph0.c. The dummy function enables
NOVAS-C to be used without the USNO minor planet ephemeris package (i.e. for
computing positions of major solar system bodies and "stars" only). To use USNO/AE98
with NOVAS-C, replace file readeph0.c provided with NOVAS-C, with readeph.c,
allocate.c, and chby.c from the USNO minor planet ephemerides software, when
compiling and linking. Minor planet ephemeris files must be created using the utilities
provided in the USNO/AE98 package. An ephemeris of major solar system bodies,
accessed by function solarsystem, is required as well.
3.2.3 Other Bodies and Ephemerides
Users can easily add access to other ephemerides by modifying function ephemeris.
The code and comments in this function should make the modification self-explanatory.
3.3 Important Data Structures
There are three important data structures used throughout NOVAS-C. They are
formally declared in file novas.h.
3.3.1 Structure
body
Structure
body
designates a celestial object.
typedef struct
{
short int type;
short int number;
char name[100];
} body;