Professional Documents
Culture Documents
Sunrise
Sunrise
html) Input latitude in decimal degrees (positive in northern hemisphere) longitude in decimal degrees (negative for western hemisphere) year month day time zone in hours relative to GMT/UTC (PST= -8, MST= -7, CST= -6, EST= -5) daylight savings time (no= 0, yes= 1) Output (local time in days) sunrise solar noon sunset
MUMBAI
18.58 72.4
0.966667 0.666667
NOTE: Five functions are available for use from Excel worksheets: - sunrise(lat, lon, year, month, day, timezone, dlstime) - solarnoon(lat, lon, year, month, day, timezone, dlstime) - sunset(lat, lon, year, month, day, timezone, dlstime) - solarazimuth(lat, lon, year, month, day, hour, minute, second, timezone, dlstime) - solarelevation(lat, lon, year, month, day, hour, minute, second, timezone, dlstime)
The sign convention for inputs to the functions named sunrise, solarnoon, sunset, solarazimuth, and solarelevation is:
- positive latitude decimal degrees for northern hemisphere - negative longitude degrees for western hemisphere - negative time zone hours for western hemisphere The other functions in the VBA module use the original NOAA sign convention of positive longitude in the western hemisphere.
The calculations in the NOAA Sunrise/Sunset and Solar Position Calculators are based on equations from Astronomical Algorithms, by Jean Meeus. NOAA also included atmospheric refraction effects. The sunrise and sunset results were reported by NOAA to be accurate to within +/- 1 minute for locations between +/- 72 latitude, and within ten minutes outside of those latitudes.
This Excel VBA translation was tested for selected locations and found to provide results within +/1 minute of the original NOAA Javascript code. This VBA translation does not include calculation of prior or next susets for locations above the Arctic Circle and below the Antarctic Circle, when a sunrise or sunset does not occur. Translated from NOAA's Javascript to Excel VBA by: Greg Pelletier Olympia, WA e-mail: pelican@vei.net
175271402.xlsx.ms_office, 9/26/2013