Comment 2 for bug 305542

Revision history for this message
Martin Janser (mjanser-deactivatedaccount) wrote :

I made some research about getting the times of sunrise and sunset which are required to display a moon at night. I would like to share the results here...
The data needed to calculate the times are latitude, longitude and the timezone.

The website http://www.srrb.noaa.gov/highlights/sunrise/sunrise.html uses JavaScript to calculate the times. Maybe this helps when developing similar functions in the weather plugin.

Another approach is using the python library PyEphem. But this is probably an overkill for only calculating times of sunrise and sunset :)
http://rhodesmill.org/pyephem/
http://rhodesmill.org/pyephem/tutorial#computations-for-particular-observers

By the way, who created the images for the weather plugin? Or where are they from? (For the missing images with a moon)