Sun/Moon Rise/Set

version 2.1.1 (1.06 MB) by Meysam Mahooti
Rising and setting times of the Sun, the Moon, and twilight times

478 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 [h]) and twilight (Indicates civil, nautical or astronomical twilight) are received, then rising and setting times of the Sun, the Moon, and twilight times are computed.
east longitude and latitude of the observer can be found at:
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). Sun/Moon Rise/Set (https://www.mathworks.com/matlabcentral/fileexchange/55257-sun-moon-rise-set), 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!