25
Discussion:
This function takes the topocentric celestial coordinates of an object and computes the
equivalent local horizon coordinates.  The function uses a method that properly accounts
for polar motion, which is significant at the sub-arcsecond level.  Atmospheric refraction
can be included in the transformation, and if so, refraction is applied to both sets of
coordinates (this can be useful for telescope pointing).  Refraction, when requested, is
computed by function refract.
ra
 and 
dec
, the input topocentric right ascension and declination, can be obtained
from topo_star or topo_planet.  
tjd
 is the TT time at which the topocentric place was
computed.  The difference TTUT1 (often called 
T) is passed to the function via
argument 
deltat
.  Values of 
T are published in the annual Astronomical Almanac or
can be obtained from the National Earth Orientation Service (NEOS) home page on the
World Wide Web.  The coordinates of the pole, 
x
 and 
y
, can be obtained from IERS
Bulletins A and B, although 
x
 and 
y
 can be set to zero (0.0) if sub-arcsecond accuracy is
not needed.  (If refraction is requested, sub-arcsecond accuracy is unlikely.)
The height of the observer and meteorological conditions at the observer, contained in
structure 
location
, are used only for refraction, if 
ref_option
 is not equal to zero.
In this function, the directions 
zd
 = 0.0 (the zenith) and 
az
 = 0.0 (north) are considered
fixed in the terrestrial frame.  Specifically, the zenith is along the geodetic normal, and
north is toward the IERS reference pole.
If 
ref_option
 = 0 (no refraction), then 
rar
 = 
ra
 and 
decr
 = 
dec
.