# Straightforward derivation of the sunrise equation

I'm looking for a reasonably straightforward derivation of the sunrise equation$$\cos\omega=-\tan\phi\tan\delta$$as referenced in the Wikipedia article here. I've dipped into Astronomical Algorithms by Jean Meeus, where the formula is given on page 101. However, as far as I can see, the only explanation Meeus gives is by setting $$h=0$$ in his earlier equation 13.6, which he simply states as if obvious. I've also found an online paper called Derivation of Solar Position Formulae by Ross Ure Anderson, where there is a fuller derivation (starts on page 11), but which I'm having trouble following.

• Would you mind specifying what $h$ is? My guess is it's the elevation, but it would be nice to know for sure. Also, at what point would you like the derivation to start? It's not tricky to figure out if you can start from the conversion formulae between equatorial coordinates and local coordinates (i.e. azimuth and elevation). Jul 10, 2021 at 19:46
• @HDE226868 - His equation 13.6 is $\sin h=\sin\phi\sin\delta+\cos\phi\cos\delta\cos H$, where $h$ is “altitude, positive above the horizon, negative below.” $H$ is the local hour angle ($\omega$ in the Wikipedia equation). Jul 10, 2021 at 20:21

We can start by converting between equatorial coordinates (right ascension $$\alpha$$ and declination $$\delta$$) to horizontal coordinates (azimuth $$\text{Az}$$ and elevation/altitude $$a$$). If you want to go past this, feel free to skip to the end. We draw a spherical triangle on the sky, with the three points being the object of interest at a given point $$X$$, the north celestial pole $$P$$, and the zenith angle of the observer $$Z$$. Just by the definitions of elevation and declination, you should be able to see that the distance between $$X$$ and $$Z$$ is $$90^{\circ}-a$$ and the distance between $$X$$ and $$P$$ is $$90^{\circ}-\delta$$. The distance between $$P$$ and $$Z$$ is then $$90^{\circ}-\phi$$, with $$\phi$$ the latitude of the observer. Here's a nice diagram showing the geometry:
The angle between $$PZ$$ and $$PX$$ is the hour angle, $$H$$. We can plug all of the above into the spherical law of cosines to get $$\cos(90^{\circ}-a)=\cos(90^{\circ}-\delta)\cos(90^{\circ}-\phi)+\sin(90^{\circ}-\delta)\sin(90^{\circ}-\phi)\cos(H)$$ or $$\sin a=\sin\delta\sin\phi+\cos\delta\cos\phi\cos H$$ which is the formula you say Meeus gave. Now, at sunrise or sunset, the Sun appears at the horizon, meaning it has an elevation of $$a=0$$; that's just the definition of the horizon and any object on it. This in turn means that $$\sin a=0$$, so our equation becomes $$0=\sin\delta\sin\phi+\cos\delta\cos\phi\cos H\implies-\sin\delta\sin\phi=\cos\delta\cos\phi\cos H$$ Rearranging this gives $$\cos H=-\tan\delta\tan\phi$$ as requested.