APP_PLANET
short int app_planet (double tjd, short int planet, short int earth,
double *ra, double *dec, double *dis)
PURPOSE:
Compute the apparent place of a planet or other solar system body.
INPUT
ARGUMENTS:
tjd (double)
TDT Julian date for apparent place.
planet (short int)
Body identification number for desired planet.
earth (short int)
Body identification number for the Earth.
OUTPUT
ARGUMENTS:
*ra (double)
Apparent right ascension in hours, referred to true equator
and equinox of date 'tjd'.
*dec (double)
Apparent declination in degrees, referred to true equator
and equinox of date 'tjd'.
*dis (double)
True distance from Earth to planet at 'tjd' in AU.
RETURNED
VALUE:
(short int)
0...Everything OK.
>0...Error code from function 'solarsystem'.
Discussion:
This function computes the apparent place of a planet or other solar system body by calling function
planet
and
earth
, which identify the planet and the Earth, respectively. The
source of the rectangular coordinates is, of course, also determined by the version of solarsystem in use.
Efficiency is maximized when successive calls to app_planet have the same value for
tjd
, since some
quantities which are functions only of time are thereby saved and reused.