1

sin alt = sin Φ sin δ + cos Φ cos δ cos HA


2

sin δ = sin Φ sin alt + cos Φ cos alt cos Az


Using the equations above, we can work out a simple formula for the hour angle of an object when it rises or sets. When an object rises or sets, it's altitude is 0°. Substituting that into equation 1, we find
sin 0 = 0 = sin Φ sin δ + cos Φ cos δ cos HA
or
cos HA =  sin δ sin Φ / cos δ cos Φ
which we rewrite
cos HA =  tan δ tan Φ
A worked example
From Sheffield, we will calculate what time the Sun rises and sets on the Winter Solstice. The Sun's declination on this date is 23.45° and the latitude of Sheffield is roughly 53°. Therefore,
cos HA =  tan (23.45) tan (53) = 0.57
Which gives an HA at sunset of 55°, or 24*55/360 = 3.7 hours = 3 hours 40 minutes. Since the Sun is on the observer's meridian at 12:00 (noon), the time of sunset is 3 hours and 40 minutes after that, or 15:40.
Since sunrisenoon takes the same amount of time as sunsetnoon, sunrise is 3 hours 40 minutes before noon, or at 8:20. On the Winter Solstice there is 7 hours and 20 minutes of sunshine, at most.
Ambiguity
This worked example illustrates one very important point. There are two possible hour angles when a star has an altitude of zero. There are two possible azimuths when a star has a given altitude. The equations in these notes will only give you one of these hour angles or azimuth. You have to use your reason to see if it is the rising or setting hour angle and azimuth and use symmetry to find the answer you need.
For example, the calculation above gave us the setting hour angle. We used symmetry to work out the rising hour angle.