ERFA.hd2ae(ha, dec, phi)
Equatorial to horizon coordinates: transform hour angle and declination to azimuth and altitude.
ha double hour angle (local)
dec double declination
phi double site latitude
*az double azimuth
*el double altitude (informally, elevation)
-
All the arguments are angles in radians.
-
Azimuth is returned in the range 0-2pi; north is zero, and east is +pi/2. Altitude is returned in the range +/- pi/2.
-
The latitude phi is pi/2 minus the angle between the Earth's rotation axis and the adopted zenith. In many applications it will be sufficient to use the published geodetic latitude of the site. In very precise (sub-arcsecond) applications, phi can be corrected for polar motion.
-
The returned azimuth az is with respect to the rotational north pole, as opposed to the ITRS pole, and for sub-arcsecond accuracy will need to be adjusted for polar motion if it is to be with respect to north on a map of the Earth's surface.
-
Should the user wish to work with respect to the astronomical zenith rather than the geodetic zenith, phi will need to be adjusted for deflection of the vertical (often tens of arcseconds), and the zero point of the hour angle ha will also be affected.
-
The transformation is the same as Vh = Rz(pi)*Ry(pi/2-phi)*Ve, where Vh and Ve are lefthanded unit vectors in the (az,el) and (ha,dec) systems respectively and Ry and Rz are rotations about first the y-axis and then the z-axis. (n.b. Rz(pi) simply reverses the signs of the x and y components.) For efficiency, the algorithm is written out rather than calling other utility functions. For applications that require even greater efficiency, additional savings are possible if constant terms such as functions of latitude are computed once and for all.
-
Again for efficiency, no range checking of arguments is carried out.
Last revision: 2021 February 24
ERFA release 2021-05-12
Copyright (C) 2021 IAU ERFA Board.