Sunrise - When does the sun rise and set for a given place?
Given a position in longitude and latitude and date, send a simple request and find out when the sun and the moon rise and set. The elevation angle of the sun at solar noon is also given. You can either specify a given date using the date parameter or you can ask for a range, using the parameters from and to (which both are inclusive). Note that the algorithm estimates the timezone based on longitude, and events around midnight can therefore be misplaced with respect to the local date.
The times are all in UTC. Coordinates are given with east and north as positive values.
Schema is available as
A simple request to retrieve processed Sun/Moon rise/set information has the following parameters:
- lat (latitude), in decimal degrees, mandatory
- lon (longtitude), in decimal degrees, mandatory
- date, given as YYYY-MM-DD
- from, given as YYYY-MM-DD
given as YYYY-MM-DD
The from-to-query is limited to max 30 days per request.
Sample simple request URLs ("sunrise data for a day", "sunrise data for a period", "day with several moonrises")
- - Added direct request to astronomical event library.
- - Uses JPL ephemerides DE405.
- - Output now agrees well with "Almanakk for Norge".
- - Better use of algorithm, should give more accurate data
- - New parameters from and to, returning all events in the range
- - Either date or from and to is now compulsory
- - Version 0.9 will expire 2009-06-24
- - Algorithm for the computation is updated. Should be more accurate.
- - Version 0.8 will expire 2008-10-01