next up previous contents
Next: Function: beam_pattern() Up: Galactic Modelling Previous: Example: galactic2equatorial program   Contents


Function: equatorial_to_horizon()

void equatorial_to_horizon(float alpha, float delta, float time, float lat,
			   float *azi, float *alt)

This routine converts the coordinates of an object from the equatorial system--right ascension $\alpha$ and declination $\delta$--to the horizon system--azimuth $A$ and altitude $a$--for a given time and latitude. The arguments are:

alpha: Input. The right ascension $\alpha$ (radians).
delta: Input. The declination $\delta$ (radians).
time: Input. The time of day (sidereal seconds).
lat: Input. The latitude $\lambda$ North (radians).
azi: Output. The azimuth $A$ (radians clockwise from North).
alt: Output. The altitude $a$ (radians up from the horizon).

The transformation is the following:

\begin{displaymath}
a = \arcsin[ \sin\delta\, \sin\lambda + \cos\delta\, \cos\lambda\, \cos h ]
\end{displaymath} (12.5.282)

and
\begin{displaymath}
A = \arctan\left[ \frac{-\cos\delta\, \cos\lambda\, \sin h}
{\sin\delta - \sin\lambda\, \sin a} \right]
\end{displaymath} (12.5.283)

where $\lambda$ is the latitude and $h=\mbox{(local sidereal time)}-\alpha$ is the hour angle.

Author: Jolien Creighton, jolien@tapir.caltech.edu
Comments: This routine is adapted from the method given in: Peter Duffet-Smith Practical Astronomy with Your Calculator, 3rd edition, (Cambridge University Press, 1988). I have assumed that the user either (a) has correctly precessed the equatorial coordinates, or (b) doesn't care.


next up previous contents
Next: Function: beam_pattern() Up: Galactic Modelling Previous: Example: galactic2equatorial program   Contents
Bruce Allen 2000-11-19