/* Constants for eph_lookup. Don't casually change these, as the code for lookup was translated from FORTRAN and depends on these values. */ #define EPH_MERCURY 1 #define EPH_VENUS 2 #define EPH_EARTH 3 #define EPH_MARS 4 #define EPH_JUPITER 5 #define EPH_SATURN 6 #define EPH_URANUS 7 #define EPH_NEPTUNE 8 #define EPH_PLUTO 9 #define EPH_MOON 10 #define EPH_SUN 11 #define EPH_SSBARY 12 /* Solar-system barycenter */ #define EPH_EMBARY 13 /* Earth/moon barycenter */ /* eph_open opens an ephemeris, returning an opaque handle, which is passed to all the other functions. */ extern void *eph_open(const char *); /* eph_close closes an open ephemeris. The handle goes invalid and must not be used again. */ extern void eph_close(void *); /* eph_lookup looks up the position of `targ' relative to `cent', at the given date/time; it fills in a six-element output vector with X, Y, Z, vX, vY, vZ values (in AU and AU/day). Arguments: eph_lookup(void *handle, double date, int targ, int cent, double *out) targ and cent are EPH_xxx constants from above. Return value is 0 for success, or one of the EPHL_ERR_xxx constants. On error, the output vector may or may not have been modified. */ extern int eph_lookup(void *, double, int, int, double *); #define EPHL_ERR_RANGE 1 /* time value is out of range of ephemeris */