@essrt/physics 25.0.1 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,8 +20,12 @@
20
20
  * with p the IAU general precession.
21
21
  *
22
22
  * Construction (docs/66 §1, abridged): linear rates are observational J2000
23
- * anchors; perigee/node ride the PHASE-AWARE e_E channel integral (s_ϖ
24
- * 2.407 / s_Ω 1.018, Meeus-effective); Lp's planetary T² remainder rides
23
+ * anchors; perigee/node ride the PHASE-AWARE e_E channel integral on the
24
+ * PHYSICAL sensitivities (s_ϖ 2.479 / s_Ω 0.867 — derived from the
25
+ * Meeus-effective 2.407 / 1.018 by removing the frame's T²;
26
+ * moon/ecc-sensitivities.cjs, the ONE home) plus the model's own precession
27
+ * of date, pFix, the ONE frame term every of-date longitude carries (plan 23
28
+ * — so M′ and F are frame-free at every epoch); Lp's planetary T² remainder rides
25
29
  * the bounded e_E² carrier + the obliquity-line carrier (K_PL derived
26
30
  * lazily from the closed v4 budget — zero new constants); D and M are
27
31
  * identity-composed (D ≡ Lp − L_sun, M ≡ L_sun − ϖ_sun) on the injected
@@ -37,6 +41,8 @@
37
41
  // reform). ONE home — time/calendar.cjs; re-exported here for the readers
38
42
  // that import it from the arguments module.
39
43
  const { jdToDecimalYear } = require('../time/calendar.cjs');
44
+ // The Meeus Ch. 47 argument rates — ONE home (plan 23; the sensitivities' derivation reads the same set).
45
+ const { MEEUS_ARGUMENT_RATES_DEG_PER_CY } = require('./ecc-sensitivities.cjs');
40
46
 
41
47
  /**
42
48
  * @typedef {{Lp: number, D: number, M: number, Mp: number, F: number}} MoonArgsDeg
@@ -59,6 +65,7 @@ const SECULAR_COMPLETION_TAPER_YEARS = 27943.083333333332;
59
65
  * elpEarthFigureJ2ArcsecPerCy2: number,
60
66
  * elpGeneralPrecessionPA_T2ArcsecPerCy2: number,
61
67
  * eccE0: number,
68
+ * moonEccSensitivities: ReturnType<typeof import('./ecc-sensitivities.cjs').deriveMoonEccSensitivities>,
62
69
  * },
63
70
  * fns: {
64
71
  * eccAt: (tYr: number) => number,
@@ -94,8 +101,9 @@ function createMoonArguments({ constants, fns }) {
94
101
  j2000JD, julianCenturyDays,
95
102
  eccentricityJ2000, eccentricityDotJ2000, eccentricityDotDotJ2000,
96
103
  elpEarthFigureJ2ArcsecPerCy2, elpGeneralPrecessionPA_T2ArcsecPerCy2,
97
- eccE0,
104
+ eccE0, moonEccSensitivities,
98
105
  } = constants;
106
+ if (!moonEccSensitivities) throw new Error('moon/arguments: constants.moonEccSensitivities is required (the deep-time chain\'s derived pair — plan 23)');
99
107
  const {
100
108
  eccAt, channelIntegral, computeObliquityEarth, jdToSIyear,
101
109
  sunMeanLonDegAtJdTT, sunPerihelionLonDegAtJdTT,
@@ -108,17 +116,26 @@ function createMoonArguments({ constants, fns }) {
108
116
  const bundle = (() => {
109
117
  const LP0 = 218.3164477, D0 = 297.8501921, M0 = 357.5291092,
110
118
  MP0 = 134.9633964, F0 = 93.2720950;
111
- const LPR = 481267.88123421, DR = 445267.1114034, MR = 35999.0502909,
112
- MPR = 477198.8675055, FR = 483202.0175233;
119
+ const { Lp: LPR, D: DR, M: MR, Mp: MPR, F: FR } = MEEUS_ARGUMENT_RATES_DEG_PER_CY; // ONE home (plan 23)
113
120
  const WDOT = LPR - MPR; // perigee ϖ̇ of-date (+4069.0137) = ϖ̇_ICRF + p
114
121
  const NDOT = LPR - FR; // node Ω̇ of-date (−1934.1363) = Ω̇_ICRF + p
115
122
  // e_E channel Taylor CHECKS (documented J2000 reference values — the live
116
123
  // path is the phase-aware channelIntegral; T2_*/T3_* are NOT consumed):
117
124
  const E0 = eccentricityJ2000, EDOT0 = eccentricityDotJ2000;
118
125
  const KAPPA = 3 * E0 * EDOT0 / (1 - E0 * E0);
119
- // v4 frame attribution: FRAME-EFFECTIVE exponents (physical pair after
120
- // removing the IAU ṗ_A frame term: s_ϖ 2.479 / s_Ω 0.867).
121
- const S_W = 2.407, S_N = 1.018;
126
+ // The sensitivities (plan 23; moon/ecc-sensitivities.cjs, the ONE home). The
127
+ // Meeus-EFFECTIVE pair S_W/S_N reproduces Meeus's of-date T² exactly — the
128
+ // documented check below. The live channel runs the PHYSICAL pair
129
+ // S_W_PHYS/S_N_PHYS (the frame's T² removed; the three-body lab's pure-gravity
130
+ // values) on the ICRF rates W_ICRF/N_ICRF, and the frame rides separately:
131
+ // the Meeus polynomial p₀·T + T2F·T² in the snapshot branch (so its T² is
132
+ // Meeus-exact as before), the model's own precession of date (pFix) in the
133
+ // deep branch — ONE frame term on L′, ϖ and Ω alike.
134
+ const SENS = moonEccSensitivities;
135
+ const S_W = SENS.perigeeEffective, S_N = SENS.nodeEffective;
136
+ const S_W_PHYS = SENS.perigeePhysical, S_N_PHYS = SENS.nodePhysical;
137
+ const W_ICRF = SENS.perigeeRateIcrfDegPerCy, N_ICRF = SENS.nodeRateIcrfDegPerCy;
138
+ const P0 = SENS.generalPrecessionDegPerCy, T2F = SENS.frameT2DegPerCy2;
122
139
  const T2_W = S_W * WDOT * KAPPA / 2; // −0.010318 °/cy² (Meeus ϖ −0.010320)
123
140
  const T2_N = S_N * NDOT * KAPPA / 2; // +0.0020752 °/cy² (Meeus Ω +0.0020753)
124
141
  const EDDOT0 = eccentricityDotDotJ2000;
@@ -130,7 +147,7 @@ function createMoonArguments({ constants, fns }) {
130
147
  const T2_LP_TIDAL = (-25.86 / 3600) / 2;
131
148
  const T2_LP_PLANETARY = -0.0015786 - T2_LP_TIDAL; // +7.247″/cy²
132
149
  const T2_LP = T2_LP_TIDAL + T2_LP_PLANETARY;
133
- return { LP0, D0, M0, MP0, F0, LPR, DR, MR, WDOT, NDOT, T2_W, T2_N, T3_W, T3_N, T2_LP, T2_LP_TIDAL, S_W, S_N };
150
+ return { LP0, D0, M0, MP0, F0, LPR, DR, MR, WDOT, NDOT, T2_W, T2_N, T3_W, T3_N, T2_LP, T2_LP_TIDAL, S_W, S_N, S_W_PHYS, S_N_PHYS, W_ICRF, N_ICRF, P0, T2F };
134
151
  })();
135
152
 
136
153
  // ── Bounded Lp carriers (K_PL / C_OBL derived lazily — zero new constants)
@@ -146,59 +163,63 @@ function createMoonArguments({ constants, fns }) {
146
163
  return kPl;
147
164
  }
148
165
  // ── Deep-time carrier tables ────────────────────────────────────────────────
149
- // In the era (|T| ≤ CARRIER_DENSE_CY = 250 kyr) each carrier is the Simpson
150
- // sum below, untouched — the certified numbers. Beyond, the integral
151
- // continues from the dense edge on a cumulative table of CARRIER_CELL_CY
152
- // cells (1 kyr; per-cell 3-point Simpson, a 3-point Simpson over the
153
- // partial last cell), grown in CARRIER_CHUNK cells in the direction asked
154
- // for. The former form re-integrated the whole span from J2000 on EVERY
155
- // call with N ∝ |T| nodes — 77 evaluations of the e channel at 300 kyr,
156
- // 2,500 at 10 Myr, per lunar argument set and frame — the deep-time
157
- // playback cost the owner measured (the loop's JS at 190 ms a frame).
158
- const CARRIER_DENSE_CY = 2500, CARRIER_CELL_CY = 10, CARRIER_CHUNK = 2500;
166
+ // Every carrier is ∫₀ᵀ f dt on ONE cumulative table per direction: fine
167
+ // cells of CARRIER_FINE_CY (100 yr) to ±CARRIER_FINE_RANGE_CY (250 kyr),
168
+ // grown in CARRIER_FINE_CHUNK cells (10 kyr — an in-window call never
169
+ // samples deeper than it must), then CARRIER_CELL_CY cells (1 kyr) grown in
170
+ // CARRIER_CHUNK (the former deep tier, unchanged); per-cell 3-point Simpson
171
+ // and a 3-point Simpson over the partial last cell. Continuous in value AND
172
+ // in rate: the per-cell error is fixed by the cell, so nothing jumps when T
173
+ // grows. (Plan 23 follow-up, measured on the Node Regression panel: the
174
+ // in-era form was one Simpson from J2000 to T whose node count stepped every
175
+ // 2 kyr (obliquity) / 8 kyr (planetary), so the accumulated error jumped
176
+ // there — 0.3–6″ on the obliquity carrier at 20–250 kyr, 10–15″ on the
177
+ // planetary one at ±6/22 kyr — invisible on L′'s rate, a notch of 0.5 d on
178
+ // the node period once the remainder rode Ω. The earlier form that
179
+ // re-integrated the whole span on every call cost the deep-time playback
180
+ // 190 ms a frame — the owner's measurement behind the tables.)
181
+ const CARRIER_FINE_CY = 1, CARRIER_FINE_RANGE_CY = 2500, CARRIER_FINE_CHUNK = 100;
182
+ const CARRIER_CELL_CY = 10, CARRIER_CHUNK = 2500;
159
183
  /** @param {(t: number) => number} f the SCALED integrand per century
160
- * @param {(T: number) => number} dense the in-era Simpson (its value at ±CARRIER_DENSE_CY seeds the table)
161
- * @returns {(T: number) => number} */
162
- function makeDeepCarrier(f, dense) {
163
- /** @type {{ fwd: number[] | null, bwd: number[] | null }} */
184
+ * @returns {(T: number) => number} ∫₀ᵀ f dt, T in Julian centuries (signed) */
185
+ function makeDeepCarrier(f) {
186
+ /** @type {{ fwd: {fine: number[], coarse: number[] | null} | null, bwd: {fine: number[], coarse: number[] | null} | null }} */
164
187
  const sides = { fwd: null, bwd: null };
188
+ const NF = CARRIER_FINE_RANGE_CY / CARRIER_FINE_CY;
189
+ /** The signed cell integral from t0 (nearer J2000) to t1. @param {number} t0 @param {number} t1 */
190
+ const cell = (t0, t1) => (f(t0) + 4 * f((t0 + t1) / 2) + f(t1)) * ((t1 - t0) / 6);
191
+ /** @param {{fine: number[]}} s @param {number} dir @param {number} upTo grow the fine table to this many cells */
192
+ const growFine = (s, dir, upTo) => {
193
+ for (let i = s.fine.length; i <= upTo; i++) s.fine.push(s.fine[i - 1] + cell(dir * (i - 1) * CARRIER_FINE_CY, dir * i * CARRIER_FINE_CY));
194
+ };
165
195
  return (T) => {
166
- if (Math.abs(T) <= CARRIER_DENSE_CY) return dense(T);
167
- const dir = T > 0 ? 1 : -1;
168
- let cum = dir === 1 ? sides.fwd : sides.bwd;
169
- if (!cum) { cum = [dense(dir * CARRIER_DENSE_CY)]; if (dir === 1) sides.fwd = cum; else sides.bwd = cum; }
170
- const dist = Math.abs(T) - CARRIER_DENSE_CY;
196
+ if (T === 0) return 0;
197
+ const dir = T > 0 ? 1 : -1, a = Math.abs(T);
198
+ let s = dir === 1 ? sides.fwd : sides.bwd;
199
+ if (!s) { s = { fine: [0], coarse: null }; if (dir === 1) sides.fwd = s; else sides.bwd = s; }
200
+ if (a <= CARRIER_FINE_RANGE_CY) {
201
+ const k = Math.floor(a / CARRIER_FINE_CY);
202
+ if (s.fine.length < k + 2) growFine(s, dir, Math.min(NF, Math.ceil((k + 1) / CARRIER_FINE_CHUNK) * CARRIER_FINE_CHUNK));
203
+ return s.fine[k] + cell(dir * k * CARRIER_FINE_CY, T);
204
+ }
205
+ if (!s.coarse) { growFine(s, dir, NF); s.coarse = [s.fine[NF]]; }
206
+ const dist = a - CARRIER_FINE_RANGE_CY;
171
207
  const k = Math.floor(dist / CARRIER_CELL_CY);
172
- let target = cum.length;
208
+ let target = s.coarse.length;
173
209
  while (target < k + 2) target += CARRIER_CHUNK;
174
- for (let i = cum.length; i < target; i++) {
175
- const t0 = dir * (CARRIER_DENSE_CY + (i - 1) * CARRIER_CELL_CY), t1 = t0 + dir * CARRIER_CELL_CY;
176
- cum.push(cum[i - 1] + dir * (f(t0) + 4 * f((t0 + t1) / 2) + f(t1)) * (CARRIER_CELL_CY / 6));
210
+ for (let i = s.coarse.length; i < target; i++) {
211
+ const t0 = dir * (CARRIER_FINE_RANGE_CY + (i - 1) * CARRIER_CELL_CY);
212
+ s.coarse.push(s.coarse[i - 1] + cell(t0, t0 + dir * CARRIER_CELL_CY));
177
213
  }
178
- const ta = dir * (CARRIER_DENSE_CY + k * CARRIER_CELL_CY);
179
- const hp = T - ta;
180
- return cum[k] + (f(ta) + 4 * f(ta + hp / 2) + f(T)) * (hp / 6);
214
+ return s.coarse[k] + cell(dir * (CARRIER_FINE_RANGE_CY + k * CARRIER_CELL_CY), T);
181
215
  };
182
216
  }
183
217
 
184
- /** The planetary carrier's SCALED integrand, k_PL · (e² − e0²), per century. @param {number} t */
218
+ /** The planetary carrier's SCALED integrand, k_PL · (e² − e0²), per century
219
+ * (e0 the channel's anchor CONST — not eccAt(0), which under integrated
220
+ * phase carries the R3 drift correction, the 8.2-2 convention). @param {number} t */
185
221
  const planetaryIntegrand = (t) => { const e = eccAt(t * 100); return kPlValue() * (e * e - eccE0 * eccE0); };
186
- /** @param {number} T @returns {number} */
187
- function planetaryCarrierDense(T) {
188
- if (T === 0) return 0;
189
- const k = kPlValue();
190
- // The channel's e0 anchor CONST — not eccAt(0), which under integrated
191
- // phase carries the R3 drift correction (the 8.2-2 convention).
192
- const e0sq = eccE0 * eccE0;
193
- /** @param {number} t */
194
- const f = (t) => { const e = eccAt(t * 100); return e * e - e0sq; };
195
- const N = Math.max(2, 2 * Math.ceil(Math.abs(T) * 100 / 8000));
196
- const h = T / N;
197
- let sum = f(0) + f(T);
198
- for (let i = 1; i < N; i++) sum += f(i * h) * (i % 2 ? 4 : 2);
199
- return k * sum * h / 3;
200
- }
201
- const planetaryCarrier = makeDeepCarrier(planetaryIntegrand, planetaryCarrierDense);
222
+ const planetaryCarrier = makeDeepCarrier(planetaryIntegrand);
202
223
 
203
224
  /** @type {{eps0: number, C: number} | null} */
204
225
  let obl = null;
@@ -221,19 +242,24 @@ function createMoonArguments({ constants, fns }) {
221
242
  }
222
243
  /** The obliquity carrier's SCALED integrand, C · (ε − ε0), per century. @param {number} t */
223
244
  const obliquityIntegrand = (t) => { const O = oblInit(); return O.C * (computeObliquityEarth(2000 + t * 100) - O.eps0); };
224
- /** @param {number} T @returns {number} */
225
- function obliquityCarrierDense(T) {
245
+ const obliquityCarrier = makeDeepCarrier(obliquityIntegrand);
246
+
247
+ /** The frame share's REMAINDER for ϖ and Ω (plan 23). The physical exponents gave
248
+ * up the frame's T² the Meeus-effective pair carried (T2F, Lieske's); pFix
249
+ * supplies the model's own in-window acceleration (ṗΔ_eff/2, self-measured);
250
+ * the difference rides the obliquity carrier's integrand, exactly as L′'s
251
+ * figure+frame part does — so every of-date longitude's T² stays Meeus-exact
252
+ * and ONE frame term (pFix + this remainder) rides L′, ϖ and Ω alike. Bounded
253
+ * (the obliquity cycle), ~0.1° at most. Without the (d′) pair (pdSlope 0) the
254
+ * whole Lieske share rides here and pFix is 0 — the same frame, one carrier.
255
+ * @param {number} T @returns {number} */
256
+ function frameRemainder(T) {
226
257
  if (T === 0) return 0;
227
- const O = oblInit();
228
- /** @param {number} t */
229
- const f = (t) => computeObliquityEarth(2000 + t * 100) - O.eps0;
230
- const N = Math.max(2, 2 * Math.ceil(Math.abs(T) * 100 / 2000));
231
- const h = T / N;
232
- let sum = f(0) + f(T);
233
- for (let i = 1; i < N; i++) sum += f(i * h) * (i % 2 ? 4 : 2);
234
- return O.C * sum * h / 3;
258
+ const pdHalf = rateCompInit().pdSlopeDegPerCy2 / 2;
259
+ const t2Obl = (elpEarthFigureJ2ArcsecPerCy2 + elpGeneralPrecessionPA_T2ArcsecPerCy2) / 3600 - pdHalf; // L′'s carrier normalization (oblInit)
260
+ const t2Rem = bundle.T2F - pdHalf;
261
+ return t2Obl === 0 ? 0 : obliquityCarrier(T) * (t2Rem / t2Obl);
235
262
  }
236
- const obliquityCarrier = makeDeepCarrier(obliquityIntegrand, obliquityCarrierDense);
237
263
 
238
264
  // ── Secular-ë completion carrier (ṅ campaign, plan §12i item 0 (c)) ──────
239
265
  // The certified snapshot's Lp T³/T⁴ tail is DERIVED physics (v4 D3,
@@ -273,24 +299,20 @@ function createMoonArguments({ constants, fns }) {
273
299
  const d2Ch = (e2(10) - 2 * e2(0) + e2(-10)) / 100;
274
300
  secComp = { dd2: d2Sec - d2Ch, d3Sec, Tq: SECULAR_COMPLETION_TAPER_YEARS / 100 };
275
301
  }
276
- const S = secComp;
277
- /** @param {number} t */
278
- const f = (t) => {
279
- const q = Math.abs(t) / S.Tq;
280
- if (q >= 1) return 0;
281
- const env = Math.cos(Math.PI / 2 * q) ** 2;
282
- return (0.5 * S.dd2 * t * t + S.d3Sec * t * t * t / 6) * env;
283
- };
284
- // Beyond the era the envelope has long closed (|t| ≥ Tq ≈ 279 cy → 0): the
285
- // integral is the constant to ±Tq, so integrate exactly that span instead of
286
- // N ∝ |T| nodes of zeros (in-era calls untouched).
287
- if (Math.abs(T) > CARRIER_DENSE_CY) T = Math.sign(T) * S.Tq;
288
- const N = Math.max(2, 2 * Math.ceil(Math.abs(T) * 100 / 2000));
289
- const h = T / N;
290
- let sum = f(0) + f(T);
291
- for (let i = 1; i < N; i++) sum += f(i * h) * (i % 2 ? 4 : 2);
292
- return kPlValue() * sum * h / 3;
302
+ // Beyond the taper the envelope has closed (|t| ≥ Tq ≈ 279 cy → 0): the
303
+ // integral is the constant to ±Tq, so the table is read at ±Tq there.
304
+ const Tq = secComp.Tq;
305
+ return secCarrier(Math.abs(T) > Tq ? Math.sign(T) * Tq : T);
293
306
  }
307
+ /** The completion's SCALED integrand, k_PL · the tapered curvature difference, per century. @param {number} t */
308
+ const secIntegrand = (t) => {
309
+ const S = /** @type {{dd2: number, d3Sec: number, Tq: number}} */ (secComp);
310
+ const q = Math.abs(t) / S.Tq;
311
+ if (q >= 1) return 0;
312
+ const env = Math.cos(Math.PI / 2 * q) ** 2;
313
+ return kPlValue() * (0.5 * S.dd2 * t * t + S.d3Sec * t * t * t / 6) * env;
314
+ };
315
+ const secCarrier = makeDeepCarrier(secIntegrand);
294
316
 
295
317
  // ── Deep-time branch: always-chains (Stage B) ────────────────────────────
296
318
  /** @type {number | null} */
@@ -446,18 +468,22 @@ function createMoonArguments({ constants, fns }) {
446
468
  if (Ntrop === null || Naps === null || Nnod === null) return null; // tidal-lock guard
447
469
  const Tj = (jd - j2000JD) / julianCenturyDays;
448
470
  const dy = y - argsY0;
449
- // pFix rides Lp ONLY: the obliquity carrier's PA reduction compensates
450
- // its ṗΔ·T²/2 there, keeping total Lp T² certified. The apsidal/nodal
451
- // chains' own curvature is ALREADY certified-consistent (v4 checks;
452
- // pre-(d′) isolation −0.20/+0.13″/cy²), so ϖ/Ω take only the tapered
453
- // rate anchors — which self-measure and absorb their Δp rate share.
454
- // Deep time: Mp/F inherit Lp's bounded pFix oscillation uncancelled
455
- // (physically p-free args; bounded, display-class — documented).
456
- const pF = rateCompInit().pFix(dy);
471
+ // ONE equinox for the three of-date longitudes (plan 23): pFix = ∫(p_dyn − p_kin),
472
+ // the model's own precession of date beyond the chains' kinematic mean, rides
473
+ // L′, ϖ AND Ω alike, so the frame-free arguments M′ = L′ − ϖ and F = L′ − Ω
474
+ // cancel it exactly at every epoch. The apsidal/nodal chains run the PHYSICAL
475
+ // exponents (the frame's T² is no longer frozen inside them); the Lieske share
476
+ // they gave up minus pFix's in-window T² rides the obliquity carrier as
477
+ // frameRemainder, as L′'s figure+frame part does, so ϖ and Ω stay Meeus-exact
478
+ // in T²; the tapered rate anchors self-measure. (Before plan 23 pFix rode L′ only while the chains
479
+ // carried the frame share in the Meeus-effective exponents: in the window the
480
+ // two agreed to 0.006″/cy², beyond it M′ and F inherited the whole wobble —
481
+ // measured 2.5° at ±10 kyr, 39° at −1 Myr.)
482
+ const pF = rateCompInit().pFix(dy), fr = frameRemainder(Tj);
457
483
  const Lp = A.LP0 + 360 * Ntrop + planetaryCarrier(Tj) + obliquityCarrier(Tj)
458
484
  + lpSecularCompletion(Tj) + pF;
459
- const w = (A.LP0 - A.MP0) + 360 * Naps; // perigee ϖ (of-date, advance)
460
- const om = (A.LP0 - A.F0) - 360 * Nnod; // node Ω (of-date, regression)
485
+ const w = (A.LP0 - A.MP0) + 360 * Naps + pF + fr; // perigee ϖ (of-date, advance)
486
+ const om = (A.LP0 - A.F0) - 360 * Nnod + pF + fr; // node Ω (of-date, regression)
461
487
  const Lsun = sunMeanLonDegAtJdTT(jd); // the certified Sun's mean longitude (unwrapped)
462
488
  const ws = sunPerihelionLonDegAtJdTT(jd) + 180; // the Sun's perihelion = Earth's mean ϖ of date + 180° (wrapped; M wraps)
463
489
  void A;
@@ -503,8 +529,13 @@ function createMoonArguments({ constants, fns }) {
503
529
  const Tc = Math.max(-100, Math.min(100, T));
504
530
  const Tc2 = Tc * Tc, Tc3 = Tc2 * Tc, Tc4 = Tc3 * Tc;
505
531
  const Lp = A.LP0 + A.LPR * T + A.T2_LP * Tc2 + Tc3 / 538841 - Tc4 / 65194000;
506
- const w = (A.LP0 - A.MP0) + A.WDOT * (T + channelIntegral(T, A.S_W)); // perigee ϖ (of-date)
507
- const om = (A.LP0 - A.F0) + A.NDOT * (T + channelIntegral(T, A.S_N)); // node Ω (of-date)
532
+ // Perigee and node (of-date), plan 23: the ICRF rate on the PHYSICAL channel
533
+ // exponent plus the Meeus polynomial's frame, p₀·T + T2F·T² (clamped with the
534
+ // other tails) — the T² is Meeus-exact as before, the frame share no longer
535
+ // rides the eccentricity channel's wiggle. The deep branch carries the model's
536
+ // own precession of date (pFix) in its place.
537
+ const w = (A.LP0 - A.MP0) + A.W_ICRF * (T + channelIntegral(T, A.S_W_PHYS)) + A.P0 * T + A.T2F * Tc2; // perigee ϖ (of-date)
538
+ const om = (A.LP0 - A.F0) + A.N_ICRF * (T + channelIntegral(T, A.S_N_PHYS)) + A.P0 * T + A.T2F * Tc2; // node Ω (of-date)
508
539
  const Lsun = sunMeanLonDegAtJdTT(jdTT); // the certified Sun's mean longitude of date
509
540
  const ws = sunPerihelionLonDegAtJdTT(jdTT) + 180; // the Sun's perihelion of date
510
541
  return {
@@ -520,12 +551,13 @@ function createMoonArguments({ constants, fns }) {
520
551
  const T2 = T * T, T3 = T2 * T, T4 = T3 * T;
521
552
  /** @param {number} x */
522
553
  const wrap = (x) => ((x % 360) + 360) % 360;
554
+ const R = MEEUS_ARGUMENT_RATES_DEG_PER_CY; // the rates' ONE home (plan 23)
523
555
  return {
524
- Lp: wrap(218.3164477 + 481267.88123421 * T - 0.0015786 * T2 + T3 / 538841 - T4 / 65194000),
525
- D: wrap(297.8501921 + 445267.1114034 * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000),
526
- M: wrap(357.5291092 + 35999.0502909 * T - 0.0001536 * T2 + T3 / 24490000),
527
- Mp: wrap(134.9633964 + 477198.8675055 * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000),
528
- F: wrap( 93.2720950 + 483202.0175233 * T - 0.0036539 * T2 - T3 / 3526000 + T4 / 863310000),
556
+ Lp: wrap(218.3164477 + R.Lp * T - 0.0015786 * T2 + T3 / 538841 - T4 / 65194000),
557
+ D: wrap(297.8501921 + R.D * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000),
558
+ M: wrap(357.5291092 + R.M * T - 0.0001536 * T2 + T3 / 24490000),
559
+ Mp: wrap(134.9633964 + R.Mp * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000),
560
+ F: wrap( 93.2720950 + R.F * T - 0.0036539 * T2 - T3 / 3526000 + T4 / 863310000),
529
561
  };
530
562
  }
531
563
 
@@ -12,30 +12,24 @@
12
12
  * — the constant remainder pins the unresolved short/ultra-long content at
13
13
  * the JPL J2000 seed anchor, so e(J2000) is exact by construction.
14
14
  *
15
- * DOMAIN (decision (ii), proper physics — no mixed device): the ENTIRE
16
- * lunar chain reads THIS channel — eccAt (the Δe² argument terms),
17
- * channelIntegral (perigee/node of-date rates), modulation (the
18
- * month/precession chain and its integrated cycle counts), eFactorAt (the
19
- * Meeus E-factor). The Sun/clock machinery (eclipse Sun equation of
20
- * centre, besselian Sun distance, cardinal braid) stays on the H/3 law
21
- * (moon/ecc-channel.cjs) — a CERTIFICATION split, not a physics one: the
22
- * two e's agree within 4.2e-5 wherever the domains overlap, and the H/3
23
- * line keeps its E18 role as the epoch-local tangent inside the fitted
24
- * clock stack.
15
+ * DOMAIN (decision (ii)): the ENTIRE lunar chain reads THIS channel — eccAt
16
+ * (the Δe² argument terms), channelIntegral (perigee/node of-date rates),
17
+ * modulation (the month/precession chain and its integrated cycle counts),
18
+ * eFactorAt (the Meeus E-factor). Earth's eccentricity of date is the
19
+ * N-body series on every other path as well (plan 21: one e-vector of date
20
+ * on every surface).
25
21
  *
26
- * MEASURED at adoption (banked in the plan record): vs the H/3 law the
27
- * attractor-mean modulation shifts are +2,526 ppm (perigee channel,
28
- * s = 2.407) and +1,067 ppm (node, s = 1.018) — month/LOD shifts of
29
- * ~10–25 ppm class, all 41 paleo anchors in bands; the ancient eclipse
30
- * stack's cycle counts shift (χ² IMPROVES — recorded with its
31
- * explanation: this e is La2004-corroborated in-era, 3× closer than the
32
- * H/3 line; theory-corroborated, never tuned). Beyond ~5 Myr the table is
33
- * spectrum-class (phases decohere) — the quasi-periodic ATTRACTOR (mean e
34
- * and the 405-kyr-class beat structure) is the claim, never a pointwise
35
- * ephemeris.
22
+ * MEASURED at adoption (banked in the plan record): the attractor-mean
23
+ * modulation shifts were +2,526 ppm (perigee channel) and +1,067 ppm (node)
24
+ * against the single-line law it replaced — month/LOD shifts of ~10–25 ppm
25
+ * class, all 41 paleo anchors in bands; the ancient eclipse stack's cycle
26
+ * counts shift (χ² IMPROVES — recorded with its explanation: this e is
27
+ * La2004-corroborated in-era; theory-corroborated, never tuned). Beyond
28
+ * ~5 Myr the table is spectrum-class (phases decohere) — the quasi-periodic
29
+ * ATTRACTOR (mean e and the 405-kyr-class beat structure) is the claim,
30
+ * never a pointwise ephemeris.
36
31
  *
37
- * LOAD-BEARING conventions (carried VERBATIM from the era channel —
38
- * moon/ecc-channel.cjs — so the certified numerics match):
32
+ * LOAD-BEARING conventions (the certified numerics):
39
33
  * - channelIntegral uses composite Simpson with step ≤ ~4,000 yr
40
34
  * (N ≥ 2, even);
41
35
  * - modulation(tMa, s) takes age in Myr, positive = past, ≡ 1 at J2000;
@@ -63,7 +57,8 @@
63
57
  *
64
58
  * — ż_J2000 is the run's own z-rate at J2000 (script-written into the
65
59
  * artifact by generate.mjs from the banked series: "we are the source"),
66
- * T_q the H/12 taper the arguments' rate anchors ride. Inside the canon it
60
+ * T_q the arguments' secular-completion taper (SECULAR_COMPLETION_TAPER_YEARS,
61
+ * the one the rate anchors ride). Inside the canon it
67
62
  * restores the run's slope exactly; beyond ±T_q it is a constant vector
68
63
  * offset of ~3e-3, the size of the table's own spectrum-class scatter
69
64
  * there, never a growing polynomial. Absent the two fields (an older
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The lunar perigee/node eccentricity sensitivities — ONE home (plan 23).
3
+ *
4
+ * The Sun's mean perturbation on the lunar perigee and node scales as
5
+ * g(e_E) = (1 − e_E²)^(−3/2); the of-date rates ride the channel
6
+ * rate(t) = rate₀ · [g(e_E(t))/g₀]^s. The pair the record fixes is the
7
+ * MEEUS-EFFECTIVE one: s_ϖ = 2.407 / s_Ω = 1.018 reproduce Meeus Ch. 47's
8
+ * of-date T² coefficients exactly (doc 66 §1, the (ė, s) degeneracy). Each of
9
+ * those T² coefficients contains the equinox's own acceleration — the general
10
+ * precession's T² term, a frame bookkeeping share that has nothing to do with
11
+ * Earth's eccentricity. Removing it gives the PHYSICAL pair the three-body
12
+ * laboratory reproduces from pure gravity (2.479 / 0.867; doc 66 §1):
13
+ *
14
+ * s_phys = (s_eff · Ẋ_of-date · κ/2 − T2_frame) / (Ẋ_ICRF · κ/2),
15
+ * κ = 3 e₀ ė₀ / (1 − e₀²), Ẋ_ICRF = Ẋ_of-date − p₀
16
+ *
17
+ * — derived here from the injected constants, never typed. The runtime (plan
18
+ * 23) carries s_phys in the channel and ONE frame term, the model's own
19
+ * precession of date, on every of-date lunar longitude alike, so the
20
+ * frame-free arguments M′ = L′ − ϖ and F = L′ − Ω cancel it exactly at every
21
+ * epoch. Measured before the change (plan 23 §0): with the frame share frozen
22
+ * inside s_eff on the eccentricity channel, M′ and F inherited L′'s frame term
23
+ * uncancelled — 2.5° at ±10 kyr, 39° at −1 Myr — and the perigee and node
24
+ * carried a 3 % share of the channel's own wiggle that is not theirs; in the
25
+ * historical window the change is ≤ 21″ of ϖ/Ω at ±3000 (seconds of eclipse
26
+ * time).
27
+ *
28
+ * The Meeus Ch. 47 argument RATES live here too (the ONE set the arguments
29
+ * module, its pure-Meeus reference and this derivation share).
30
+ */
31
+
32
+ 'use strict';
33
+
34
+ /** Meeus Ch. 47 mean-argument rates, degrees per Julian century (the J2000 polynomials' linear terms). */
35
+ const MEEUS_ARGUMENT_RATES_DEG_PER_CY = Object.freeze({
36
+ Lp: 481267.88123421, // the Moon's mean longitude L′
37
+ D: 445267.1114034, // the mean elongation
38
+ M: 35999.0502909, // the Sun's mean anomaly
39
+ Mp: 477198.8675055, // the Moon's mean anomaly M′
40
+ F: 483202.0175233, // the argument of latitude
41
+ });
42
+
43
+ /** The Meeus-effective pair: Meeus-exact of-date T² by construction (the shipped record values). */
44
+ const MOON_ECC_SENSITIVITY_PERIGEE = 2.407;
45
+ const MOON_ECC_SENSITIVITY_NODE = 1.018;
46
+
47
+ /**
48
+ * The physical pair and the rate split, derived from the shipped constants.
49
+ * @param {{
50
+ * eccentricityJ2000: number,
51
+ * eccentricityDotJ2000: number,
52
+ * frameT2ArcsecPerCy2: number,
53
+ * generalPrecessionArcsecPerYr: number,
54
+ * }} inputs — e₀ (the catalog secular value the Taylor checks use); ė₀ per
55
+ * Julian century; the general precession's T² coefficient the of-date Meeus
56
+ * polynomials embed (Lieske 1976, the ELP frame), ″/cy²; p₀, the IAU 2006 p_A
57
+ * linear rate, ″/yr
58
+ * @returns {Readonly<{
59
+ * perigeeEffective: number, nodeEffective: number,
60
+ * perigeePhysical: number, nodePhysical: number,
61
+ * kappaPerCy: number, frameT2DegPerCy2: number, generalPrecessionDegPerCy: number,
62
+ * perigeeRateOfDateDegPerCy: number, nodeRateOfDateDegPerCy: number,
63
+ * perigeeRateIcrfDegPerCy: number, nodeRateIcrfDegPerCy: number,
64
+ * }>}
65
+ */
66
+ function deriveMoonEccSensitivities({ eccentricityJ2000, eccentricityDotJ2000, frameT2ArcsecPerCy2, generalPrecessionArcsecPerYr }) {
67
+ const R = MEEUS_ARGUMENT_RATES_DEG_PER_CY;
68
+ const e0 = eccentricityJ2000, ed = eccentricityDotJ2000;
69
+ const kappaPerCy = 3 * e0 * ed / (1 - e0 * e0);
70
+ const generalPrecessionDegPerCy = generalPrecessionArcsecPerYr * 100 / 3600;
71
+ const frameT2DegPerCy2 = frameT2ArcsecPerCy2 / 3600;
72
+ const perigeeRateOfDateDegPerCy = R.Lp - R.Mp; // ϖ̇ of date (+4069.0137) = ϖ̇_ICRF + p₀
73
+ const nodeRateOfDateDegPerCy = R.Lp - R.F; // Ω̇ of date (−1934.1363) = Ω̇_ICRF + p₀
74
+ const perigeeRateIcrfDegPerCy = perigeeRateOfDateDegPerCy - generalPrecessionDegPerCy;
75
+ const nodeRateIcrfDegPerCy = nodeRateOfDateDegPerCy - generalPrecessionDegPerCy;
76
+ const half = kappaPerCy / 2;
77
+ const perigeePhysical = (MOON_ECC_SENSITIVITY_PERIGEE * perigeeRateOfDateDegPerCy * half - frameT2DegPerCy2) / (perigeeRateIcrfDegPerCy * half);
78
+ const nodePhysical = (MOON_ECC_SENSITIVITY_NODE * nodeRateOfDateDegPerCy * half - frameT2DegPerCy2) / (nodeRateIcrfDegPerCy * half);
79
+ return Object.freeze({
80
+ perigeeEffective: MOON_ECC_SENSITIVITY_PERIGEE, nodeEffective: MOON_ECC_SENSITIVITY_NODE,
81
+ perigeePhysical, nodePhysical,
82
+ kappaPerCy, frameT2DegPerCy2, generalPrecessionDegPerCy,
83
+ perigeeRateOfDateDegPerCy, nodeRateOfDateDegPerCy, perigeeRateIcrfDegPerCy, nodeRateIcrfDegPerCy,
84
+ });
85
+ }
86
+
87
+ module.exports = { MEEUS_ARGUMENT_RATES_DEG_PER_CY, MOON_ECC_SENSITIVITY_PERIGEE, MOON_ECC_SENSITIVITY_NODE, deriveMoonEccSensitivities };
@@ -33,10 +33,7 @@
33
33
  * pair is 2.479/0.867 after removing the IAU frame term — doc 66 §1).
34
34
  * - The of-date perigee/node periods are COMPOSITIONS of the inertial chain
35
35
  * with the precession of date (the engines' `…OfDateCyclesBetween` count
36
- * identities N_trop − N_anom and N_drac − N_trop). The former 'OfDate'
37
- * family here — N·(H(t)/H₀)² counts per anchor unit and period ∝ T_yr/H —
38
- * was the era device's counter law (doc 99's "Lunar Precession
39
- * Invariant"); it left at plan 09 step 5c with the per-H counts.
36
+ * identities N_trop − N_anom and N_drac − N_trop).
40
37
  * - apsidalMeetsNodal / lunarLeveling existed ONLY in the browser before
41
38
  * this move (the Node scene aliased apsidal-of-date on a cancellation
42
39
  * argument valid for the paired scene nodes only) — the Node engine gains
@@ -70,13 +67,10 @@
70
67
  * eccentricity channel's modulation; constants are the engine's derived
71
68
  * J2000 anchors (both engines derive them from the same JSON).
72
69
  * fns.precessionPeriodYearsAtAge is the engine's lunisolar precession period
73
- * of date T_p(t), Julian years (the composed rate's period; plan 09 step
74
- * 5c — the tropical month's equinox turn, formerly the counter's 13/H(t),
75
- * 0.086 % slow: the chain's J2000 tropical month sat 5.85 ms above the IAU
76
- * input, the 1/T_p form is within 0.1 ms of it).
70
+ * of date T_p(t), Julian years (the composed rate's period — the tropical
71
+ * month's equinox turn; within 0.1 ms of the IAU input at J2000).
77
72
  * fns.distanceMetresAtAge is the engine's CITED distance history
78
- * (deltat/moon-distance-history; plan 12 option A — the internal quartic
79
- * twin this chain carried until then is deleted; null beyond the span).
73
+ * (deltat/moon-distance-history; null beyond the span).
80
74
  */
81
75
  function createMoonMonthChain({ constants, fns }) {
82
76
  const {
@@ -136,8 +130,7 @@ function createMoonMonthChain({ constants, fns }) {
136
130
 
137
131
  /** Tropical month in seconds (equinox-referenced): the sidereal month less
138
132
  * the equinox's own motion over one month — one turn per the precession
139
- * period of date T_p(t). (Plan 09 step 5c: formerly 13 turns per the
140
- * counter H(t), 0.086 % slow.) @param {number} tMa @returns {number | null} */
133
+ * period of date T_p(t). @param {number} tMa @returns {number | null} */
141
134
  function tropicalMonthSecondsAtAge(tMa) {
142
135
  const tSm = siderealMonthSecondsAtAge(tMa);
143
136
  if (tSm === null) return null;
@@ -146,10 +139,8 @@ function createMoonMonthChain({ constants, fns }) {
146
139
  return tSm * (1 - tSm / (/** @type {number} */ (tP) * tYr));
147
140
  }
148
141
 
149
- // (Plan 09 step 5c: the H² of-date family — apsidal/nodal "cycles per H"
150
- // N·(H(t)/H₀)² and the of-date periods ∝ T_yr/H — is deleted with the per-H
151
- // counts. The of-date perigee and node of date are the engines' count
152
- // compositions of this chain's inertial periods with the tropical month.)
142
+ // The of-date perigee and node are the engines' count compositions of this
143
+ // chain's inertial periods with the tropical month.
153
144
 
154
145
  /** Perigee precession period in seconds — Brouwer–Clemence m² scaling ×
155
146
  * e_E-channel modulation (the factored law: period = invariant mean /
@@ -52,14 +52,14 @@
52
52
  * A1-class correlated-subsample effect (the tracked events sit −1.6″
53
53
  * below the +1.4″ fleet mean and sample the near-annual arguments at
54
54
  * correlated phases; the era-split refutes anchor double-counting and
55
- * the modern era improves most, 3.57 → 3.34). The api gate (8″ then; 12″
56
- * since plan 06 R3 item 1 — the physical ΔT-convention floor) holds
55
+ * the modern era improves most, 3.57 → 3.34). The api gate (12″ — the
56
+ * physical ΔT-convention floor) holds
57
57
  * (max 6.2″). Coefficients are stored with the run→real argument
58
58
  * mapping already applied (the extraction's heliocentric-planet vs
59
59
  * geocentric-sun π-offset is folded into the signs).
60
60
  *
61
61
  * THE J2 NODE FAMILY (FQ-7 Round 3, plan §12i) — five derived terms on
62
- * Ω-family arguments (NOT expressible on the integer Delaunay lattice,
62
+ * Ω-family arguments (NOT expressible as integer combinations of the Delaunay arguments,
63
63
  * which is why every earlier extraction missed them; the 200-yr band
64
64
  * probe named them, the dense 2-day JPL sample confirmed them real, and
65
65
  * the channel isolation identified them as EARTH'S J2 acting on the
@@ -11,8 +11,8 @@
11
11
  *
12
12
  * Full scene form: 60 longitude + 60 latitude terms with E/E² scaling on
13
13
  * M-bearing terms, A1 (Venus, Meeus-observed rate — the 18V−16E−M′
14
- * near-resonance makes it hypersensitive; no lattice identity), A2/A3
15
- * (D2-derived lattice rates, CHAIN-INTEGRATED under deep time through
14
+ * near-resonance makes it hypersensitive; no chain identity), A2/A3
15
+ * (D2-derived rates, CHAIN-INTEGRATED under deep time through
16
16
  * their identified content), all six latitude corrections, the EoC-half
17
17
  * subtraction (the off-centre orbit geometry already provides half the
18
18
  * equation of centre), and the two-term ellipse distance.
@@ -26,7 +26,7 @@
26
26
 
27
27
  'use strict';
28
28
 
29
- // Plan 06 R3 item 1: the DERIVED series-extension tail (the D2 planetary and
29
+ // The DERIVED series-extension tail (the D2 planetary and
30
30
  // node terms, moon/series-extension.cjs) is part of the ONE scene Moon —
31
31
  // formerly added by the besselian tier alone, so the rendered Moon and the
32
32
  // eclipse-location Moon were two different Moons. The truncated finder forms
@@ -98,8 +98,6 @@ function createMoonSeries({ constants, fns }) {
98
98
  const nAps = apsidalOfDateCyclesBetween(yA0, yA);
99
99
  // A3 is the STAR-referenced lunar longitude (Meeus' rate 481,266.484 °/cy
100
100
  // ≡ 360°/sidereal month): the chain's sidereal-orbit count directly.
101
- // Plan 09 step 5c — it was the tropical count minus the counter's 13/H
102
- // precession turns (0.086 % slow on the precession).
103
101
  const nSid = siderealOrbitsBetween(yA0, yA);
104
102
  const nJ = jupiterOrbitsBetween(yA0, yA);
105
103
  if (nT !== null && nAps !== null && nSid !== null && nJ !== null) {
@@ -175,9 +173,8 @@ function createMoonSeries({ constants, fns }) {
175
173
  * Returns everything the scene blocks write:
176
174
  * thetaAddRad — the hierarchy θ increment (EoC-half-subtracted Σl);
177
175
  * lonDeg — full ecliptic longitude (GEOMETRIC, mean equinox of date)
178
- * incl. the derived series-extension tail. (The fitted mean-longitude
179
- * anchor moonMeeusLpCorrection was retired to 0 at plan 06 R3 item 1 and
180
- * its parameter deleted at plan 11 step 2: measured against Horizons' apparent
176
+ * incl. the derived series-extension tail. (No fitted mean-longitude
177
+ * anchor — doc 109 §23: measured against Horizons' apparent
181
178
  * Moon over 1970–2049 the series needs no anchor, −1.0″ ± 1.5″ flat in
182
179
  * elongation; the former +32.75″ was the eclipse tier's mean Sun
183
180
  * compensated — its aberration κ, the I2 long inequality and the trend-ΔT