File Exchange

image thumbnail

Sunrise Sunset

version 2.1.0.0 (17.4 MB) by Meysam Mahooti
Rising and setting times of the Sun and the Moon and twilight times

5 Downloads

Updated 19 Mar 2019

View License

Year, month, day, lambda (Geographic east longitude of the observer in [deg]), phi (Geographic latitude of the observer in [deg]), zone (local time - universal time in [hour]) and twilight (Indicates civil, nautical or astronomical twilight) are received, then rising and setting times of the Moon and the Sun and twilight times are computed.
Positions of the Sun and the Moon are computed using Jet Propulsion Laboratory Development Ephemeris (DE430).
east longitude and latitude of the observer can be found in:
https://www.gaisma.com/en/dir/001-continent.html
local time - universal time is available here (daylight saving time is considered):
https://www.worldtimebuddy.com

References:
Montenbruck O., Pfleger T.; Astronomy on the Personal Computer; Springer Verlag, Heidelberg; 4th edition (2000).
http://ssd.jpl.nasa.gov/?ephemerides
https://www.gaisma.com/en/location/tehran.html
https://www.worldtimebuddy.com

Cite As

Meysam Mahooti (2019). Sunrise Sunset (https://www.mathworks.com/matlabcentral/fileexchange/60157-sunrise-sunset), MATLAB Central File Exchange. Retrieved .

Updates

2.1.0.0

Description, references and JPL_Eph_DE430.m are updated. Moreover, DE430Coeff.mat full matrix is now available in the following link:
https://www.researchgate.net/publication/331821512_JPL_Planetary_and_Lunar_Ephemerides_DE430_full_MATLAB_matrix

2.0.0.0

Accuracy is improved by modification of SinAlt.m.

1.1.0.0

DE405 (planetary and lunar ephemerides) is replaced by DE430.

1.0.0.0

SinAlt.m is updated.

1.0.0.0

Revised on 2017-02-25.

1.0.0.0

Revised on 2016-11-28.

1.0.0.0

Revised on November 09, 2016.

1.0.0.0

Description is updated.

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux