@essrt/physics 23.0.0 → 23.2.0
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.
- package/package.json +7 -2
- package/src/constants/generated.d.ts +4 -3
- package/src/constants/generated.js +5 -4
- package/src/constants/units.cjs +20 -0
- package/src/deltat/deep-time-chain.js +457 -0
- package/src/deltat/deep-time.cjs +42 -13
- package/src/deltat/moon-distance-artifact.cjs +6 -3
- package/src/earth/deep-orbital-history.cjs +44 -15
- package/src/earth/mass-chain.cjs +95 -0
- package/src/earth/mean-obliquity-history.cjs +94 -0
- package/src/earth/precession-composed.cjs +49 -3
- package/src/index.js +17 -0
- package/src/layer0/index.js +20 -6
- package/src/math/angles.cjs +38 -0
- package/src/model.js +76 -227
- package/src/moon/arguments.cjs +5 -31
- package/src/planets/chain-artifact.js +2 -2
- package/src/time/calendar.cjs +165 -0
- package/types/constants/generated.d.ts +4 -3
- package/types/constants/units.d.cts +8 -0
- package/types/deltat/deep-time-chain.d.ts +266 -0
- package/types/deltat/deep-time.d.cts +14 -0
- package/types/deltat/moon-distance-artifact.d.cts +3 -0
- package/types/earth/deep-orbital-history.d.cts +5 -3
- package/types/earth/mass-chain.d.cts +78 -0
- package/types/earth/mean-obliquity-history.d.cts +32 -0
- package/types/earth/precession-composed.d.cts +11 -1
- package/types/index.d.ts +6 -0
- package/types/layer0/index.d.ts +3 -2
- package/types/math/angles.d.cts +18 -0
- package/types/model.d.ts +21 -3
- package/types/moon/arguments.d.cts +2 -6
- package/types/time/calendar.d.cts +78 -0
package/src/model.js
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
* src/lib/essrt.ts) operation-for-operation where FP association matters,
|
|
18
18
|
* which itself mirrors tools/lib/constants.js §9.
|
|
19
19
|
*/
|
|
20
|
-
import { deriveEpochParams } from './layer0/derive-params.js';
|
|
21
20
|
import { buildPlanetChainsFromArtifactData, computePlanetElementsAtYear } from './planets/keplerian-chain.cjs';
|
|
22
21
|
import { createSecularSeriesOverride } from './planets/secular-series.cjs';
|
|
23
22
|
import { computeEquatorNodeOriginSFrameDeg, convertNodeSFrameToEquatorOriginDeg } from './planets/inv-plane-frame.cjs';
|
|
@@ -26,14 +25,11 @@ import { createDeepOrbitalHistory } from './earth/deep-orbital-history.cjs';
|
|
|
26
25
|
import { CHAIN_ARTIFACT } from './planets/chain-artifact.js';
|
|
27
26
|
import { createPlanetSpinChannelFromArtifacts, computeObliquityJ2000Deg } from './planets/spin-channel.cjs';
|
|
28
27
|
import { PLANET_DISPLAY_NAMES } from './planets/display-names.cjs';
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { createMoonDistanceHistory } from './deltat/moon-distance-history.cjs';
|
|
28
|
+
import { createDeepTimeChain } from './deltat/deep-time-chain.js';
|
|
29
|
+
import { computeMassChainJ2000 } from './earth/mass-chain.cjs';
|
|
32
30
|
import { MOON_DISTANCE_ARTIFACT } from './deltat/moon-distance-artifact.cjs';
|
|
33
|
-
import { evalClimateL1OrbitalPermil
|
|
34
|
-
import { createDeepEccChannel } from './moon/deep-ecc-channel.cjs';
|
|
31
|
+
import { evalClimateL1OrbitalPermil } from './climate/l1-orbital.cjs';
|
|
35
32
|
import { DEEP_MODES_ARTIFACT } from './moon/deep-modes-artifact.cjs';
|
|
36
|
-
import { createMoonMonthChain } from './moon/month-chain.cjs';
|
|
37
33
|
import { createChainCycleIntegrator } from './chain-cycles/index.cjs';
|
|
38
34
|
import { createMoonArguments, jdToDecimalYear } from './moon/arguments.cjs';
|
|
39
35
|
import { createMoonSeries } from './moon/series.cjs';
|
|
@@ -52,16 +48,9 @@ import { driver2PeriodSecondsAtAge } from './planets/orbit-chain.cjs';
|
|
|
52
48
|
// here into F.RA_DAY_OFFSET_MS; plan 09 step 5b deleted that family — it was
|
|
53
49
|
// the equation of time's window term of an instrument, not a motion.)
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
* RA offsets above: single source src/script.js _FW_MOON, mirrored as
|
|
59
|
-
* literals in tools/lib/deep-time.js (_ECOMP_S_W/_ECOMP_S_N). Both are
|
|
60
|
-
* Meeus-effective — S_N moved 1.0 → 1.018 with the v4 frame-attribution
|
|
61
|
-
* batch.
|
|
62
|
-
*/
|
|
63
|
-
const MOON_ECC_SENSITIVITY_PERIGEE = 2.407;
|
|
64
|
-
const MOON_ECC_SENSITIVITY_NODE = 1.018;
|
|
51
|
+
// (The Moon-channel eccentricity sensitivities s_ϖ/s_Ω — the [g/g₀]^s exponents of
|
|
52
|
+
// the factored deep-time law — have ONE home since plan 13 B2:
|
|
53
|
+
// deltat/deep-time-chain.js MOON_ECC_SENSITIVITY_PERIGEE / _NODE.)
|
|
65
54
|
|
|
66
55
|
/**
|
|
67
56
|
* Assemble the model surfaces from a resolved constants context + fitted
|
|
@@ -109,7 +98,7 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
109
98
|
// comb) left with that device; no comb phase is evaluated here any more.
|
|
110
99
|
|
|
111
100
|
const meanSiderealYearDays = C.yearLengthRef.siderealYear;
|
|
112
|
-
|
|
101
|
+
// (the sidereal year in SI seconds is the mass chain's own, below)
|
|
113
102
|
// Plan 09: the J2000 day length ω₀ is the SI day (an input); the device's
|
|
114
103
|
// H/13 kinematic-sidereal-days construction (86,399.99968 s) is deleted.
|
|
115
104
|
const meanLengthOfDay = C.yearLengthRef.solarDay;
|
|
@@ -131,7 +120,6 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
131
120
|
const G_CONSTANT = C.physicalConstants.G_CONSTANT;
|
|
132
121
|
const MASS_RATIO_EARTH_MOON = C.physicalConstants.MASS_RATIO_EARTH_MOON;
|
|
133
122
|
const currentAUDistance = C.physicalConstants.currentAUDistance;
|
|
134
|
-
const earthMoiFactorJ2000 = C.physicalConstants.earthMoiFactorJ2000;
|
|
135
123
|
const moonDistanceKm = C.moonReference.moonDistance;
|
|
136
124
|
const moonSiderealMonthInput = C.moonReference.moonSiderealMonthInput;
|
|
137
125
|
|
|
@@ -139,153 +127,54 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
139
127
|
// eighth-integer-per-8H count read it back 7.8 ms long; deleted).
|
|
140
128
|
const moonSiderealMonth = moonSiderealMonthInput;
|
|
141
129
|
|
|
142
|
-
//
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
const
|
|
130
|
+
// The mass chain (Moon Kepler → GM_EM → the Earth/Moon split → the Sun, §9
|
|
131
|
+
// order) — ONE home since plan 13 B3: earth/mass-chain.cjs (the deep-time
|
|
132
|
+
// chain below computes the same scalars from the same context).
|
|
133
|
+
const mass = computeMassChainJ2000({
|
|
134
|
+
moonDistanceKm, moonSiderealMonthDays: moonSiderealMonth, meanSiderealYearDays,
|
|
135
|
+
meanLengthOfDaySeconds: meanLengthOfDay, massRatioEarthMoon: MASS_RATIO_EARTH_MOON,
|
|
136
|
+
currentAUDistanceKm: currentAUDistance, gravitationalConstantKm3KgS2: G_CONSTANT,
|
|
137
|
+
});
|
|
138
|
+
const moonOrbitalShift = mass.moonOrbitalShiftKm;
|
|
139
|
+
const moonDistanceCorrected = mass.moonDistanceCorrectedKm;
|
|
140
|
+
const GM_EARTH_MOON_SYSTEM = mass.gmEarthMoonSystemKm3S2;
|
|
141
|
+
const GM_EARTH_ALONE = mass.gmEarthAloneKm3S2;
|
|
142
|
+
const GM_MOON_ALONE = mass.gmMoonAloneKm3S2;
|
|
143
|
+
const GM_SUN_PLUS_EARTH = mass.gmSunPlusEarthKm3S2;
|
|
144
|
+
const GM_SUN = mass.gmSunKm3S2;
|
|
145
|
+
const M_SUN = mass.sunMassKg;
|
|
157
146
|
|
|
147
|
+
// ── THE DEEP-TIME CHAIN — ONE assembly (plan 13 B2) ──────────────────────
|
|
148
|
+
// The GIA α channel (the lagged response to the L1 ice history, with the R2
|
|
149
|
+
// lattice pin and the exact-argument memo), the Layer-0 bundle, the cited
|
|
150
|
+
// Earth–Moon distance history (plan 12 option A), the ΔT cycle stack (all
|
|
151
|
+
// channels ON here), |s₃|, the LOD/ΔT core and the lunar month chain are
|
|
152
|
+
// assembled once in deltat/deep-time-chain.js from this context's constants
|
|
153
|
+
// and fitted coefficients (so a counterfactual context flows through them);
|
|
154
|
+
// the Node twin and the browser destructure the same module.
|
|
155
|
+
const chain = createDeepTimeChain({
|
|
156
|
+
constants: C, fitted: F, deepModes: DEEP_MODES_ARTIFACT, moonDistanceArtifact: MOON_DISTANCE_ARTIFACT,
|
|
157
|
+
ageAnchorYear: startmodelYear,
|
|
158
|
+
});
|
|
159
|
+
const { alphaGia, earthMoiFactorAtAge, EPOCH_PARAMS, recession, dtCycles, dtCycleLodCorrectionSum, s3ArcsecPerYr, deepLod, deepEcc, moonChain } = chain;
|
|
160
|
+
const CLIMATE_REGIME = F.CLIMATE_FORMULA_COEFFS.regimes['lr04-post-mpt'];
|
|
158
161
|
/** The climate formula's L1 (unlagged) — the orbital δ¹⁸O layer itself. @param {number} year @returns {number} */
|
|
159
162
|
const evalClimateL1 = (year) => evalClimateL1OrbitalPermil(year, {
|
|
160
163
|
l1Terms: CLIMATE_REGIME.L1,
|
|
161
164
|
yStdDenormalization: CLIMATE_REGIME.denormalization.y_std,
|
|
162
165
|
});
|
|
163
|
-
// ONE home (climate/l1-orbital.cjs): k derived from the Cox–Chao rate, τ the
|
|
164
|
-
// record-measured relaxation time (plan 06 D7). Same construction in
|
|
165
|
-
// src/script.js, tools/lib/deep-time.js and the website's essrt.ts.
|
|
166
|
-
const alphaGia = createAlphaGiaChannel({
|
|
167
|
-
l1Terms: CLIMATE_REGIME.L1,
|
|
168
|
-
yStdDenormalization: CLIMATE_REGIME.denormalization.y_std,
|
|
169
|
-
relaxationKyr: C.deepTime.alphaGiaRelaxationKyr,
|
|
170
|
-
alphaGiaRateJ2000PerYr: C.deepTime.alphaGiaRateJ2000PerYr,
|
|
171
|
-
alphaJ2000: earthMoiFactorJ2000,
|
|
172
|
-
// the channel's second observable, J₂(t)/J₂₀ — scaled on the OBSERVED
|
|
173
|
-
// dJ₂/dt; consumed by the spin integration below (the precession of date)
|
|
174
|
-
j2RateJ2000PerYr: C.deepTime.j2RateJ2000PerYr,
|
|
175
|
-
j2J2000: C.physicalConstants.earthJ2,
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// Exact-argument memo (mirrors src/script.js + tools/lib/deep-time.js —
|
|
179
|
-
// the round-5 perf campaign): same tMa → bit-identical value; bounded by
|
|
180
|
-
// wholesale clear. (Plan 09 step 7a: the lattice-α pin branch left with
|
|
181
|
-
// the ∫dt/H_era phase table, the one table this model built under it.)
|
|
182
|
-
/** @type {Map<number, number>} */
|
|
183
|
-
const alphaMemo = new Map();
|
|
184
|
-
/** @param {number} tMa @returns {number} */
|
|
185
|
-
const earthMoiFactorAtAge = (tMa) => {
|
|
186
|
-
let v = alphaMemo.get(tMa);
|
|
187
|
-
if (v === undefined) {
|
|
188
|
-
v = alphaGia.alphaAt(2000 - tMa * 1e6);
|
|
189
|
-
if (alphaMemo.size >= 8192) alphaMemo.clear();
|
|
190
|
-
alphaMemo.set(tMa, v);
|
|
191
|
-
}
|
|
192
|
-
return v;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// ── Layer 0 + deep-time core ──────────────────────────────────────────────
|
|
196
|
-
const EPOCH_PARAMS = deriveEpochParams({
|
|
197
|
-
solarLuminosityW: C.physicalConstants.solarLuminosityW,
|
|
198
|
-
solarWindKgPerS: C.physicalConstants.solarWindMassLossKgPerS,
|
|
199
|
-
speedOfLightKmPerS: C.physicalConstants.speedOfLight,
|
|
200
|
-
alpha1PerMa: C.deepTime.alpha1PerMa,
|
|
201
|
-
meanSiderealYearSeconds,
|
|
202
|
-
lodJ2000Seconds: meanLengthOfDay, // plan 09: ω₀ = the SI day (was the H/13 kinematic day)
|
|
203
|
-
sunMassKg: M_SUN,
|
|
204
|
-
gmEarthAloneKm3S2: GM_EARTH_ALONE,
|
|
205
|
-
gmMoonAloneKm3S2: GM_MOON_ALONE,
|
|
206
|
-
gravitationalConstantKm3KgS2: G_CONSTANT,
|
|
207
|
-
earthMoiFactorJ2000,
|
|
208
|
-
earthDiameterKm: C.bodyDiametersKm.earth,
|
|
209
|
-
moonDistanceKm,
|
|
210
|
-
moonOrbitalEccentricity: C.moonReference.moonOrbitalEccentricityBase,
|
|
211
|
-
gmEarthMoonSystemKm3S2: GM_EARTH_MOON_SYSTEM,
|
|
212
|
-
// the solar precession torque's inputs (plan 06 Phase 3: the unit H(t) = 13·T_p,composed)
|
|
213
|
-
gmSunKm3S2: GM_SUN,
|
|
214
|
-
astronomicalUnitKm: currentAUDistance,
|
|
215
|
-
earthOrbitalEccentricityJ2000: C.earthOrbital.earthEccentricityJ2000,
|
|
216
|
-
moonEclipticInclinationJ2000Deg: C.moonReference.moonEclipticInclinationJ2000,
|
|
217
|
-
// p₀'s period — the tropical year of date's equinox term (plan 09 step 5d)
|
|
218
|
-
axialPrecessionJ2000Years: certifiedAxialPrecessionJ2000Years(),
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
// ── The Earth–Moon distance history — a CITED PHYSICAL INPUT (plan 12, option A)
|
|
222
|
-
// Farhat et al. 2022 (the AstroGeo22 ephemeris, embedded VERBATIM by the
|
|
223
|
-
// constants generator) read as the ratio a(t)/a(0) on the model's own J2000
|
|
224
|
-
// anchor, the J2000 slope the LLR observation α₁; null beyond its span. LOD
|
|
225
|
-
// follows by angular-momentum conservation with the J2000 L_EM constant —
|
|
226
|
-
// the former quartic, regime spline and solar-channel budget are deleted.
|
|
227
|
-
const recession = createMoonDistanceHistory({
|
|
228
|
-
table: MOON_DISTANCE_ARTIFACT,
|
|
229
|
-
aMoonNowMetres: EPOCH_PARAMS.moonDistanceNowM,
|
|
230
|
-
alpha1PerMa: EPOCH_PARAMS.alpha1PerMa,
|
|
231
|
-
});
|
|
232
166
|
const moonDistanceMetresAtAge = recession.distanceMetresAtAge;
|
|
233
167
|
/** The published surfaces' km reading — NaN beyond the cited history's span (the API's
|
|
234
168
|
* validity span lies inside it; the deep charts stop where the input stops).
|
|
235
169
|
* @param {number} year @returns {number} */
|
|
236
170
|
const moonDistanceKmAtYearOrNaN = (year) => { const m = moonDistanceMetresAtAge(yearToTMa(year)); return m === null ? NaN : m / 1000; };
|
|
237
171
|
|
|
238
|
-
const DT = F.DT_STACK;
|
|
239
|
-
const RES = F.DT_RESONATOR;
|
|
240
|
-
// Periods STATED IN YEARS (the fit files' period_yr / T0_yr): plan 06 T5
|
|
241
|
-
// measured the former 8H/n labels chance-level; layer B item 3 removed the
|
|
242
|
-
// divisor from every runtime. Twins: tools/lib/deep-time.js, src/script.js,
|
|
243
|
-
// the website's essrt.ts.
|
|
244
|
-
const dtCycles = createDeltaTCycles({
|
|
245
|
-
taperFullHalfwidthYears: C.deepTime.dtStackTaperFullHalfwidthYr,
|
|
246
|
-
taperTotalHalfwidthYears: C.deepTime.dtStackTaperTotalHalfwidthYr,
|
|
247
|
-
tropicalYearSecondsJ2000: meanTropicalYearJ2000Seconds,
|
|
248
|
-
cycles: {
|
|
249
|
-
bond: { periodYears: DT.bond.period_yr, cosCoeffSeconds: DT.bond.cos_coeff_s, sinCoeffSeconds: DT.bond.sin_coeff_s },
|
|
250
|
-
hallstatt: { periodYears: DT.hallstatt.period_yr, cosCoeffSeconds: DT.hallstatt.cos_coeff_s, sinCoeffSeconds: DT.hallstatt.sin_coeff_s },
|
|
251
|
-
jose5: { periodYears: DT.jose5.period_yr, cosCoeffSeconds: DT.jose5.cos_coeff_s, sinCoeffSeconds: DT.jose5.sin_coeff_s },
|
|
252
|
-
jose4: { periodYears: DT.jose4.period_yr, cosCoeffSeconds: DT.jose4.cos_coeff_s, sinCoeffSeconds: DT.jose4.sin_coeff_s },
|
|
253
|
-
},
|
|
254
|
-
resonator: {
|
|
255
|
-
t0Years: RES.T0_yr,
|
|
256
|
-
q: RES.Q,
|
|
257
|
-
kicks: RES.kick_epochs_year.map(/** @param {number} t @param {number} i */ (t, i) => ({
|
|
258
|
-
tYear: t,
|
|
259
|
-
cosSeconds: RES.kick_coefficients_s[i].cos,
|
|
260
|
-
sinSeconds: RES.kick_coefficients_s[i].sin,
|
|
261
|
-
})),
|
|
262
|
-
tones: RES.drive_tones.map(/** @param {{period_yr: number, phi_locked_rad: number, amp_s: number}} t */ (t) => ({ periodYears: t.period_yr, phiLockedRad: t.phi_locked_rad, ampSeconds: t.amp_s })),
|
|
263
|
-
},
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
/** Layer-3/4 cyclic δLOD sum (all shipped channels ON). @param {number} year @returns {number} */
|
|
267
|
-
const dtCycleLodCorrectionSum = (year) =>
|
|
268
|
-
dtCycles.cycleLodSecondsAt('bond', year)
|
|
269
|
-
+ dtCycles.cycleLodSecondsAt('hallstatt', year)
|
|
270
|
-
+ dtCycles.cycleLodSecondsAt('jose5', year)
|
|
271
|
-
+ dtCycles.cycleLodSecondsAt('jose4', year)
|
|
272
|
-
+ dtCycles.swingLodSecondsAt(year);
|
|
273
|
-
|
|
274
|
-
// Plan 06 S6 — |s₃|, the dominant nodal mode of Earth's orbit: the
|
|
275
|
-
// largest-amplitude ζ mode of the banked deep secular modes (the recipe
|
|
276
|
-
// the registry's `eclPrecYears`/`obliqCycleYears` and the browser's
|
|
277
|
-
// obliquity-beat helper use). ONE home here; the deep-time factory's
|
|
278
|
-
// ecliptic missing-motion term, the lunisolar surface and the API read it.
|
|
279
|
-
const s3ArcsecPerYr = (() => {
|
|
280
|
-
const z = DEEP_MODES_ARTIFACT.earthZeta
|
|
281
|
-
.filter((m) => Math.abs(m.omegaRadPerYr) > 1e-9)
|
|
282
|
-
.sort((a, b) => Math.hypot(b.re, b.im) - Math.hypot(a.re, a.im))[0];
|
|
283
|
-
return Math.abs((z.omegaRadPerYr * 180) / Math.PI) * 3600;
|
|
284
|
-
})();
|
|
285
|
-
|
|
286
172
|
/** THE REALIZED POLE RATE OVER A WINDOW, ″/yr — the mean over [yearFrom, yearTo] of the rate the spin
|
|
287
173
|
* integration actually turns the pole at: the inertial secular rate of date × the solar-torque factor at
|
|
288
174
|
* e(t) × J₂(t)/J₂₀ × cos ε(t)/cos ε₀ (ds/dt = α (ŝ·n̂)(ŝ×n̂): the azimuthal rate about n̂ is α cos ε).
|
|
175
|
+
* The secular rate here is the CONSTANT's scaling (lunisolarTorqueRate…), not the published rate of
|
|
176
|
+
* date: the hybrid's own ε(t) carries the ONE cosine, so the cited mean obliquity's factor (plan 12 §8)
|
|
177
|
+
* does not enter twice — inside the ζ-series span the hybrid IS the model's obliquity of date.
|
|
289
178
|
* Measured (2026-10): the dominant obliquity line of the model's own ε(t) over the last 5 Myr sits at
|
|
290
179
|
* this mean minus |s₃| (40,938 fitted vs 40,936 predicted), NOT at the J2000 beat (41,098) — the pole
|
|
291
180
|
* turned faster in the past (spin +0.06 ″/yr over 5 Myr, lower mean obliquity +0.05, higher mean
|
|
@@ -306,7 +195,7 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
306
195
|
const kInertial = certifiedAxialPrecessionJ2000Years() / oneSourceM.axialPrecessionYearsLunisolarJ2000;
|
|
307
196
|
let sum = 0, n = 0;
|
|
308
197
|
for (let y = lo; y <= hi; y += stepYears) {
|
|
309
|
-
const r = deepLod.
|
|
198
|
+
const r = deepLod.lunisolarTorqueRateArcsecPerYrAtAge(yearToTMa(y));
|
|
310
199
|
const psiDot = (r === null ? 1296000 / certifiedAxialPrecessionJ2000Years() : r) * kInertial;
|
|
311
200
|
const f = oneSourceM.precessionOfDateFactorsAt(y);
|
|
312
201
|
sum += psiDot * f.solarTorque * (useEllipticity ? f.ellipticity : 1) * Math.cos(oneSourceM.epsAt(y) * Math.PI / 180) / cosEps0;
|
|
@@ -315,38 +204,6 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
315
204
|
return sum / n;
|
|
316
205
|
};
|
|
317
206
|
|
|
318
|
-
const deepLod = createDeepTimeLod({
|
|
319
|
-
constants: {
|
|
320
|
-
lTotalEmKgm2S: EPOCH_PARAMS.totalAngularMomentumKgM2S,
|
|
321
|
-
mMoonAloneKg: EPOCH_PARAMS.moonMassKg,
|
|
322
|
-
mEarthAloneKg: EPOCH_PARAMS.earthMassKg,
|
|
323
|
-
rEarthMetres: EPOCH_PARAMS.earthRadiusM,
|
|
324
|
-
gmEmM3PerS2: EPOCH_PARAMS.gmEarthMoonM3S2,
|
|
325
|
-
eFactorMoon: EPOCH_PARAMS.moonEccentricityFactor,
|
|
326
|
-
aLockMetres: EPOCH_PARAMS.moonLockDistanceM,
|
|
327
|
-
aMoonNowMetres: EPOCH_PARAMS.moonDistanceNowM,
|
|
328
|
-
alpha1PerMa: EPOCH_PARAMS.alpha1PerMa,
|
|
329
|
-
lodNowH13Seconds: EPOCH_PARAMS.lodNowH13Seconds,
|
|
330
|
-
meanSiderealYearJ2000Seconds: meanSiderealYearSeconds,
|
|
331
|
-
solarMassLossFracPerYear: EPOCH_PARAMS.solarMassLossFracPerYear,
|
|
332
|
-
precessionSolarShareJ2000: EPOCH_PARAMS.precessionSolarShareJ2000,
|
|
333
|
-
},
|
|
334
|
-
moonDistanceMetresAtAge,
|
|
335
|
-
moiFactorAtAge: earthMoiFactorAtAge,
|
|
336
|
-
// S5: the composed clock's J2000 anchor — the certified year laws' beat
|
|
337
|
-
// at 2000 (ONE home below, shared with the hybrid's self-anchor); lazy.
|
|
338
|
-
precessionPeriodJ2000YearsFn: () => certifiedAxialPrecessionJ2000Years(),
|
|
339
|
-
// Plan 06 T2 item: the solar day's ecliptic missing-motion term rides the
|
|
340
|
-
// nodal period 1,296,000/|s₃| (orbital), not the spin unit's H/5.
|
|
341
|
-
nodalPeriodYearsFn: () => 1296000 / s3ArcsecPerYr,
|
|
342
|
-
cycleLodSumAt: dtCycleLodCorrectionSum,
|
|
343
|
-
swingLodAt: (year) => dtCycles.swingLodSecondsAt(year),
|
|
344
|
-
swingLodRateAt: (year) => dtCycles.swingLodRateAt(year),
|
|
345
|
-
// plan 12 option A: L_EM is the J2000 constant (conservation; no channels);
|
|
346
|
-
// the LOD-rate decomposition's tidal term reads the history's analytic slope.
|
|
347
|
-
moonDistanceSlopeMetresPerMaAtAge: recession.slopeMetresPerMaAtAge,
|
|
348
|
-
});
|
|
349
|
-
|
|
350
207
|
// (Plan 09 step 7a: the integrated ∫dt/H_era phase table and its counter
|
|
351
208
|
// `cyclesBetween` — the frozen era clock's own convention H_era =
|
|
352
209
|
// H₀·LOD/LOD₀, plan 06 D8's second named counter, which every FROZEN comb
|
|
@@ -421,7 +278,7 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
421
278
|
// cardinal braid) reads the one-source series below (plan 06 layer B —
|
|
422
279
|
// the two agree within 4.2e-5 in-era). The laws hook deliberately does
|
|
423
280
|
// NOT reach this channel.
|
|
424
|
-
|
|
281
|
+
// (`deepEcc` is the deep-time chain's, destructured above.)
|
|
425
282
|
/** @param {number} year @returns {number} */
|
|
426
283
|
// Plan 06 layer B: the PUBLISHED Earth eccentricity is the one-source series
|
|
427
284
|
// (|z|, the secular orbit); the SUN's e adds the derived mean offset (see
|
|
@@ -534,6 +391,12 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
534
391
|
// 108.6 ± 8.5 ″/yr at 2.46 Ga; the composed rate reads 104.5).
|
|
535
392
|
const seriesArt = /** @type {any} */ (secularSeriesArtifact);
|
|
536
393
|
const sb = seriesArt && seriesArt.bodies && seriesArt.bodies.earth;
|
|
394
|
+
// Plan 12 §8.5 (owner): the hybrid's own domain is the banked ζ series' span (years; null
|
|
395
|
+
// without a series). Beyond it the ζ-mode tail carries the Quaternary mean with no tidal
|
|
396
|
+
// evolution — the API refuses the obliquity there and serves the cited mean beside it.
|
|
397
|
+
const obliquityHybridDomainYears = sb
|
|
398
|
+
? /** @type {[number, number]} */ ([2000 + seriesArt.t0Yr, 2000 + seriesArt.t0Yr + (sb.zetaQ.length - 1) * sb.stepYr])
|
|
399
|
+
: null;
|
|
537
400
|
const hist = createDeepOrbitalHistory({
|
|
538
401
|
zModes: DEEP_MODES_ARTIFACT.earthZ,
|
|
539
402
|
zetaModes: DEEP_MODES_ARTIFACT.earthZeta,
|
|
@@ -553,7 +416,10 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
553
416
|
// rendering-device residual imported as the initial condition of the
|
|
554
417
|
// physics (found when the package began publishing the hybrid).
|
|
555
418
|
obliquityJ2000Deg: C.earthOrbital.obliquityJ2000_deg,
|
|
556
|
-
|
|
419
|
+
// The CONSTANT's scaling (the torque period), not the published rate of date: the
|
|
420
|
+
// integration's own ŝ·n̂ carries the obliquity's cosine, so the cited mean obliquity's
|
|
421
|
+
// factor (plan 12 §8 option (a)) must not enter twice. Bit-identical to the pre-§8 form.
|
|
422
|
+
axialPrecessionYearsAtYearFn: (yr) => deepLod.lunisolarTorquePeriodYearsAtAge((startmodelYear - yr) / 1e6) ?? axial0,
|
|
557
423
|
// THE PRECESSION OF DATE (plan 06 §9 item 10): on top of the secular
|
|
558
424
|
// law above, the solar torque at the eccentricity of date and the
|
|
559
425
|
// oblateness of date from the GIA channel — both exactly 1 at J2000,
|
|
@@ -606,6 +472,8 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
606
472
|
periOfDateDegAt: (year) => sampleAt(year).periOfDateDeg,
|
|
607
473
|
/** The hybrid's obliquity at a decimal year, degrees — the banked series inside its span, the α(t)-coupled ζ-tail integration beyond (the deep sampler grows ~0.1 s/Myr). @param {number} year @returns {number} */
|
|
608
474
|
epsAt: (year) => sampleAt(year).epsDeg,
|
|
475
|
+
/** The hybrid's own domain, [yearFrom, yearTo] — the banked ζ series' span (plan 12 §8.5); null without a series. */
|
|
476
|
+
obliquityHybridDomainYears,
|
|
609
477
|
/** The precession of date's two factors at a decimal year (the factory's own — ONE home). @param {number} year @returns {{solarTorque: number, ellipticity: number}} */
|
|
610
478
|
precessionOfDateFactorsAt: (year) => hist.precessionOfDateFactorsAt(year - 2000),
|
|
611
479
|
/** The spin axis's INERTIAL precession period at J2000, years — the self-anchored
|
|
@@ -938,11 +806,7 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
938
806
|
// (perigee advances, node regresses), T_p the J2000 precession anchor.
|
|
939
807
|
// The retired era device counted these as eighth-integers per 8H and read
|
|
940
808
|
// the periods back as totalDaysInH/N (the ∓13 was H/13 cycles per H).
|
|
941
|
-
const
|
|
942
|
-
const moonNodalOfDateJ2000Seconds = C.moonReference.moonNodalPrecessionDaysInputICRF * 86400;
|
|
943
|
-
const moonApsidalJ2000Seconds = 1 / (1 / moonApsidalOfDateJ2000Seconds - 1 / (axialPrecessionJ2000Days * 86400));
|
|
944
|
-
const moonNodalJ2000Seconds = 1 / (1 / moonNodalOfDateJ2000Seconds + 1 / (axialPrecessionJ2000Days * 86400));
|
|
945
|
-
const moonSiderealMonthJ2000Seconds = moonSiderealMonth * 86400;
|
|
809
|
+
const { moonApsidalJ2000Seconds } = chain;
|
|
946
810
|
// (Plan 09 step 5c: the per-H of-date cycle counts and the month chain's H²
|
|
947
811
|
// scaling of the of-date periods are deleted; the of-date perigee/node are
|
|
948
812
|
// the chain's count compositions.)
|
|
@@ -952,40 +816,9 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
952
816
|
const moonAnomalisticMonthDays = 1 / (1 / moonSiderealMonth - 86400 / moonApsidalJ2000Seconds);
|
|
953
817
|
const moonSynodicMonthDays = moonSiderealMonth * meanSiderealYearDays / (meanSiderealYearDays - moonSiderealMonth);
|
|
954
818
|
|
|
955
|
-
//
|
|
956
|
-
//
|
|
957
|
-
//
|
|
958
|
-
|
|
959
|
-
// Layer-2 month/precession chain (Brouwer-Clemence m² scaling × the
|
|
960
|
-
// e_E-line modulation)
|
|
961
|
-
const moonChain = createMoonMonthChain({
|
|
962
|
-
constants: {
|
|
963
|
-
aMoonNowMetres: EPOCH_PARAMS.moonDistanceNowM,
|
|
964
|
-
gmEarthMoonM3PerS2: EPOCH_PARAMS.gmEarthMoonM3S2,
|
|
965
|
-
massRatioEarthMoon: MASS_RATIO_EARTH_MOON,
|
|
966
|
-
moonSiderealMonthInputDays: moonSiderealMonthInput,
|
|
967
|
-
meanSiderealYearJ2000Seconds: meanSiderealYearSeconds,
|
|
968
|
-
moonApsidalJ2000Seconds,
|
|
969
|
-
moonNodalJ2000Seconds,
|
|
970
|
-
moonSiderealMonthJ2000Seconds,
|
|
971
|
-
sPerigee: MOON_ECC_SENSITIVITY_PERIGEE,
|
|
972
|
-
sNode: MOON_ECC_SENSITIVITY_NODE,
|
|
973
|
-
},
|
|
974
|
-
fns: {
|
|
975
|
-
meanLodSecondsAtAge: /** @param {number} tMa */ (tMa) => deepLod.lodSecondsAtAge(tMa),
|
|
976
|
-
meanSiderealYearSecondsAtAge: /** @param {number} tMa */ (tMa) => deepLod.siderealYearSecondsAtAge(tMa),
|
|
977
|
-
// plan 09 step 5c: the tropical month's equinox turn is one per T_p(t)
|
|
978
|
-
precessionPeriodYearsAtAge: /** @param {number} tMa */ (tMa) => deepLod.lunisolarPrecessionPeriodYearsAtAge(tMa),
|
|
979
|
-
// Decision (ii) (owner-approved MODEL CHANGE, plan 02 §8): the whole
|
|
980
|
-
// lunar chain — this modulation, the integrated cycle counts it
|
|
981
|
-
// drives, the arguments' eccAt/channelIntegral and the E-factor —
|
|
982
|
-
// reads the ONE deep e. The era shift in the ancient eclipse stack is
|
|
983
|
-
// accepted and rebaselined with its explanation (deep e is
|
|
984
|
-
// La2004-corroborated in-era).
|
|
985
|
-
modulation: /** @param {number} tMa @param {number} s */ (tMa, s) => deepEcc.modulation(tMa, s),
|
|
986
|
-
distanceMetresAtAge: moonDistanceMetresAtAge,
|
|
987
|
-
},
|
|
988
|
-
});
|
|
819
|
+
// The Layer-2 month/precession chain (Brouwer-Clemence m² scaling × the
|
|
820
|
+
// e_E-line modulation on the ONE deep e — decision (ii), plan 02 §8) is
|
|
821
|
+
// the deep-time chain's `moonChain` above.
|
|
989
822
|
|
|
990
823
|
// Chain-cycle integrator. S5/S12 conventions: age anchor = startmodelYear
|
|
991
824
|
// (the scene's t_Ma convention), grid anchor C(2000) = 0 — grid anchor ≠
|
|
@@ -1586,10 +1419,18 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
1586
1419
|
// ±26 kyr) and T_peri/T_p with T_peri = 1/(1/T_p + 1/T_aps) the
|
|
1587
1420
|
// perihelion-of-date period (0.812 at J2000) — on the of-date T_p.
|
|
1588
1421
|
lunisolar: Object.freeze({
|
|
1589
|
-
/** The mean lunisolar precession period T_p(t), years — the
|
|
1422
|
+
/** The mean lunisolar precession period T_p(t), years — 1,296,000/the precession RATE of date (25,771.6 at J2000): THE published deep-time clock. @param {number} year @returns {number} */
|
|
1590
1423
|
meanPeriodYearsAtYear: (year) => { const p = deepLod.lunisolarPrecessionPeriodYearsAtAge(yearToTMa(year)); return p === null ? certifiedAxialPrecessionJ2000Years() : p; },
|
|
1591
|
-
/**
|
|
1424
|
+
/** THE PRECESSION RATE OF DATE ψ̇(t) = [ω/ω₀]·p₀·[f_S + (1 − f_S)(a₀/a_M)³] × cos ε̄(t)/cos ε̄(0), ″/yr — the constant's scaling on the spin and the lunar torque times the cited mean obliquity's cosine (plan 12 §8 option (a); p₀ = 50.2880, the IAU 2006 input). @param {number} year @returns {number} */
|
|
1592
1425
|
meanRateArcsecPerYrAtYear: (year) => { const r = deepLod.lunisolarPrecessionRateArcsecPerYrAtAge(yearToTMa(year)); return r === null ? 1296000 / certifiedAxialPrecessionJ2000Years() : r; },
|
|
1426
|
+
/** THE PRECESSION CONSTANT OF DATE as a rate on the J2000 obliquity, ″/yr — the spin and torque scaling alone (the hybrid obliquity integration's integrand: its own ŝ·n̂ carries the cosine). @param {number} year @returns {number} */
|
|
1427
|
+
torqueRateArcsecPerYrAtYear: (year) => { const r = deepLod.lunisolarTorqueRateArcsecPerYrAtAge(yearToTMa(year)); return r === null ? 1296000 / certifiedAxialPrecessionJ2000Years() : r; },
|
|
1428
|
+
/** 1,296,000/the torque rate, years. @param {number} year @returns {number} */
|
|
1429
|
+
torquePeriodYearsAtYear: (year) => { const p = deepLod.lunisolarTorquePeriodYearsAtAge(yearToTMa(year)); return p === null ? certifiedAxialPrecessionJ2000Years() : p; },
|
|
1430
|
+
/** cos ε̄(t)/cos ε̄(0) — the rate of date's obliquity factor on the constant (1 at J2000; 1.0075 at the Devonian, 1.0245 at 2.46 Ga). @param {number} year @returns {number} */
|
|
1431
|
+
precessionObliquityFactorAtYear: (year) => { const f = deepLod.precessionObliquityFactorAtAge(yearToTMa(year)); return f === null ? 1 : f; },
|
|
1432
|
+
/** THE CITED MEAN OBLIQUITY OF DATE ε̄(t), degrees — Farhat et al. 2022's own column of the Earth–Moon history (a Myr-scale MEAN: 23.25° at age 0 against the J2000 instant 23.44°; 22.23° Devonian, 19.73° at 2.46 Ga); read as the shape cos ε̄(t)/cos ε̄(0) on the precession rate. NaN beyond the input's span (4,429 Ma); forward of J2000 the J2000 slope is held. @param {number} year @returns {number} */
|
|
1433
|
+
meanObliquityCitedDegAtYear: (year) => { const e = chain.meanObliquityCitedDegAtAge(yearToTMa(year)); return e === null ? NaN : e; },
|
|
1593
1434
|
/** The of-date period — the one-family beat inside ±2 Myr, the composed mean beyond. @param {number} year @returns {number} */
|
|
1594
1435
|
ofDatePeriodYearsAtYear: publishedAxialPrecessionYearsAtYear,
|
|
1595
1436
|
/** f_S, the solar fraction of the J2000 precession torque. */
|
|
@@ -1682,7 +1523,15 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
|
|
|
1682
1523
|
// fitted 16-harmonic K comb that sat beside it as `obliquityCombDeg`
|
|
1683
1524
|
// (a device fitted to the scene's own wheel geometry, 1.27° off
|
|
1684
1525
|
// La2004 at −20 kyr) is deleted with the frozen era device (plan 09).
|
|
1526
|
+
// Beyond the ζ series' span (±10 Myr) the hybrid carries NO tidal evolution
|
|
1527
|
+
// of the mean obliquity (nothing in ds/dt = α(ŝ·n̂)(ŝ×n̂) moves ŝ·n̂'s mean):
|
|
1528
|
+
// its deep mean is the Quaternary mean on the tail's mean plane (plan 12
|
|
1529
|
+
// §8.3). The cited mean obliquity of date is `meanObliquityCitedDeg`.
|
|
1685
1530
|
obliquityDeg: /** @param {number} year @returns {number} */ (year) => oneSourceM.epsAt(year),
|
|
1531
|
+
/** The hybrid's own domain, [yearFrom, yearTo] — the banked ζ series' span, ±10 Myr about J2000 (plan 12 §8.5: the published surfaces serve `obliquityDeg` inside it only; null without a series, i.e. a bare createModel()). */
|
|
1532
|
+
obliquityHybridDomainYears: oneSourceM.obliquityHybridDomainYears,
|
|
1533
|
+
/** The cited mean obliquity of date ε̄(t) (Farhat et al. 2022's column; plan 12 §8 option (a)), degrees — a Myr-scale mean; NaN beyond 4,429 Ma. @param {number} year @returns {number} */
|
|
1534
|
+
meanObliquityCitedDeg: /** @param {number} year @returns {number} */ (year) => { const e = chain.meanObliquityCitedDegAtAge(yearToTMa(year)); return e === null ? NaN : e; },
|
|
1686
1535
|
eccentricity: eccentricityAt,
|
|
1687
1536
|
inclinationDeg,
|
|
1688
1537
|
ascendingNodeDeg,
|
package/src/moon/arguments.cjs
CHANGED
|
@@ -38,37 +38,11 @@
|
|
|
38
38
|
|
|
39
39
|
'use strict';
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function jdToDecimalYear(jd) {
|
|
47
|
-
const J = jd + 0.5;
|
|
48
|
-
const Z = Math.floor(J);
|
|
49
|
-
const F = J - Z;
|
|
50
|
-
let A = Z;
|
|
51
|
-
if (Z >= 2299161) {
|
|
52
|
-
const alpha = Math.floor((Z - 1867216.25) / 36524.25);
|
|
53
|
-
A = Z + 1 + alpha - Math.floor(alpha / 4);
|
|
54
|
-
}
|
|
55
|
-
const B = A + 1524;
|
|
56
|
-
const C = Math.floor((B - 122.1) / 365.25);
|
|
57
|
-
const D = Math.floor(365.25 * C);
|
|
58
|
-
const E = Math.floor((B - D) / 30.6001);
|
|
59
|
-
const day = B - D - Math.floor(30.6001 * E) + F;
|
|
60
|
-
const month = (E < 14) ? E - 1 : E - 13;
|
|
61
|
-
const year = (month > 2) ? C - 4716 : C - 4715;
|
|
62
|
-
const isGregorian = (Z >= 2299161);
|
|
63
|
-
const isLeap = isGregorian
|
|
64
|
-
? (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0))
|
|
65
|
-
: (year % 4 === 0);
|
|
66
|
-
const monthLengths = [31, isLeap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
67
|
-
let dayOfYear = day;
|
|
68
|
-
for (let m = 0; m < month - 1; m++) dayOfYear += monthLengths[m];
|
|
69
|
-
const daysInYear = isLeap ? 366 : 365;
|
|
70
|
-
return year + (dayOfYear - 1) / daysInYear;
|
|
71
|
-
}
|
|
41
|
+
// Astronomical JD → decimal year (Meeus Ch. 7 inverse, the 1582-10-15
|
|
42
|
+
// reform): the S3-aligned coordinate for the Sun secular deviations. ONE
|
|
43
|
+
// home since plan 13 B1 — time/calendar.cjs; re-exported here for the
|
|
44
|
+
// readers that import it from the arguments module.
|
|
45
|
+
const { jdToDecimalYear } = require('../time/calendar.cjs');
|
|
72
46
|
|
|
73
47
|
/**
|
|
74
48
|
* @typedef {{Lp: number, D: number, M: number, Mp: number, F: number}} MoonArgsDeg
|