4. Important Functions in NOVAS-C
APP_STAR
short int app_star (double tjd, short int earth, fk5_entry *star,
double *ra, double *dec)
PURPOSE:
Computes the apparent place of a star at date 'tjd', given its
mean place, proper motion, parallax, and radial velocity for
J2000.0.
INPUT
ARGUMENTS:
tjd (double)
TDT Julian date for apparent place.
earth (short int)
Body identification number for the Earth.
*star (struct fk5_entry)
Pointer to catalog entry structure (defined in novas.h).
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'.
RETURNED
VALUE:
(short int)
0...Everything OK.
>0...Error code from function 'solarsystem'.
Discussion:
This function computes the apparent place of a star. The word "star" as used here refers to any object
outside the solar system. If the values of
promora
,
promodec
,
parlax
, or
radvel
within structure
star
are unknown (or zero within the errors of measurement), the calling program should set them to
earth
that the calling program must supply to
app_star.
The input mean place at standard epoch J2000.0 is assumed to be the true mean place, similar to the
mean places in the FK5, and not contain the so-called "E-terms".
Efficiency is maximized when successive calls to app_star have the same value for
tjd
, since some
quantities which are functions only of time are thereby saved and reused.