Predict the times of rise and set of celestial bodies. Compute and display topocentric coordinates (azimuth and elevation) of these events.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This submission is a MATLAB script named rise_set that can be used to determine the topocentric rise and set conditions of the Sun, Moon and planets. This software uses a combination of one-dimensional minimization and root-finding to predict visibility of celestial bodies. The rise_set MATLAB script will also display the calendar date, time and topocentric conditions at maximum elevation along with the total duration of the rise-set event. The source ephemeris for this routine is a JPL DE430 binary ephemeris file.
This application uses several functions ported to MATLAB from the Fortran version of the NOVAS (Naval Observatory Vector Astrometry Subroutines) source code developed at the United States Naval Observatory. Information about the NOVAS software suite can be found at https://aa.usno.navy.mil/software/novas_info.
The rise_set MATLAB script also uses routines from the MICE software suite to read and evaluate the DE430 ephemeris data. Ephemeris files, platform dependent versions of the MICE mex file and other useful MATLAB functions are available at naif.jpl.nasa.gov/naif/toolkit_MATLAB.html. MICE is a MATLAB implementation of the SPICE library created by JPL.
Cite As
David Eagle (2026). Predicting Rise and Set of the Sun, Moon and Planets (https://se.mathworks.com/matlabcentral/fileexchange/39326-predicting-rise-and-set-of-the-sun-moon-and-planets), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.3.0.0 (109 MB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.3.0.0 | Updated several MATLAB functions and the PDF documentation. |
||
| 1.2.0.0 | Updated to use DE421.bsp ephemeris (included in the zip file). Updated data files and MICE/NOVAS routines. |
||
| 1.1.0.0 | A MICE version of this script can be found in the riseset_mice.zip archive. |
||
| 1.0.0.0 |
