@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.
@@ -177,6 +177,19 @@ export function createDeepTimeChain(deps: {
177
177
  apsidalMeetsNodalSecondsAtAge: (tMa: number) => number | null;
178
178
  lunarLevelingSecondsAtAge: (tMa: number) => number | null;
179
179
  };
180
+ moonEccSensitivities: Readonly<{
181
+ perigeeEffective: number;
182
+ nodeEffective: number;
183
+ perigeePhysical: number;
184
+ nodePhysical: number;
185
+ kappaPerCy: number;
186
+ frameT2DegPerCy2: number;
187
+ generalPrecessionDegPerCy: number;
188
+ perigeeRateOfDateDegPerCy: number;
189
+ nodeRateOfDateDegPerCy: number;
190
+ perigeeRateIcrfDegPerCy: number;
191
+ nodeRateIcrfDegPerCy: number;
192
+ }>;
180
193
  meanMoonDistanceMetresAtAge: (tMa: number) => number | null;
181
194
  meanMoonDistanceAtAge: (tMa: number) => number | null;
182
195
  meanLodSecondsAtAge: (tMa: number) => number | null;
@@ -238,14 +251,6 @@ export function createDeepTimeChain(deps: {
238
251
  /** @param {number} tMa @param {number} periodJ2000Seconds @returns {number} */
239
252
  meanEarthPlanetSynodicPeriodAtAge: (tMa: number, periodJ2000Seconds: number) => number;
240
253
  }>;
241
- /**
242
- * Moon-channel eccentricity sensitivities (perigee/node), the [g/g₀]^s
243
- * exponents of the factored deep-time law — Meeus-effective (S_N moved
244
- * 1.0 → 1.018 with the v4 frame-attribution batch). ONE home since B2 (they
245
- * were literals in model.js, tools/lib/deep-time.js and script.js `_FW_MOON`).
246
- */
247
- export const MOON_ECC_SENSITIVITY_PERIGEE: 2.407;
248
- export const MOON_ECC_SENSITIVITY_NODE: 1.018;
249
254
  /**
250
255
  * The ΔT stack's switches. `resonator` gates the swing's δLOD terms; the
251
256
  * swing's ΔT term is gated by `resonatorDeltaT` when given (the Node twin
package/types/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { createEpochPrimitives } from "./layer0/index.js";
2
2
  export { deriveEpochParams } from "./layer0/derive-params.js";
3
3
  export { createDerivedViews } from "./layer1/index.js";
4
4
  export { createDeepCalendar } from "./phase/deep-calendar.cjs";
5
+ export { createDeepTimeChain } from "./deltat/deep-time-chain.js";
5
6
  export { createCardinalStructure } from "./cardinal/one-source-structure.cjs";
6
7
  export { createMoonMonthChain } from "./moon/month-chain.cjs";
7
8
  export { createChainCycleIntegrator } from "./chain-cycles/index.cjs";
@@ -61,7 +62,7 @@ export { GENERATED as DEFAULT_CONSTANTS, CONSTANTS_HASH, MODEL_VERSION, PREPRINT
61
62
  export { FITTED_COEFFICIENTS, COEFFICIENTS_HASH } from "./constants/index.js";
62
63
  export { GREGORIAN_START, GREGORIAN_START_JD, calendarToJD, jdToCalendar, jdToDecimalYear, dayFractionToHMS, julianCalendarToJD, jdToJulianCalendar } from "./time/calendar.cjs";
63
64
  export { DEG2RAD, RAD2DEG, ARCSEC_PER_TURN, ARCSEC_PER_RAD, wrap360, wrap180, wrap180Closed, wrap2pi, wrapPi } from "./math/angles.cjs";
64
- export { createDeepTimeChain, MOON_ECC_SENSITIVITY_PERIGEE, MOON_ECC_SENSITIVITY_NODE } from "./deltat/deep-time-chain.js";
65
+ export { MOON_ECC_SENSITIVITY_PERIGEE, MOON_ECC_SENSITIVITY_NODE, deriveMoonEccSensitivities, MEEUS_ARGUMENT_RATES_DEG_PER_CY } from "./moon/ecc-sensitivities.cjs";
65
66
  export { computeMassChainJ2000, computeMoonPeriodsJ2000 } from "./earth/mass-chain.cjs";
66
67
  export { SECONDS_PER_DAY, DAYS_PER_JULIAN_YEAR, JULIAN_CENTURY_DAYS, SECONDS_PER_JULIAN_YEAR } from "./constants/units.cjs";
67
68
  export { computeEarthFrameOfDate, solveWheelAngleForLongitude, computeSceneWorldFrameJ2000, SCENE_EQUINOX_VIEW_AZIMUTH_DEG } from "./earth/frame-of-date.cjs";
@@ -153,6 +153,19 @@ export function assembleDeepTimeChain(ctx: import("./derived-constants.js").Ctx)
153
153
  apsidalMeetsNodalSecondsAtAge: (tMa: number) => number | null;
154
154
  lunarLevelingSecondsAtAge: (tMa: number) => number | null;
155
155
  };
156
+ moonEccSensitivities: Readonly<{
157
+ perigeeEffective: number;
158
+ nodeEffective: number;
159
+ perigeePhysical: number;
160
+ nodePhysical: number;
161
+ kappaPerCy: number;
162
+ frameT2DegPerCy2: number;
163
+ generalPrecessionDegPerCy: number;
164
+ perigeeRateOfDateDegPerCy: number;
165
+ nodeRateOfDateDegPerCy: number;
166
+ perigeeRateIcrfDegPerCy: number;
167
+ nodeRateIcrfDegPerCy: number;
168
+ }>;
156
169
  meanMoonDistanceMetresAtAge: (tMa: number) => number | null;
157
170
  meanMoonDistanceAtAge: (tMa: number) => number | null;
158
171
  meanLodSecondsAtAge: (tMa: number) => number | null;
@@ -18,9 +18,9 @@ export function assembleLunarTheory(ctx: import("./time-axis.js").Ctx): {
18
18
  M0: number;
19
19
  MP0: number;
20
20
  F0: number;
21
- LPR: number;
22
- DR: number;
23
- MR: number;
21
+ LPR: 481267.88123421;
22
+ DR: 445267.1114034;
23
+ MR: 35999.0502909;
24
24
  WDOT: number;
25
25
  NDOT: number;
26
26
  T2_W: number;
@@ -31,6 +31,12 @@ export function assembleLunarTheory(ctx: import("./time-axis.js").Ctx): {
31
31
  T2_LP_TIDAL: number;
32
32
  S_W: number;
33
33
  S_N: number;
34
+ S_W_PHYS: number;
35
+ S_N_PHYS: number;
36
+ W_ICRF: number;
37
+ N_ICRF: number;
38
+ P0: number;
39
+ T2F: number;
34
40
  };
35
41
  _rateCompletion: () => {
36
42
  rc: {
@@ -33,7 +33,7 @@ export function assembleOneSourceMovement(ctx: import("./year-day-lengths.js").C
33
33
  periOfDateDegAt: (year: number) => number;
34
34
  /** 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} */
35
35
  epsAt: (year: number) => number;
36
- /** The hybrid's own domain, [yearFrom, yearTo] — the banked ζ series' span (plan 12 §8.5); null without a series. */
36
+ /** The hybrid's own domain, [yearFrom, yearTo] — the banked ζ series' span; null without a series. */
37
37
  obliquityHybridDomainYears: [number, number] | null;
38
38
  /** 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}} */
39
39
  precessionOfDateFactorsAt: (year: number) => {
@@ -44,7 +44,7 @@ export function assembleSurface(ctx: import("./cardinal-instants.js").Ctx): Read
44
44
  lunisolar: Readonly<{
45
45
  /** 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} */
46
46
  meanPeriodYearsAtYear: (year: number) => number;
47
- /** 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} */
47
+ /** 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 (p₀ = 50.2880, the IAU 2006 input). @param {number} year @returns {number} */
48
48
  meanRateArcsecPerYrAtYear: (year: number) => number;
49
49
  /** 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} */
50
50
  torqueRateArcsecPerYrAtYear: (year: number) => number;
@@ -123,9 +123,9 @@ export function assembleSurface(ctx: import("./cardinal-instants.js").Ctx): Read
123
123
  earth: Readonly<{
124
124
  perihelionLongitudeDeg: (year: number) => number;
125
125
  obliquityDeg: (year: number) => number;
126
- /** 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()). */
126
+ /** The hybrid's own domain, [yearFrom, yearTo] — the banked ζ series' span, ±10 Myr about J2000 (the published surfaces serve `obliquityDeg` inside it only; null without a series, i.e. a bare createModel()). */
127
127
  obliquityHybridDomainYears: [number, number] | null;
128
- /** 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} */
128
+ /** The cited mean obliquity of date ε̄(t) (Farhat et al. 2022's column), degrees — a Myr-scale mean; NaN beyond 4,429 Ma. @param {number} year @returns {number} */
129
129
  meanObliquityCitedDeg: (year: number) => number;
130
130
  eccentricity: (year: number) => number;
131
131
  inclinationDeg: (year: number) => number;
@@ -184,6 +184,19 @@ export function assembleSurface(ctx: import("./cardinal-instants.js").Ctx): Read
184
184
  distanceKmAtYear: (year: number) => number;
185
185
  siderealMonthDaysAtYear: (year: number) => number;
186
186
  synodicMonthDays: number;
187
+ eccSensitivities: Readonly<{
188
+ perigeeEffective: number;
189
+ nodeEffective: number;
190
+ perigeePhysical: number;
191
+ nodePhysical: number;
192
+ kappaPerCy: number;
193
+ frameT2DegPerCy2: number;
194
+ generalPrecessionDegPerCy: number;
195
+ perigeeRateOfDateDegPerCy: number;
196
+ nodeRateOfDateDegPerCy: number;
197
+ perigeeRateIcrfDegPerCy: number;
198
+ nodeRateIcrfDegPerCy: number;
199
+ }>;
187
200
  lonDegAtJD: (jd: number) => number;
188
201
  betaDegAtJD: (jd: number) => number;
189
202
  distanceKmAtJD: (jd: number) => number;
@@ -191,7 +204,7 @@ export function assembleSurface(ctx: import("./cardinal-instants.js").Ctx): Read
191
204
  eclipse: Readonly<{
192
205
  sunLonDegAtJD: (jd: number) => number;
193
206
  sunLonCompletedDegAtJD: (jd: number) => number;
194
- /** The APPARENT Sun (completed geometric − the derived aberration constant + the leading nutation terms on the model's own arguments) — the quantity Horizons' observer ecliptic longitude is; the cardinal instants are its crossings (plan 06 R1/I1). @param {number} jdUT @returns {number} */
207
+ /** The APPARENT Sun (completed geometric − the derived aberration constant + the leading nutation terms on the model's own arguments) — the quantity Horizons' observer ecliptic longitude is; the cardinal instants are its crossings. @param {number} jdUT @returns {number} */
195
208
  sunApparentLonDegAtJD: (jdUT: number) => number;
196
209
  findLunarInRange: (jdStart: number, jdEnd: number) => {
197
210
  jd: number;
package/types/model.d.ts CHANGED
@@ -145,6 +145,19 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
145
145
  distanceKmAtYear: (year: number) => number;
146
146
  siderealMonthDaysAtYear: (year: number) => number;
147
147
  synodicMonthDays: number;
148
+ eccSensitivities: Readonly<{
149
+ perigeeEffective: number;
150
+ nodeEffective: number;
151
+ perigeePhysical: number;
152
+ nodePhysical: number;
153
+ kappaPerCy: number;
154
+ frameT2DegPerCy2: number;
155
+ generalPrecessionDegPerCy: number;
156
+ perigeeRateOfDateDegPerCy: number;
157
+ nodeRateOfDateDegPerCy: number;
158
+ perigeeRateIcrfDegPerCy: number;
159
+ nodeRateIcrfDegPerCy: number;
160
+ }>;
148
161
  lonDegAtJD: (jd: number) => number;
149
162
  betaDegAtJD: (jd: number) => number;
150
163
  distanceKmAtJD: (jd: number) => number;
@@ -16,6 +16,7 @@ export type MoonArgsDeg = {
16
16
  * elpEarthFigureJ2ArcsecPerCy2: number,
17
17
  * elpGeneralPrecessionPA_T2ArcsecPerCy2: number,
18
18
  * eccE0: number,
19
+ * moonEccSensitivities: ReturnType<typeof import('./ecc-sensitivities.cjs').deriveMoonEccSensitivities>,
19
20
  * },
20
21
  * fns: {
21
22
  * eccAt: (tYr: number) => number,
@@ -56,6 +57,7 @@ export function createMoonArguments({ constants, fns }: {
56
57
  elpEarthFigureJ2ArcsecPerCy2: number;
57
58
  elpGeneralPrecessionPA_T2ArcsecPerCy2: number;
58
59
  eccE0: number;
60
+ moonEccSensitivities: ReturnType<typeof import("./ecc-sensitivities.cjs").deriveMoonEccSensitivities>;
59
61
  };
60
62
  fns: {
61
63
  eccAt: (tYr: number) => number;
@@ -86,9 +88,9 @@ export function createMoonArguments({ constants, fns }: {
86
88
  M0: number;
87
89
  MP0: number;
88
90
  F0: number;
89
- LPR: number;
90
- DR: number;
91
- MR: number;
91
+ LPR: 481267.88123421;
92
+ DR: 445267.1114034;
93
+ MR: 35999.0502909;
92
94
  WDOT: number;
93
95
  NDOT: number;
94
96
  T2_W: number;
@@ -99,6 +101,12 @@ export function createMoonArguments({ constants, fns }: {
99
101
  T2_LP_TIDAL: number;
100
102
  S_W: number;
101
103
  S_N: number;
104
+ S_W_PHYS: number;
105
+ S_N_PHYS: number;
106
+ W_ICRF: number;
107
+ N_ICRF: number;
108
+ P0: number;
109
+ T2F: number;
102
110
  };
103
111
  _rateCompletion: () => {
104
112
  rc: {
@@ -17,7 +17,8 @@
17
17
  *
18
18
  * — ż_J2000 is the run's own z-rate at J2000 (script-written into the
19
19
  * artifact by generate.mjs from the banked series: "we are the source"),
20
- * T_q the H/12 taper the arguments' rate anchors ride. Inside the canon it
20
+ * T_q the arguments' secular-completion taper (SECULAR_COMPLETION_TAPER_YEARS,
21
+ * the one the rate anchors ride). Inside the canon it
21
22
  * restores the run's slope exactly; beyond ±T_q it is a constant vector
22
23
  * offset of ~3e-3, the size of the table's own spectrum-class scatter
23
24
  * there, never a growing polynomial. Absent the two fields (an older
@@ -0,0 +1,48 @@
1
+ /** Meeus Ch. 47 mean-argument rates, degrees per Julian century (the J2000 polynomials' linear terms). */
2
+ export const MEEUS_ARGUMENT_RATES_DEG_PER_CY: Readonly<{
3
+ Lp: 481267.88123421;
4
+ D: 445267.1114034;
5
+ M: 35999.0502909;
6
+ Mp: 477198.8675055;
7
+ F: 483202.0175233;
8
+ }>;
9
+ /** The Meeus-effective pair: Meeus-exact of-date T² by construction (the shipped record values). */
10
+ export const MOON_ECC_SENSITIVITY_PERIGEE: 2.407;
11
+ export const MOON_ECC_SENSITIVITY_NODE: 1.018;
12
+ /**
13
+ * The physical pair and the rate split, derived from the shipped constants.
14
+ * @param {{
15
+ * eccentricityJ2000: number,
16
+ * eccentricityDotJ2000: number,
17
+ * frameT2ArcsecPerCy2: number,
18
+ * generalPrecessionArcsecPerYr: number,
19
+ * }} inputs — e₀ (the catalog secular value the Taylor checks use); ė₀ per
20
+ * Julian century; the general precession's T² coefficient the of-date Meeus
21
+ * polynomials embed (Lieske 1976, the ELP frame), ″/cy²; p₀, the IAU 2006 p_A
22
+ * linear rate, ″/yr
23
+ * @returns {Readonly<{
24
+ * perigeeEffective: number, nodeEffective: number,
25
+ * perigeePhysical: number, nodePhysical: number,
26
+ * kappaPerCy: number, frameT2DegPerCy2: number, generalPrecessionDegPerCy: number,
27
+ * perigeeRateOfDateDegPerCy: number, nodeRateOfDateDegPerCy: number,
28
+ * perigeeRateIcrfDegPerCy: number, nodeRateIcrfDegPerCy: number,
29
+ * }>}
30
+ */
31
+ export function deriveMoonEccSensitivities({ eccentricityJ2000, eccentricityDotJ2000, frameT2ArcsecPerCy2, generalPrecessionArcsecPerYr }: {
32
+ eccentricityJ2000: number;
33
+ eccentricityDotJ2000: number;
34
+ frameT2ArcsecPerCy2: number;
35
+ generalPrecessionArcsecPerYr: number;
36
+ }): Readonly<{
37
+ perigeeEffective: number;
38
+ nodeEffective: number;
39
+ perigeePhysical: number;
40
+ nodePhysical: number;
41
+ kappaPerCy: number;
42
+ frameT2DegPerCy2: number;
43
+ generalPrecessionDegPerCy: number;
44
+ perigeeRateOfDateDegPerCy: number;
45
+ nodeRateOfDateDegPerCy: number;
46
+ perigeeRateIcrfDegPerCy: number;
47
+ nodeRateIcrfDegPerCy: number;
48
+ }>;
@@ -23,13 +23,10 @@
23
23
  * eccentricity channel's modulation; constants are the engine's derived
24
24
  * J2000 anchors (both engines derive them from the same JSON).
25
25
  * fns.precessionPeriodYearsAtAge is the engine's lunisolar precession period
26
- * of date T_p(t), Julian years (the composed rate's period; plan 09 step
27
- * 5c — the tropical month's equinox turn, formerly the counter's 13/H(t),
28
- * 0.086 % slow: the chain's J2000 tropical month sat 5.85 ms above the IAU
29
- * input, the 1/T_p form is within 0.1 ms of it).
26
+ * of date T_p(t), Julian years (the composed rate's period — the tropical
27
+ * month's equinox turn; within 0.1 ms of the IAU input at J2000).
30
28
  * fns.distanceMetresAtAge is the engine's CITED distance history
31
- * (deltat/moon-distance-history; plan 12 option A — the internal quartic
32
- * twin this chain carried until then is deleted; null beyond the span).
29
+ * (deltat/moon-distance-history; null beyond the span).
33
30
  */
34
31
  export function createMoonMonthChain({ constants, fns }: {
35
32
  constants: {