pub struct MoonPhase {
pub elongation_deg: f64,
pub phase_angle_deg: f64,
pub illuminated_fraction: f64,
pub waxing: bool,
}Expand description
Illumination geometry of the Moon at a Julian Ephemeris Day (TT), from the Moon’s and Sun’s geocentric positions (ELP/MPP02 + VSOP87D). Computed per Meeus, Astronomical Algorithms 2e, chapter 48 — using the true geocentric elongation (including the Moon’s ecliptic latitude) and the Sun/Moon distances, not a longitude-only approximation.
Fields§
§elongation_deg: f64Geocentric ecliptic-longitude elongation Moon−Sun, degrees [0, 360):
0 = new, 90 = first quarter, 180 = full, 270 = last quarter. Drives the
phase name and the waxing/waning sense.
phase_angle_deg: f64Phase angle i (the Sun–Moon–Earth angle), degrees [0, 180]: 0 = full,
180 = new (Meeus eq. 48.3).
illuminated_fraction: f64Illuminated fraction of the Moon’s disc, 0.0–1.0 (Meeus eq. 48.1,
k = (1 + cos i) / 2).
waxing: booltrue while waxing (new → full, elongation in (0, 180)), false while
waning (full → new).