This file contains functions for performing coordinate transformations. More...
Functions | |
void | ae_rect_to_polar (const double rect[], double *ra, double *dec, double *radius) |
Convert an equatorial rectangular unit vector to ra/dec/radius. More... | |
void | ae_rect_to_polar_with_jd (double pp[], double jd, char ofdate, double polar[]) |
Convert equatorial rectangular coordinates to polar coordinates. More... | |
void | ae_polar_to_rect (double ra, double dec, double radius, double rect[]) |
Convert ra/dec/radius to a rectangular vector. More... | |
void | ae_radec_to_altaz (double last, double glat, double ra, double dec, double *alt, double *az) |
Convert ra/dec to alt/az. More... | |
void | ae_altaz_to_radec (double last, double glat, double alt, double az, double *ra, double *dec) |
Convert alt/az to ra/dec. More... | |
void | ae_radec_to_gal (double ra, double dec, double *l, double *b, int fk5) |
Convert ra/dec to l/b (galactic coordinates). More... | |
void | ae_gal_to_radec (double l, double b, double *ra, double *dec, int fk5) |
Convert l/b (galactic coordinates) to ra/dec. More... | |
void | ae_geocentric_lat (double glat, double height, double *tlat, double *trho) |
Calculate the geocentric latitude and the distance to the earth's centre. More... | |
void | ae_delta_q (double q0[], double q1[], double *dra, double *ddec) |
Convert change in rectangular coordinatates to change in ra/dec. More... | |
This file contains functions for performing coordinate transformations.
void ae_altaz_to_radec | ( | double | last, |
double | glat, | ||
double | alt, | ||
double | az, | ||
double * | ra, | ||
double * | dec | ||
) |
Convert alt/az to ra/dec.
last | The local aparent sidereal time, in degrees. |
glat | The geodetic latitude, in degrees. |
alt | The altitude, in degrees. |
az | The azimuth, in degrees. |
ra | For returning the right ascension, in degrees. |
dec | For returning the declination, in degrees. |
References AE_DTR, ae_mod_360(), AE_RTD, and ae_zatan2().
Referenced by ae_topocentric().
void ae_delta_q | ( | double | q0[], |
double | q1[], | ||
double * | dra, | ||
double * | ddec | ||
) |
Convert change in rectangular coordinatates to change in ra/dec.
For changes greater than about 0.1 degree, the coordinates are converted directly to ra and dec and the results subtracted. For small changes, the change is calculated to first order by differentiating to obtain
where
The change in declination is
where
q0 | The initial object - earth vector. |
q1 | The vector after motion or aberration. |
dra | The change in right ascension. |
ddec | The change in declination. |
References ae_zatan2().
void ae_gal_to_radec | ( | double | l, |
double | b, | ||
double * | ra, | ||
double * | dec, | ||
int | fk5 | ||
) |
Convert l/b (galactic coordinates) to ra/dec.
l | The galactic longitude, in degrees. |
b | The galactic latitude, in degrees. |
ra | For returning the right ascension, in degrees. |
dec | For returning the declination, in degrees. |
fk5 | If non-zero, assume FK5 system (i.e., J2000 compatible); if zero, use the old FK4 (B1950 compatible) galactic pole. |
References AE_DTR, ae_mod_360(), and AE_RTD.
void ae_geocentric_lat | ( | double | glat, |
double | height, | ||
double * | tlat, | ||
double * | trho | ||
) |
Calculate the geocentric latitude and the distance to the earth's centre.
This function uses the reciprocal of flattening and the earth's radius (or, more precisely, semi-major axis) from from the WGS84 definition. (See AE_FLAT and AE_R_EARTH.)
glat | The geodetic latitude of the observer, in degrees. |
height | The height of the observer above sea level, in metres. |
tlat | For returning the geocentric latitude, in degrees. |
trho | For returning the distance to the earth's centre, in earth radii. |
References AE_DTR, AE_FLAT, AE_R_EARTH, and AE_RTD.
Referenced by aes_topocentric().
void ae_polar_to_rect | ( | double | ra, |
double | dec, | ||
double | radius, | ||
double | rect[] | ||
) |
Convert ra/dec/radius to a rectangular vector.
ra | The right ascension, in degrees. |
dec | The declination, in degrees. |
radius | The radius; the units of radius will determine the units of the output. |
rect | For returning the rectangular vector. |
References AE_DTR.
Referenced by ae_coord_to_constel_index(), ae_phys_pole(), ae_subobs_point(), and aes_subobs_point().
void ae_radec_to_altaz | ( | double | last, |
double | glat, | ||
double | ra, | ||
double | dec, | ||
double * | alt, | ||
double * | az | ||
) |
Convert ra/dec to alt/az.
last | The local aparent sidereal time, in degrees. |
glat | The geodetic latitude, in degrees. |
ra | The right ascension, in degrees. |
dec | The declination, in degrees. |
alt | For returning the altitude, in degrees. |
az | For returning the azimuth, in degrees. |
References AE_DTR, AE_RTD, and ae_zatan2().
Referenced by ae_topocentric().
void ae_radec_to_gal | ( | double | ra, |
double | dec, | ||
double * | l, | ||
double * | b, | ||
int | fk5 | ||
) |
Convert ra/dec to l/b (galactic coordinates).
ra | The right ascension, in degrees. |
dec | The declination, in degrees. |
l | For returning the galactic longitude, in degrees. |
b | For returning the galactic latitude, in degrees. |
fk5 | If non-zero, assume FK5 system (i.e., J2000 compatible); if zero, use the old FK4 (B1950 compatible) galactic pole. |
References AE_DTR, ae_mod_360(), and AE_RTD.
void ae_rect_to_polar | ( | const double | rect[], |
double * | ra, | ||
double * | dec, | ||
double * | radius | ||
) |
Convert an equatorial rectangular unit vector to ra/dec/radius.
rect | An equatorial rectangular vector. |
ra | For returning the right ascension, in degrees. |
dec | For returning the declination, in degrees. |
radius | For returning the radius. Set to NULL if you do not need this value. |
References AE_RTD, and ae_zatan2().
Referenced by ae_geocentric(), ae_geocentric_from_cat(), ae_geocentric_moon_from_orbit(), and ae_subobs_point().
void ae_rect_to_polar_with_jd | ( | double | pp[], |
double | jd, | ||
char | ofdate, | ||
double | polar[] | ||
) |
Convert equatorial rectangular coordinates to polar coordinates.
This routine is similar to ae_rect_to_polar(), except that it also performs //! any necessary precession.
pp | The equatorial rectangular coordinates. |
jd | The Julian date. |
ofdate | If 1, precess from J2000.0 to jd . |
polar | For returning the polar coordinates. |
References ae_epsilon(), AE_FROM_J2000, ae_precess(), AE_STR, and ae_zatan2().
AEPHEM documentation generated by Doxygen v1.8.9.1 at Sat Aug 1 2015 15:02:46. |