mphase: Calculate the illuminated fraction of the Moon at given...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculate the illuminated fraction of the Moon at given Julian date(s)

Usage

1
mphase(jd)

Arguments

jd

Julian date, scalar or vector

Details

The output k = 0 indicates a new moon, while k = 1 indicates a full moon.

The algorithm is from Meeus (1991, Chpt. 46) The functions sunpos and moonpos are used to get positions of the Sun and the Moon (and the Moon distance). The selenocentric elongation of the Earth from the Sun (phase angle) is then computed, and used to determine the illuminated fraction.

Value

k

illuminated fraction of Moon's disk (0.0 < k < 1.0), same number of elements as jd.

Author(s)

Written W. Landsman Hughes STX 1996

R adaptation by Arnab Chakraborty June 2013

References

Meeus, J., 1991, "Astronomical Algorithms", Willmann-Bell, Richmond

See Also

sunpos moonpos

Examples

1
2
3
4
5
6
7
8
mphase(2456877.5)

#  Plot the illuminated fraction of the moon for every day in July 
#  1996 at 0 TD (Greenwich noon).
#
# jd = jdcnv(1996, 7, 1, 0)         # Get Julian date of July 1
# phases = mphase(jd:(jd+31))       # Moon phase for all 31 days
# plot(1:31,phases)                 # Plot phase vs. July day number

astrolibR documentation built on May 2, 2019, 3:26 a.m.