Skip to main content

Module moon

Module moon 

Source
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 target at 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 threshold altitude, around the lunar transit nearest night_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 from moon_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. Feeds moon_illumination and moon_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).