Computing Sunrise and Sunset in One Step
Stephen P. Morse, San Francisco
CHOOSE A DATE:
January
February
March
April
May
June
July
August
September
October
November
December
CHOOSE A TIMEZONE: Either specify the time difference from Greenwich, or select the name of a timezone
hours
minutes
0
1
2
3
4
5
6
7
8
9
10
11
12
00
15
30
45
West
East
of Greenwich
Convert to Daylight Saving Time
CHOOSE A LOCATION: Either specify the longitude and latitude, or select the name of a city
degrees
minutes
seconds
Latitude
North
South
of the Equator
Longitude
West
East
of Greenwich
First select a region
United States
Canada
Other Countries
Then select a state
== none selected ==
Finally select the city
== none selected ==
RESULTS:
sunrise
solar noon
sunset
errors
My original algorithm assumed a circular orbit and was therefore inaccurate
Current algorithm is derived from code appearing at
http://www.srrb.noaa.gov/highlights/sunrise/sunrise.html
Lists of longitudes and latitudes and of world time zones were derived from tables at
http://www.jeffreyrbrown.info/qiblih/latlong.html
(formerly at http://bcca.org, the Bahai Computer and Communication Association's website)
© Stephen P. Morse, 2003