2 ms·
Way too late now, but to help others this fancy Excel sheet provided by NOAA is awesome! It implements all of these equations in Excel and is pretty easily port
by antgiant 3y ago
Way too late now, but to help others this fancy Excel sheet provided by NOAA is awesome! It implements all of these equations in Excel and is pretty easily portable to your programming language of choice. https://gml.noaa.gov/grad/solcalc/calcdetails.html https://gml.noaa.gov/grad/solcalc/calcdetails.html
P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are.
- grecy 3y ago> P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are. That may just be a function of how you define "sunrise" and "sunset". It is never as simple as "when the sun hits the horizon", but something about some number of arc minutes from something something.
- antgiant 3y agoTo be clear I was complaining that basically everyone calculates “sunrise” and “sunset” differently. If you check half a dozen different “sunset” calculators you will get a surprisingly wide variation in the times they provide. At least where I live the error seems to average 5-10 minutes.
- grecy 3y ago> At least where I live the error seems to average 5-10 minutes And what I meant was you are not seeing "error", it's just a difference in definition.
- wizzwizz4 3y agoDependent on the refractive index, which depends on air density and temperature and humidity too; and we have to integrate over the region between the horizon and the upper atmosphere (diagonally, of course)…
- grecy 3y agoHaha, thanks ,yep. I learned all this when I lived in the Yukon and sunset takes about 2 hours...