Functions
topocentric.c File Reference

Reduce from geocentric to topocentric coordinates. More...

#include <math.h>
#include <stdlib.h>
#include "aephem.h"

Functions

void ae_topocentric (double jd_tt, double jd_ut1, double tlat, double glat, double tlong, double trho, double(*refrac)(double, void *), void *refrac_param, double dist, double *ra, double *dec)
 Apply diurnal aberrations and calculate topocentric altitude and azimuth. More...
 
void aes_topocentric (double jd_ut1, double glat, double tlong, double dist, double *ra, double *dec)
 Apply diurnal aberrations and calculate topocentric altitude and azimuth. More...
 

Detailed Description

Reduce from geocentric to topocentric coordinates.

Function Documentation

void ae_topocentric ( double  jd_tt,
double  jd_ut1,
double  tlat,
double  glat,
double  tlong,
double  trho,
double(*)(double, void *)  refrac,
void *  refrac_param,
double  dist,
double *  ra,
double *  dec 
)

Apply diurnal aberrations and calculate topocentric altitude and azimuth.

Apply diurnal aberrations and calculate topocentric altitude and azimuth, given the geocentric apparent right ascension and declination. From AA page B60 and D3.

The geocentric coordinates can be obtained from ae_geocentric_from_orbit() or a similar routine.

Parameters
jd_ttThe Julian date in TT.
jd_ut1The Julian date in UT1 measure.
tlatThe geocentric latitude of the observer, in degrees.
glatThe geodetic latitude of the observer, in degrees.
tlongThe longitude of the observer, in degrees.
trhoThe distance from the centre of the earth to the observer, in earth radii.
refracA routine that calculates refraction (pass NULL to perform no refraction correction). Its first argument is the altitude, in degrees. Its second argument is a void pointer for passing other parameters, which will be particular to the refraction algorithm. These parameters are passed via refrac_param.
refrac_paramFor passing auxiliary parameters to the refrac function. Pass NULL if refrac is not being used.
distThe geocentric distance to the object being observed, in AU. Pass 0 for extra-solar-system objects.
raThe right ascension of the object, in degrees; this routine returns the topocentric right ascension in this parameter.
decThe declination of the object, in degrees; this routine returns the topocentric declination in this parameter.

References AE_ADD_ABERRATION, ae_altaz_to_radec(), ae_diurnal_aberration(), ae_diurnal_parallax(), ae_epsilon(), ae_last(), ae_nutation_lon_ob(), and ae_radec_to_altaz().

Referenced by aes_topocentric().

void aes_topocentric ( double  jd_ut1,
double  glat,
double  tlong,
double  dist,
double *  ra,
double *  dec 
)

Apply diurnal aberrations and calculate topocentric altitude and azimuth.

This is a simplified version of ae_topocentric(), which automatically calculates jd_tt, tlat and trho. It assumes that the altitude of the observer is at sea level. It also uses no atmospheric model. It might be less efficient to use this routine if speed is required.

Parameters
jd_ut1The Julian date in UT1 measure.
glatThe geodetic latitude of the observer, in degrees.
tlongThe longitude of the observer, in degrees.
distThe geocentric distance to the object being observed, in AU. Pass 0 for extra-solar-system objects.
raThe right ascension of the object, in degrees; this routine returns the topocentric right ascension in this parameter.
decThe declination of the object, in degrees; this routine returns the topocentric declination in this parameter.

References ae_delta_t(), ae_geocentric_lat(), AE_S_PER_D, and ae_topocentric().