Solution (source code)

= Solution

Use <azimuth> measured from north toward west, and positive <hour angle> westward. These conventions are forced by the signs in the coordinate formulae. In the diagram the observer is at $O$, the local vertical meets the <celestial sphere> at the <zenith> $Z$, and the north <celestial pole> is $P$. The <astronomical horizon> is perpendicular to $OZ$; the <celestial equator> is perpendicular to $OP$. Their intersections with the <celestial meridian> give the north horizon point and the upper equatorial meridian point.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/iii/paper-338-celestial-sphere.png]
{title=The <celestial sphere> with horizon and equatorial coordinates}

The north <celestial pole> has <altitude> $\theta$; thus the <angle> between $OP$ and $OZ$ is $90^\circ-\theta$. Project $X$ along its vertical <great circle> onto the <astronomical horizon> at $H$: the arc $HX$ is the <altitude> $\gamma$, and the westward horizon arc from north to $H$ is the <azimuth> $\eta$. Project $X$ along its hour circle onto the <celestial equator> at $Q$: the arc $QX$ is the <declination> $\delta$, and the westward equatorial arc from the upper <celestial meridian> to $Q$ is the <hour angle> $h$. Equivalently the triangle on the <celestial sphere> $PZX$ has sides $PZ=90^\circ-\theta$, $PX=90^\circ-\delta$ and $ZX=90^\circ-\gamma$. \b[All five <angles> refer to arcs on their specified reference circles, not arbitrary <angles> in the projected drawing.]