File Exchange

image thumbnail

Moon Phases

version 2.0.0.0 (16.4 MB) by Meysam Mahooti
Determination of lunar phases and checking for eclipses

12 Downloads

Updated 19 Mar 2019

View License

Input: year
Output: phases of the Moon and time of lunar eclipses are specified.
References:
Montenbruck O., Pfleger T.; Astronomy on the Personal Computer; Springer Verlag, Heidelberg; 4th edition (2000).
Meeus J.; Astronomical Algorithms; Willmann-Bell; Richmond, Virginia; 2nd edition (1998).
https://ssd.jpl.nasa.gov/?ephemerides
https://eclipse.gsfc.nasa.gov/LEcat5/deltatpoly.html

Cite As

Meysam Mahooti (2019). Moon Phases (https://www.mathworks.com/matlabcentral/fileexchange/55270-moon-phases), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Dear Jicai Zhang,
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
Use it rather than existing DE430Coeff.mat matrix and get what you like!
Yours Faithfully
Meysam Mahooti

Jicai Zhang

I Love it!Thanks. Except it probably can not calculate the years before 1949 or after 2049.

BlueEyes

Better to have the year as an input, as follows:
------------
Year= input (' Select the year: ');
------------
Remarks: outputs for year 1972 work _properly_, despite the note of WB Buddendorf user.
Cheers

This is a handy tool. However, the script enters an infinite loop in certain years. For example, in 1972 when it's determining the timing for the full moon, the script stops running. It seems this happens in the 'Pegasus' function where some of the variables (x3 first, other later on in the script) get NaN values. Is there a possibility to work around this? Tried changing the accuracy but doesn't seem to achieve much...

Updates

2.0.0.0

ETminUT.m is updated to cover more years considering you are using DE430Coeff.mat full matrix from https://www.researchgate.net/publication/331821512_JPL_Planetary_and_Lunar_Ephemerides_DE430_full_MATLAB_matrix

1.1.0.0

ETminUT.m is revised and JPL Development Ephemeris (DE430) are used for computation of the Sun and the Moon positions in PhasesFunc.m.

1.0.0.0

Revised on 2017-03-05.

1.0.0.0

The image is added.

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