<p>We can start by converting between equatorial coordinates (right ascension <span class="math-container">$\alpha$</span> and declination <span class="math-container">$\delta$</span>) to horizontal coordinates (azimuth <span class="math-container">$\text{Az}$</span> and elevation/altitude <span class="math-container">$a$</span>). 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 <span class="math-container">$X$</span>, the north celestial pole <span class="math-container">$P$</span>, and the zenith angle of the observer <span class="math-container">$Z$</span>. Just by the definitions of elevation and declination, you should be able to see that the distance between <span class="math-container">$X$</span> and <span class="math-container">$Z$</span> is <span class="math-container">$90^{\circ}-a$</span> and the distance between <span class="math-container">$X$</span> and <span class="math-container">$P$</span> is <span class="math-container">$90^{\circ}-\delta$</span>. The distance between <span class="math-container">$P$</span> and <span class="math-container">$Z$</span> is then <span class="math-container">$90^{\circ}-\phi$</span>, with <span class="math-container">$\phi$</span> the latitude of the observer. Here's <a href="http://star-www.st-and.ac.uk/%7Efv/webnotes/chapter7.htm" rel="noreferrer">a nice diagram showing the geometry</a>:</p>
<p><a href="https://i.sstatic.net/tRHtEl.png" rel="noreferrer"><img src="https://i.sstatic.net/tRHtEl.png" alt="enter image description here" /></a>
<br>
<sup>Image credit: Fiona Vincent, University of St. Andrews.</sup></p>
<p>The angle between <span class="math-container">$PZ$</span> and <span class="math-container">$PX$</span> is the hour angle, <span class="math-container">$H$</span>. We can plug all of the above into <a href="https://en.wikipedia.org/wiki/Spherical_law_of_cosines" rel="noreferrer">the spherical law of cosines</a> to get
<span class="math-container">$$\cos(90^{\circ}-a)=\cos(90^{\circ}-\delta)\cos(90^{\circ}-\phi)+\sin(90^{\circ}-\delta)\sin(90^{\circ}-\phi)\cos(H)$$</span>
or
<span class="math-container">$$\sin a=\sin\delta\sin\phi+\cos\delta\cos\phi\cos H$$</span>
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 <span class="math-container">$a=0$</span>; that's just the definition of the horizon and any object on it. This in turn means that <span class="math-container">$\sin a=0$</span>, so our equation becomes
<span class="math-container">$$0=\sin\delta\sin\phi+\cos\delta\cos\phi\cos H\implies-\sin\delta\sin\phi=\cos\delta\cos\phi\cos H$$</span>
Rearranging this gives
<span class="math-container">$$\cos H=-\tan\delta\tan\phi$$</span>
as requested.</p>

CC BY-SA 4.0
2021-07-11T08:26:20.050Z
I know zilch about astronomy, but came upon the sunrise equation the other day and found it intriguing. It never crossed my mind the thing would be derived from the conversion of two coordinate systems, which is rather neat. Thanks.
Peter
CC BY-SA 4.0
2021-07-13T12:09:11.480Z
That's a first approximation. Sunrise comes earlier than that and sunset later because of refraction and the size of the solar disk. Calculating H is also trickier because of the equation of time. The wikipedia article, near the end, discusses some of the complexities.
stretch
CC BY-SA 4.0
2021-07-10T23:28:34.650Z
2021-07-10T23:28:34.650Z
HDE 226868
<p>I'm looking for a reasonably straightforward derivation of the sunrise equation<span class="math-container">$$\cos\omega=-\tan\phi\tan\delta$$</span>as referenced in the Wikipedia article <a href="https://en.wikipedia.org/wiki/Sunrise_equation" rel="noreferrer">here</a>. I've dipped into <em>Astronomical Algorithms</em> 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 <span class="math-container">$h=0$</span> in his earlier equation 13.6, which he simply states as if obvious. I've also found an online paper called <em><a href="https://arxiv.org/abs/2009.07094" rel="noreferrer">Derivation of Solar Position Formulae</a></em> by Ross Ure Anderson, where there is a fuller derivation (starts on page 11), but which I'm having trouble following.</p>

CC BY-SA 4.0
2021-07-10T19:46:29.337Z
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).
HDE 226868
CC BY-SA 4.0
2021-07-10T20:21:11.730Z
@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).
Peter
<positional-astronomy><declination><sunrise><sunset>
Straightforward derivation of the sunrise equation
Peter
# Straightforward derivation of the sunrise equation

(Asked by: username_0 on 2021-07-10)

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](https://en.wikipedia.org/wiki/Sunrise_equation). 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](https://arxiv.org/abs/2009.07094)* by Ross Ure Anderson, where there is a fuller derivation (starts on page 11), but which I'm having trouble following.

**Tags:** positional-astronomy, declination, sunrise, sunset
> **Comments:**
> **username_1**: 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).  
> **username_0**: @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).  

---

## 1 answers

### Answer by username_1 on 2021-07-10. Score: 13 | Accepted answer

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](http://star-www.st-and.ac.uk/%7Efv/webnotes/chapter7.htm):

[![enter image description here](https://i.sstatic.net/tRHtEl.png)](https://i.sstatic.net/tRHtEl.png)
  
Image credit: Fiona Vincent, University of St. Andrews.

The angle between $PZ$ and $PX$ is the hour angle, $H$. We can plug all of the above into [the spherical law of cosines](https://en.wikipedia.org/wiki/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.

> **Comments:**
> **username_0**: I know zilch about astronomy, but came upon the sunrise equation the other day and found it intriguing. It never crossed my mind the thing would be derived from the conversion of two coordinate systems, which is rather neat. Thanks.  
> **username_2**: That's a first approximation. Sunrise comes earlier than that and sunset later because of refraction and the size of the solar disk. Calculating H is also trickier because of the equation of time. The wikipedia article, near the end, discusses some of the complexities.  

---

