Expand description
Lunar position, separation, illumination, rise/set, and moon-avoidance.
Provenance: the geocentric position implements the truncated ELP-2000/82
theory of Meeus, Astronomical Algorithms 2nd ed., ch. 47; the periodic
term tables (47.A / 47.B) are ported from saurvs/astro-rust
(src/lunar.rs, MIT — see NOTICE).
Topocentric correction is Meeus ch. 40 (written fresh); illumination is
Meeus ch. 48; the moon-avoidance Lorentzian is the classic ACP/Berry
criterion. Accuracy: ~10″ (λ) / 4″ (β) geocentric truncation; treating
UTC as dynamical time adds ≤ ~40″ (the Moon moves ~0.55″/s of ΔT) — the
documented public claim is ≤2′ vs AstroPy, comfortably absorbed by the
planning contract for site-relative use once parallax (up to ~61′!) is
corrected via moon_position_topocentric.
Functions§
- lunar_
separation - Great-circle separation between the topocentric Moon and
targetat an instant. The target is precessed to the epoch of date internally, matching the observer-module semantics. - moon_
avoidance_ lorentzian - The classic moon-avoidance Lorentzian (ACP/Berry): the required minimum
target–Moon separation at
at, largest at full Moon and relaxing with lunar age: - moon_
crossings - When the topocentric Moon rises above and sets below
thresholdaltitude, around the lunar transit nearestnight_of(moving-body iteration of the analytic solver; the Moon moves ~13°/day). Matches astroplan within ±3 min. - moon_
distance_ km - Moon–Earth centre distance in kilometres.
- moon_
illumination - Illuminated fraction of the Moon’s disk,
k = (1 + cos i) / 2∈ [0, 1], derived frommoon_phase_angle. - moon_
phase_ angle - The Moon’s phase angle
i(Sun–Moon–Earth angle, Meeus ch. 48 exact form): 0° at full Moon, 180° at new. Feedsmoon_illuminationandmoon_avoidance_lorentzian. - moon_
position - Geocentric lunar position (equatorial, epoch of date).
- moon_
position_ topocentric - Topocentric lunar position for an observer (equatorial, epoch of date) —
Meeus ch. 40 parallax correction with WGS-84-flattened site coordinates.
The shift from
moon_position(geocentric) can reach ~61′ (the Moon’s horizontal parallax).