I'm currently rewriting a service from Javascript to Go and tried this library for calculating sunrise/down and civil dawn times. The first test for our location gave me results that looked very off, so I started comparing the library's results to other sources. OpenCage and Yr are geo and weather services, meeussunmoon is the library I'm using in the old version.
Lat: 59.9130134 / Lon: 10.7541403 for the example
solar
OpenCage
meeussunmoon
Yr
dawn
01:44:49
02:55:00
02:59:27
rise
03:35:11
04:17:00
04:18:28
04:18:00
down
20:45:11
22:27:00
22:25:58
22:25:00
dusk
22:35:34
23:48:00
23:43:48
Results from solar are sometimes off by more than an hour, compared to all others.
Do you mind comparing the code with ~kennylevinsen/wlsunset? The current code has a lot of quirks to do with timezones and leap seconds that I'm not confident is really correct.
I'm currently rewriting a service from Javascript to Go and tried this library for calculating sunrise/down and civil dawn times. The first test for our location gave me results that looked very off, so I started comparing the library's results to other sources. OpenCage and Yr are geo and weather services, meeussunmoon is the library I'm using in the old version.
Lat: 59.9130134 / Lon: 10.7541403 for the example
Results from solar are sometimes off by more than an hour, compared to all others.