Sunrise Sunset

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

681 Downloads

Updated 20 Oct 2022

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:
local time - universal time is available here (daylight saving time is considered):
References:
Montenbruck O., Pfleger T.; Astronomy on the Personal Computer; Springer Verlag, Heidelberg; 4th edition (2000).

Cite As

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

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!