Is your feature request related to a problem? Please describe.
When the sun sets, the sky is not immediately dark. Consequently, most of the objects are not visible until it is. The same happens when the sun is rising.
Describe the solution you'd like
A function that gives, for a date and a position, the end times of the three dawns and twilights of the day:
- civil dawn/twilight (geometric center of the Sun passes 6° under the horizon): Venus and the Moon are the only visible objects
- nautical dawn/twilight (geometric center of the Sun passes 12° under the horizon): the light of the Sun is still visible, but is not enough to hide the brightest stars.
- astronomical dawn/twilight (geometric center of the Sun passes 18° under the horizon), or full night: all the objects are visible (depending on the ambient light pollution).
The function would look like this:
def get_dawns_twilights(position: Position, date: date = date.today) -> (DawnsInformation, TwilightsInformation)
The TwilightsInformation type would be a class that handles the datetimes of the three dawns and twilights.
The DawnsInformation type may be an alias of TwilightsInformation.
Additional context
- Not sure for the name of the
Dawns/TwilightInformation class. We might want a better name.
- We might want to take profit of Slyfield's
skyfield.almanac.dark_twilight_day() function for better performances.
- Even though the function is named twilight, is should also take care about dawns the same way, as the logic is exactly the same.
Is your feature request related to a problem? Please describe.
When the sun sets, the sky is not immediately dark. Consequently, most of the objects are not visible until it is. The same happens when the sun is rising.
Describe the solution you'd like
A function that gives, for a date and a position, the end times of the three dawns and twilights of the day:
The function would look like this:
The
TwilightsInformationtype would be a class that handles thedatetimes of the three dawns and twilights.The
DawnsInformationtype may be an alias ofTwilightsInformation.Additional context
Dawns/TwilightInformationclass. We might want a better name.skyfield.almanac.dark_twilight_day()function for better performances.