astronoby icon indicating copy to clipboard operation
astronoby copied to clipboard

Moon's phase angle and illuminated fraction

Open rhannequin opened this issue 9 months ago • 0 comments

This introduces two new Moon-related information: the phase angle and the illuminated fraction.

The phase angle is the angle between the incident light from the Sun onto the Moon and the reflected light from the Moon.

The illuminated fraction is the ratio of illuminated Moon surface as seen from the Earth. Multiplied by 100, it gives the percentage of illuminated surface as seen from the Earth.

time = Time.utc(2024, 5, 20, 12)
moon = Astronoby::Moon.new(time: time)

moon.phase_angle.degrees.round
# => 35

(moon.illuminated_fraction * 100).round
# => 91

rhannequin avatar May 20 '24 13:05 rhannequin