<p>I would like to know if there are straightforward formulas to get a latitude where the Sun on a given date reaches both 0 and 18 deg below the horizon?</p>
<p>I'm using Python/Skyfield to calculate twilight times, so I could use something like binary search between +/- 49 and 90 deg of latitude, but it would be cumbersome. So, maybe this problem could be solved in more elegant way. Any advice appreciated.</p>

CC BY-SA 4.0
2024-10-17T10:45:28.847Z
Take a look at https://en.wikipedia.org/wiki/Astronomical_coordinate_systems Under Equatorial ↔ horizontal there's an equation (from the spherical cos law) for altitude, given latitude, declination, and hour angle.
PM 2Ring
CC BY-SA 4.0
2024-10-17T13:32:10.217Z
Based on the Sun's declination (which is a function of the date), you can easily calculate the latitude where the Sun reaches any altitude. Make a diagram of the sky in the plane of the meridian like in this answer https://astronomy.stackexchange.com/questions/58639/how-to-know-if-the-sun-is-circumpolar-or-never-rises. The declination of the North Pole is 90 degrees and so on.
JohnHoltz
CC BY-SA 4.0
2024-10-17T17:49:00.060Z
The problem is not that straight foreword as the Sun moves throughout the day.  For a given latitude, there will be places where the alt of the Sun reaches 0 and places it doesn't, or even goes higher.  Also consider if atmospheric refraction, and the apparent size of the Sun, are effects you want to take into account.
Greg Miller
<earth><sunrise><sunset><skyfield><twilight>
How to calculate highest latitude where both day and night occur on a given date?
Simon
# How to calculate highest latitude where both day and night occur on a given date?

(Asked by: username_0 on 2024-10-17)

I would like to know if there are straightforward formulas to get a latitude where the Sun on a given date reaches both 0 and 18 deg below the horizon?

I'm using Python/Skyfield to calculate twilight times, so I could use something like binary search between +/- 49 and 90 deg of latitude, but it would be cumbersome. So, maybe this problem could be solved in more elegant way. Any advice appreciated.

**Tags:** earth, sunrise, sunset, skyfield, twilight

> **Comments:**
> **username_1**: Take a look at https://en.wikipedia.org/wiki/Astronomical_coordinate_systems Under Equatorial ↔ horizontal there's an equation (from the spherical cos law) for altitude, given latitude, declination, and hour angle.  
> **username_2**: Based on the Sun's declination (which is a function of the date), you can easily calculate the latitude where the Sun reaches any altitude. Make a diagram of the sky in the plane of the meridian like in this answer https://astronomy.stackexchange.com/questions/58639/how-to-know-if-the-sun-is-circumpolar-or-never-rises. The declination of the North Pole is 90 degrees and so on.  
> **username_3**: The problem is not that straight foreword as the Sun moves throughout the day.  For a given latitude, there will be places where the alt of the Sun reaches 0 and places it doesn't, or even goes higher.  Also consider if atmospheric refraction, and the apparent size of the Sun, are effects you want to take into account.  

---

## 0 answers

