1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! # ELP2000-82B Coefficient Structures
//!
//! ## Scientific scope
//!
//! The ELP2000-82B theory (Chapront-Touzé & Chapront 1988) partitions its
//! Poisson-series terms into three families depending on which gravitational
//! perturbations they model:
//!
//! - **Main Problem** — the Earth–Moon–Sun three-body problem without planetary
//! perturbations. Arguments are the four Delaunay angles D, M, Mʹ, F.
//! - **Earth Perturbations** — figure, tidal, and relativistic corrections
//! involving the same four Delaunay angles plus an explicit power of T.
//! - **Planetary Perturbations** — gravitational influence of the eight planets
//! (Mercury through Neptune), using eleven combined planetary/lunar arguments.
//!
//! Each family is represented by a distinct coefficient record type defined here.
//!
//! ## Technical scope
//!
//! - [`MainProblem`] — one sine term of the Main Problem series; amplitude `a`
//! in 10⁻⁴ arc-seconds, integer Delaunay multipliers, and phase polynomial
//! coefficients b₀…b₅.
//! - [`EarthPert`] — one Earth-perturbation term; amplitude `a` in 10⁻⁴
//! arc-seconds, T-exponent `iz` (dimensionless), phase rate `o`
//! (radians / Julian-millennia), and constant phase `p` (radians).
//! - [`PlanetPert`] — one planetary-perturbation term; amplitude `theta` in
//! 10⁻⁴ arc-seconds, eleven integer planetary multipliers, phase rate `o`
//! (radians / Julian-millennia), and constant phase `p` (radians).
//!
//! All numeric fields use raw `f64`; the typed conversion to physical units
//! (arc-seconds → radians → km) is performed in [`super::elp_series`].
//!
//! ## References
//!
//! - Chapront-Touzé, M., & Chapront, J. (1988). "ELP 2000-82B: A semi-analytical
//! lunar ephemeris adequate for historical times".
//! *Astronomy and Astrophysics* 190, 342–352.
// ────────────────────────────────────────────────────────────────────────────
// Main term of the lunar theory (ELP “Main Problem” series).
// Each record governs one sine term of the form:
//
// Δλ = a * sin( Σ ilu[i] * Φ_i + Σ b[j] * T^j )
//
// where
// Φ_i = {D, M, M′, F} → the four fundamental lunar arguments
// T = Julian millennia from J2000 (ΔT = (JD − 2451545.0)/365250)
// b[j] = time polynomial coefficients (constant, linear, … 5th-order)
//
// All amplitudes are usually given in 0.0001″ (10⁻⁴ arc-sec).
// ────────────────────────────────────────────────────────────────────────────
// ────────────────────────────────────────────────────────────────────────────
// Earth–Moon specific perturbations (ELP Earth Perturbation series).
// A term contributes
//
// Δλ = a · T^iz · sin( Σ ilu[i] * Φ_i + p + o·T )
//
// iz = real exponent of T (often 0, 1, or −1)
// o = secular rate in the phase (radians per Julian millennia)
// p = phase offset at T = 0
// ────────────────────────────────────────────────────────────────────────────
// ────────────────────────────────────────────────────────────────────────────
// Planetary perturbations acting on the Moon
// (ELP Planetary Perturbation series).
// Each term is:
//
// Δλ = θ · sin( Σ ipla[k] * Π_k + p + o·T )
//
// Π_k = 11 planetary arguments (L_ME, L_VE, …, L_NE, D, M, M′)
// θ = amplitude (arc-seconds)
// o = secular rate in phase
// p = phase offset
// ────────────────────────────────────────────────────────────────────────────