Alt/AZ to Hour Angle and Declination

Given Latitude, and Alt/AZ coordinates. The Hour Angle and Declination can be computed. Further, given Greenwich Sidereal Time, the Hour Angle can be converted to Right Ascension. If the Alt/Az coordinates are from an observation, you will likely need to correct \(h\) for refraction.

$$ \begin{align*} \tan H &= \frac{-\sin A}{\tan h \cos \phi - \cos A \sin \phi} \\ \sin \delta &= \sin \phi \sin h + \cos \phi \cos h \cos A \end{align*} $$ \(h\) Alt (height)
\(A\) Azimuth
\(\phi\) Latitude
\(\delta\) Declination
\(H\) Hour Angle