Skip to content

Sunrise/sunset times by conditions #17

Answered by jpb10
Macintosh-Fan asked this question in Q&A
Discussion options

You must be logged in to vote

You can account for all these factors by providing a custom altitude argument.

The default value of -0.8333 degrees corrects for the Sun's half-diameter and refraction at the horizon.

Example sketch SunriseSunsetAltitude shows how to correct for the dip in the horizon (at a height above sea level).

You are free to use any model applicable to your location and weather.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Macintosh-Fan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants