@essrt/physics 23.3.3 → 24.0.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.
Files changed (65) hide show
  1. package/README.md +4 -1
  2. package/package.json +2 -2
  3. package/src/cardinal/one-source-structure.cjs +3 -1
  4. package/src/constants/coefficients.d.ts +5 -1
  5. package/src/constants/coefficients.js +3 -2
  6. package/src/constants/generated.d.ts +13 -14
  7. package/src/constants/generated.js +14 -15
  8. package/src/constants/units.cjs +4 -1
  9. package/src/deltat/deep-time.cjs +37 -72
  10. package/src/earth/deep-orbital-history.cjs +48 -34
  11. package/src/earth/year-lengths.cjs +2 -1
  12. package/src/eclipse/besselian.cjs +24 -11
  13. package/src/index.js +30 -48
  14. package/src/model/cardinal-instants.js +101 -0
  15. package/src/model/context.js +54 -0
  16. package/src/model/deep-time-chain.js +79 -0
  17. package/src/model/delta-t.js +38 -0
  18. package/src/model/derived-constants.js +58 -0
  19. package/src/model/earth-scalars.js +47 -0
  20. package/src/model/inv-plane-elements.js +56 -0
  21. package/src/model/lunar-theory.js +216 -0
  22. package/src/model/moon-epoch.js +28 -0
  23. package/src/model/one-source-movement.js +192 -0
  24. package/src/model/planet-elements-of-date.js +61 -0
  25. package/src/model/planet-records.js +63 -0
  26. package/src/model/planet-spin-channel.js +41 -0
  27. package/src/model/published-periods.js +38 -0
  28. package/src/model/sun-and-eclipses.js +199 -0
  29. package/src/model/surface.js +332 -0
  30. package/src/model/time-axis.js +24 -0
  31. package/src/model/year-day-lengths.js +42 -0
  32. package/src/model.js +62 -1612
  33. package/src/moon/arguments.cjs +27 -43
  34. package/src/planets/chain-artifact.js +2 -2
  35. package/src/planets/keplerian-chain.cjs +3 -3
  36. package/src/planets/model.cjs +2 -2
  37. package/types/constants/coefficients.d.ts +5 -1
  38. package/types/constants/generated.d.ts +13 -14
  39. package/types/constants/units.d.cts +3 -0
  40. package/types/deltat/deep-time.d.cts +18 -24
  41. package/types/earth/deep-orbital-history.d.cts +23 -0
  42. package/types/eclipse/besselian.d.cts +37 -18
  43. package/types/index.d.ts +1 -1
  44. package/types/model/cardinal-instants.d.ts +14 -0
  45. package/types/model/context.d.ts +87 -0
  46. package/types/model/deep-time-chain.d.ts +288 -0
  47. package/types/model/delta-t.d.ts +11 -0
  48. package/types/model/derived-constants.d.ts +25 -0
  49. package/types/model/earth-scalars.d.ts +14 -0
  50. package/types/model/inv-plane-elements.d.ts +6 -0
  51. package/types/model/lunar-theory.d.ts +72 -0
  52. package/types/model/moon-epoch.d.ts +10 -0
  53. package/types/model/one-source-movement.d.ts +74 -0
  54. package/types/model/planet-elements-of-date.d.ts +9 -0
  55. package/types/model/planet-records.d.ts +7 -0
  56. package/types/model/planet-spin-channel.d.ts +29 -0
  57. package/types/model/published-periods.d.ts +7 -0
  58. package/types/model/sun-and-eclipses.d.ts +53 -0
  59. package/types/model/surface.d.ts +281 -0
  60. package/types/model/time-axis.d.ts +12 -0
  61. package/types/model/year-day-lengths.d.ts +8 -0
  62. package/types/model.d.ts +10 -81
  63. package/types/moon/arguments.d.cts +5 -11
  64. package/types/planets/keplerian-chain.d.cts +4 -2
  65. package/types/planets/model.d.cts +3 -3
@@ -0,0 +1,281 @@
1
+ /** @param {import('./cardinal-instants.js').Ctx} ctx @returns the published surface (frozen) */
2
+ export function assembleSurface(ctx: import("./cardinal-instants.js").Ctx): Readonly<{
3
+ time: Readonly<{
4
+ yearFromJD: (jd: number) => number;
5
+ jdFromYear: (year: number) => number;
6
+ siTropicalYearDays: number;
7
+ }>;
8
+ massChain: Readonly<{
9
+ moonDistanceKm: any;
10
+ moonSiderealMonthDays: any;
11
+ siderealYearDays: any;
12
+ dayLengthSeconds: any;
13
+ massRatioEarthMoon: any;
14
+ lunarSmallParameter: number;
15
+ moonMassFraction: number;
16
+ solarTidalShiftKm: number;
17
+ moonDistanceCorrectedKm: number;
18
+ gmEarthMoonSystemKm3S2: number;
19
+ gmEarthKm3S2: number;
20
+ gmMoonKm3S2: number;
21
+ gmSunPlusEarthKm3S2: number;
22
+ gmSunKm3S2: number;
23
+ sunMassKg: number;
24
+ earthMassKg: number;
25
+ gravitationalConstantKm3KgS2: any;
26
+ }>;
27
+ sun: Readonly<{
28
+ /** Mean longitude of date, degrees, unwrapped — L0 + 360·∫dt/T_trop (the one-family tropical year). @param {number} year @returns {number} */
29
+ meanLongitudeDegAt: (year: number) => number;
30
+ /** The Sun's mean perihelion longitude of date (Earth's ϖ, mean elements), degrees, wrapped to [0, 360). @param {number} year @returns {number} */
31
+ perihelionLongitudeDegAt: (year: number) => number;
32
+ }>;
33
+ epoch: Readonly<{
34
+ yearToTMa: (year: number) => number;
35
+ lodSecondsAtYear: (year: number) => number | null;
36
+ lodRealSecondsAtYear: (year: number) => number;
37
+ alphaAtYear: (year: number) => number;
38
+ moonDistanceKmAtYear: (year: number) => number;
39
+ siderealYearSecondsAtYear: (year: number) => number;
40
+ deltaTSecondsAtYear: (year: number) => number;
41
+ axialPrecessionYearsAtYear: (year: number) => number;
42
+ tropicalYearSecondsAtYear: (year: number) => number;
43
+ }>;
44
+ lunisolar: Readonly<{
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
+ 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} */
48
+ meanRateArcsecPerYrAtYear: (year: number) => number;
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
+ torqueRateArcsecPerYrAtYear: (year: number) => number;
51
+ /** 1,296,000/the torque rate, years. @param {number} year @returns {number} */
52
+ torquePeriodYearsAtYear: (year: number) => number;
53
+ /** 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} */
54
+ precessionObliquityFactorAtYear: (year: number) => number;
55
+ /** 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} */
56
+ meanObliquityCitedDegAtYear: (year: number) => number;
57
+ /** The of-date period — the one-family beat inside ±2 Myr, the composed mean beyond. @param {number} year @returns {number} */
58
+ ofDatePeriodYearsAtYear: (year: number) => number;
59
+ /** f_S, the solar fraction of the J2000 precession torque. */
60
+ solarShareJ2000: number;
61
+ /** THE PRECESSION OF DATE — the solar-torque factor 1 + f_S·([(1 − e²)/(1 − e₀²)]^(−3/2) − 1) at the eccentricity of date (1 at J2000; +3.2·10⁻⁴ on the million-year mean). The spin integration multiplies it into the secular rate. @param {number} year @returns {number} */
62
+ solarTorqueFactorOfDateAtYear: (year: number) => number;
63
+ /** THE PRECESSION OF DATE — J₂(t)/J₂₀, the oblateness of date from the GIA channel (ψ̇ ∝ J₂; 1 at J2000, bounded ±5·10⁻⁴; dJ₂/dt at J2000 = the observed satellite rate). @param {number} year @returns {number} */
64
+ ellipticityRatioOfDateAtYear: (year: number) => number;
65
+ /** (a₀/a_M(t))³ — the lunar torque's growth on the recession history. @param {number} year @returns {number} */
66
+ lunarTorqueFactorAtYear: (year: number) => number;
67
+ /** f_S + (1 − f_S)(a₀/a_M)³ — the torque term of the composed precession rate. @param {number} year @returns {number} */
68
+ torqueTermAtYear: (year: number) => number;
69
+ /** The hybrid's precession constant α = p₀ / cos ε₀, ″/yr (p₀ the derived J2000 rate, ε₀ the J2000 obliquity input; 54.81). */
70
+ torqueConstantJ2000ArcsecPerYr: number;
71
+ /** |s₃|, the dominant nodal mode of Earth's orbit — the largest-amplitude ζ mode of the banked deep secular modes, ″/yr (18.85; the obliquity beat's partner). ONE home for the registry, the browser and the API. */
72
+ nodalModeS3ArcsecPerYr: number;
73
+ /** The ecliptic (nodal) precession period 1,296,000/|s₃|, years (68,751) — an orbital quantity, fixed at every epoch at the two-body level. */
74
+ nodalPeriodYears: number;
75
+ /** THE SPIN AXIS'S INERTIAL PRECESSION RATE OF DATE, ″/yr — the composed rate scaled by the
76
+ * hybrid's self-anchor factor (the inertial-to-general ratio at J2000, the multiplicative form
77
+ * the obliquity integration itself applies): 50.385 at J2000 (series-driven). The obliquity beat and the
78
+ * obliquity lines ride THIS rate; the general precession (meanRateArcsecPerYrAtYear) is the
79
+ * equinox along the ecliptic of date. @param {number} year @returns {number} */
80
+ spinAxisInertialRateArcsecPerYrAtYear: (year: number) => number;
81
+ /** The obliquity beat 2π/(ψ̇ᵢₙ(t) − |s₃|), years — the SHIPPED deep-time obliquity period at an INSTANT
82
+ * (falsification leg 1; 41,098 at J2000). ψ̇ᵢₙ is the spin axis's INERTIAL rate (above): the equator
83
+ * against the ecliptic's nodal mode in the inertial frame, the rate the hybrid obliquity integration
84
+ * self-anchors on — not the general precession, which reads the beat 0.3 % long (41,224). v23.0: a
85
+ * dated record sees the beat of the pole rate's mean over its own window, with the pole's of-date
86
+ * factors (obliquityPeriodRealizedYears below: 40,927 over the LR04 record, the climate formula's p+s₀
87
+ * line; La2004's own series reads 40,900 on the same window — compare realized with realized, never
88
+ * this instant with Laskar's long-window precession frequency 50.476). @param {number} year @returns {number} */
89
+ obliquityBeatYearsAtYear: (year: number) => number;
90
+ /** THE REALIZED POLE RATE OVER A WINDOW, ″/yr — see the one home above (the mean of the inertial rate of
91
+ * date with its three of-date factors); the rate the obliquity lines of a record spanning the window carry. */
92
+ spinAxisInertialRateMeanArcsecPerYr: (yearFrom: number, yearTo: number, stepYears?: number, opts?: {
93
+ ellipticity?: boolean;
94
+ }) => number;
95
+ /** THE REALIZED OBLIQUITY PERIOD OVER A WINDOW, years — 1,296,000/(⟨ψ̇ᵢₙ⟩_window − |s₃|): the period a record
96
+ * spanning [yearFrom, yearTo] sees (40,930 over the LR04 record 0–5.32 Ma, 41,018 over the last Myr); the
97
+ * J2000 beat (obliquityBeatYearsAtYear) is its instantaneous limit.
98
+ * @param {number} yearFrom @param {number} yearTo @returns {number} */
99
+ obliquityPeriodRealizedYears: (yearFrom: number, yearTo: number) => number;
100
+ /** The apsidal (perihelion vs the stars) period of date, JULIAN years — the ONE movement's own apsidal rate (the scene's perihelion; anom/(anom − sid) of the one family, ≡ 360°/apsidalRateFixedArcsecPerJulianYr), inside the published window only; null beyond. Before 2026-09 this rode the planet chain's secular tangent, which parted from the scene's perihelion passages by seconds of anomalistic year within a few millennia (year-lengths.cjs). @param {number} year @returns {number|null} */
101
+ apsidalPeriodYearsAtYear: (year: number) => number | null;
102
+ /** T_aps(t) / T_p(t) — the apsidal period in of-date precession periods (4.33 at J2000, a reading; 0.84 … 9.9 across ±26 kyr, measured); null beyond the published window. @param {number} year @returns {number|null} */
103
+ apsidalPerPrecessionAtYear: (year: number) => number | null;
104
+ /** T_peri(t) = 1/(1/T_p + 1/T_aps) — the perihelion-of-date period (equinox precession + inertial perihelion motion, frame arithmetic at every epoch), JULIAN years, on the of-date T_p — ≡ the one family's anom/(anom − trop); null beyond the published window. @param {number} year @returns {number|null} */
105
+ periOfDatePeriodYearsAtYear: (year: number) => number | null;
106
+ /** T_peri(t) / T_p(t) (0.812 at J2000 — the J2000 reading); null beyond the published window. @param {number} year @returns {number|null} */
107
+ periOfDatePerPrecessionAtYear: (year: number) => number | null;
108
+ /** The published of-date window, years from 2000. */
109
+ publishedWindowYears: 2000000;
110
+ /** THE SPIN AXIS'S INERTIAL PRECESSION PERIOD at J2000, years (25,722 in the shipped,
111
+ * series-driven configuration) — the rate the hybrid obliquity integration self-anchors
112
+ * ŝ on (earth/deep-orbital-history, D4e): the general-precession anchor p₀ PLUS the
113
+ * planetary mean the N-body ecliptic's own motion carries (+0.097 ″/yr ≡ IAU's planetary
114
+ * precession ψ_A − p_A; the bare 18-mode table anchors 0.18 — the g₂-gap trap: pass the
115
+ * secular series). Two rates, two uses — the obliquity line frequencies p + s_i (the
116
+ * spin axis against the ecliptic's nodal modes, in the inertial frame) carry THIS
117
+ * rate; the climatic-precession lines p + g_i (the perihelion from the equinox along
118
+ * the ecliptic of date) carry p₀. */
119
+ spinAxisInertialPeriodYearsJ2000: number;
120
+ /** The same as a rate, ″/yr (50.385 at J2000 with the series; p₀ = 50.288 is the general precession). */
121
+ spinAxisInertialRateArcsecPerYrJ2000: number;
122
+ }>;
123
+ earth: Readonly<{
124
+ perihelionLongitudeDeg: (year: number) => number;
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()). */
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} */
129
+ meanObliquityCitedDeg: (year: number) => number;
130
+ eccentricity: (year: number) => number;
131
+ inclinationDeg: (year: number) => number;
132
+ ascendingNodeDeg: (year: number) => number;
133
+ }>;
134
+ lengths: Readonly<{
135
+ tropicalYearDays: (year: number) => number;
136
+ siderealYearDays: (year: number) => number;
137
+ anomalisticYearDays: (year: number) => number;
138
+ dayLengthSeconds: (year: number) => number;
139
+ lodRealSeconds: (year: number) => number;
140
+ siderealDaySeconds: (year: number) => number;
141
+ stellarDaySeconds: (year: number) => number;
142
+ }>;
143
+ cardinal: Readonly<{
144
+ jd: (year: number, type: string) => number;
145
+ jdNearUT: (jdUT: number, type: string) => number;
146
+ raDeg: (year: number, type: string) => number;
147
+ yearLengthDays: (year: number, type: string) => number;
148
+ }>;
149
+ cardinalStructure: Readonly<{
150
+ yearLengthSeconds: (year: number, type: "VE" | "SS" | "AE" | "WS") => number;
151
+ eocOffsetSeconds: (year: number, type: "VE" | "SS" | "AE" | "WS") => number;
152
+ spreadSeconds: (year: number) => {
153
+ VE: number;
154
+ SS: number;
155
+ AE: number;
156
+ WS: number;
157
+ meanSeconds: number;
158
+ };
159
+ anomalisticYearSeconds: (year: number) => number;
160
+ }>;
161
+ yearLengths: Readonly<{
162
+ tropicalYearSecondsAtYear: (year: number) => number;
163
+ siderealYearSecondsAtYear: (year: number) => number;
164
+ anomalisticYearSecondsAtYear: (year: number) => number;
165
+ axialPrecessionYearsAtYear: (y: number) => number;
166
+ perihelionPrecessionYearsAtYear: (y: number) => number;
167
+ inclinationPrecessionYearsAtYear: (y: number) => number;
168
+ generalPrecessionArcsecPerJulianYr: (y: number) => number;
169
+ apsidalRateFixedArcsecPerJulianYr: (y: number) => number;
170
+ cardinal: Readonly<{
171
+ yearLengthSeconds: (y: number, type: "VE" | "SS" | "AE" | "WS") => number;
172
+ eocOffsetSeconds: (y: number, type: "VE" | "SS" | "AE" | "WS") => number;
173
+ spreadSeconds: (y: number) => {
174
+ VE: number;
175
+ SS: number;
176
+ AE: number;
177
+ WS: number;
178
+ meanSeconds: number;
179
+ };
180
+ }>;
181
+ planetaryRelAtYear: (year: number) => number;
182
+ }>;
183
+ moon: Readonly<{
184
+ distanceKmAtYear: (year: number) => number;
185
+ siderealMonthDaysAtYear: (year: number) => number;
186
+ synodicMonthDays: number;
187
+ lonDegAtJD: (jd: number) => number;
188
+ betaDegAtJD: (jd: number) => number;
189
+ distanceKmAtJD: (jd: number) => number;
190
+ }>;
191
+ eclipse: Readonly<{
192
+ sunLonDegAtJD: (jd: number) => number;
193
+ 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} */
195
+ sunApparentLonDegAtJD: (jdUT: number) => number;
196
+ findLunarInRange: (jdStart: number, jdEnd: number) => {
197
+ jd: number;
198
+ beta: number;
199
+ moonDistance_km: number;
200
+ type: string;
201
+ magnitudeUmbral: number;
202
+ magnitudePenumbral: number;
203
+ }[];
204
+ findSolarInRange: (jdStart: number, jdEnd: number) => {
205
+ jd: number;
206
+ beta: number;
207
+ moonDistance_km: number;
208
+ type: string;
209
+ moonAppR_topo: number;
210
+ sunAppR: number;
211
+ moonSunRatio: number;
212
+ }[];
213
+ deltaTSecondsAtJD: (jd: number) => number;
214
+ /** The ΔT trend anchor at J2000 (seconds): the TT − UT bridge every finder axis adds to a
215
+ * true-UT JD. The joint ΔT fit's output, shipped in its own artifact (FIT.DT_ANCHOR —
216
+ * plan 14: never a constants-file input), exposed here so no consumer reaches into the
217
+ * constants for it. */
218
+ ttBridgeSeconds: any;
219
+ frameworkSunDeps: Readonly<{
220
+ sunMeanLongitudeJ2000Deg: any;
221
+ tropicalRateDegPerCy: number;
222
+ eccentricityAt: (year: number) => any;
223
+ perihelionLongitudeDegAt: (year: number) => number;
224
+ meanLongitudeDegAt: (year: number) => number;
225
+ }>;
226
+ umbraGroundAtJD: (jd: number) => {
227
+ latDeg: number;
228
+ lonDeg: number;
229
+ } | null;
230
+ /** THE ONE GMST — mean sidereal time at Greenwich, degrees, at a UT JD (eclipse/besselian.cjs computeGmstDeg; the observer tier's hour angle). @param {number} jdUT @returns {number} */
231
+ gmstDegAtJD: (jdUT: number) => number;
232
+ solarLocalCircumstances: (jdGreatest: number, latDeg: number, lonDeg: number) => {
233
+ kind: "none" | "partial" | "annular" | "total";
234
+ magnitude: number;
235
+ maxJd: number;
236
+ contacts: {
237
+ c1: number | null;
238
+ c2: number | null;
239
+ c3: number | null;
240
+ c4: number | null;
241
+ };
242
+ centralDurationSeconds: number | null;
243
+ };
244
+ }>;
245
+ climate: Readonly<{
246
+ l1OrbitalPermil: (year: number) => number;
247
+ }>;
248
+ planets: Readonly<{
249
+ keys: readonly string[];
250
+ record: (k: string) => Record<string, any> | undefined;
251
+ perihelionLongitudeDeg: (k: string, year: number) => number;
252
+ ascendingNodeInvPlaneDeg: (k: string, year: number) => number;
253
+ invPlaneInclinationDeg: (k: string, year: number) => number;
254
+ eccentricity: (k: string, year: number) => number;
255
+ spin: (k: string) => Readonly<{
256
+ key: string;
257
+ cassiniLocked: boolean;
258
+ momentOfInertiaFactor: number;
259
+ momentOfInertiaFactorClass: string;
260
+ alphaArcsecPerYr: number;
261
+ satelliteQuadrupole: number;
262
+ satelliteAngularMomentum: number;
263
+ spinRetrograde: boolean;
264
+ meanMotionRadPerYr: number;
265
+ obliquityJ2000Deg: number;
266
+ spinPrecessionRateArcsecPerYrJ2000: number | null;
267
+ axialPrecessionPeriodYearsJ2000: number | null;
268
+ obliquityDegAtYear: (year: number) => number | null;
269
+ spinPrecessionRateArcsecPerYrAtYear: (year: number) => number | null;
270
+ obliquityEnvelopeDeg: (year: number, spanYr: number) => {
271
+ minDeg: number;
272
+ meanDeg: number;
273
+ maxDeg: number;
274
+ } | null;
275
+ spinAxisEclipticJ2000AtYear: (year: number) => number[] | null;
276
+ orbitNormalEclipticJ2000AtYear: (year: number) => number[];
277
+ stepYr: number;
278
+ maxSpanYr: 10000000;
279
+ }>;
280
+ }>;
281
+ }>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The time axis — exact JD ↔ model-year conversion on the SI axis.
3
+ *
4
+ * One slice of `assembleModel` (../model.js): receives the context the earlier slices built, returns the bindings the later ones read.
5
+ */
6
+ /** @param {import('./inv-plane-elements.js').Ctx} ctx @returns the bindings the later slices read */
7
+ export function assembleTimeAxis(ctx: import("./inv-plane-elements.js").Ctx): {
8
+ jdFromYear: (year: number) => number;
9
+ siTropicalYearDays: number;
10
+ yearFromJD: (jd: number) => number;
11
+ };
12
+ export type Ctx = import("./inv-plane-elements.js").Ctx & ReturnType<typeof assembleTimeAxis>;
@@ -0,0 +1,8 @@
1
+ /** @param {import('./earth-scalars.js').Ctx} ctx @returns the bindings the later slices read */
2
+ export function assembleYearDayLengths(ctx: import("./earth-scalars.js").Ctx): {
3
+ anomalisticYearDays: (year: number) => number;
4
+ certifiedAxialPrecessionJ2000Years: () => number;
5
+ dayLengthSeconds: (year: number) => number;
6
+ siderealYearDays: (year: number) => number;
7
+ };
8
+ export type Ctx = import("./earth-scalars.js").Ctx & ReturnType<typeof assembleYearDayLengths>;
package/types/model.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- /**
2
- * RA-day-offset Fourier amplitudes (ms). KNOWN EXCEPTION carried over from
3
- * the reference adapters: these are fit results that live as literals in the
4
- * engine too — packaging them into FITTED_COEFFICIENTS is the remaining
5
- * §7a-step-1b move; until then this is their single packaged home.
6
- */
7
1
  /**
8
2
  * Assemble the model surfaces from a resolved constants context + fitted
9
3
  * coefficients. Internal: `createModel` in index.js composes this with the
@@ -11,28 +5,15 @@
11
5
  *
12
6
  * @param {Readonly<Record<string, any>>} C the frozen constants context
13
7
  * @param {Readonly<Record<string, any>>} F the fitted coefficients
14
- * @param {{ eccentricityAt?: (year: number) => number, eccentricityRateAt?: (year: number) => number, perihelionLongitudeDegAt?: (year: number) => number }} [laws]
15
- * RESEARCH OVERRIDES for Earth's orbit laws (doc 109 §7): an alternative e(t),
16
- * de/dt(t) and ϖ_of-date(t) flow through every consumer (the eclipse Sun, the
17
- * Moon's E-factor, the cardinal points) exactly as the shipped laws do. Default
18
- * {} = the shipped laws, bit-identical to before this parameter existed. Not a
19
- * counterfactual in the §2d sense (no hash change) — callers must say when
20
- * they used it; the generators refuse to --write under an override.
21
- * @param {{ giaEllipticityOfDate?: boolean }} [options]
22
- * `giaEllipticityOfDate: false` builds the one-source history WITHOUT the J₂(t)/J₂₀ factor of date
23
- * (the ice-driven GIA channel, which rides the climate formula's own post-MPT layer): the orbital
24
- * FORCING alone. The T1 exporter derives the climate lines' obliquity rate on it, so the lines
25
- * cannot depend on their own fit (v23.0; measured 3e-5 of the rate, 2–3 yr of period). Default true =
26
- * the shipped physics (v15.0), bit-identical to before this parameter existed.
27
- * @returns the assembled surfaces (epoch, earth, lengths, cardinal, moon) — type inferred so ReturnType stays precise
8
+ * @param {import('./model/context.js').Laws} [laws] research overrides for Earth's orbit laws
9
+ * (model/context.js); default {} = the shipped laws, bit-identical to before this parameter existed
10
+ * @param {any} [secularSeriesArtifact] the governed N-body secular series (the API/Node path; the
11
+ * npm package alone has no 8 MB series)
12
+ * @param {import('./model/context.js').Options} [options] `giaEllipticityOfDate: false` = the orbital
13
+ * forcing alone (model/context.js); default true = the shipped physics, bit-identical to before
14
+ * @returns the assembled surfaces (epoch, earth, lengths, cardinal, moon, …) — type inferred so ReturnType stays precise
28
15
  */
29
- export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Record<string, any>>, laws?: {
30
- eccentricityAt?: (year: number) => number;
31
- eccentricityRateAt?: (year: number) => number;
32
- perihelionLongitudeDegAt?: (year: number) => number;
33
- }, secularSeriesArtifact?: any, options?: {
34
- giaEllipticityOfDate?: boolean;
35
- }): Readonly<{
16
+ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Record<string, any>>, laws?: import("./model/context.js").Laws, secularSeriesArtifact?: any, options?: import("./model/context.js").Options): Readonly<{
36
17
  time: Readonly<{
37
18
  yearFromJD: (jd: number) => number;
38
19
  jdFromYear: (year: number) => number;
@@ -58,9 +39,7 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
58
39
  gravitationalConstantKm3KgS2: any;
59
40
  }>;
60
41
  sun: Readonly<{
61
- /** Mean longitude of date, degrees, unwrapped — L0 + 360·∫dt/T_trop (the one-family tropical year). @param {number} year @returns {number} */
62
42
  meanLongitudeDegAt: (year: number) => number;
63
- /** The Sun's mean perihelion longitude of date (Earth's ϖ, mean elements), degrees, wrapped to [0, 360). @param {number} year @returns {number} */
64
43
  perihelionLongitudeDegAt: (year: number) => number;
65
44
  }>;
66
45
  epoch: Readonly<{
@@ -75,90 +54,39 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
75
54
  tropicalYearSecondsAtYear: (year: number) => number;
76
55
  }>;
77
56
  lunisolar: Readonly<{
78
- /** 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} */
79
57
  meanPeriodYearsAtYear: (year: number) => number;
80
- /** 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} */
81
58
  meanRateArcsecPerYrAtYear: (year: number) => number;
82
- /** 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} */
83
59
  torqueRateArcsecPerYrAtYear: (year: number) => number;
84
- /** 1,296,000/the torque rate, years. @param {number} year @returns {number} */
85
60
  torquePeriodYearsAtYear: (year: number) => number;
86
- /** 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} */
87
61
  precessionObliquityFactorAtYear: (year: number) => number;
88
- /** 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} */
89
62
  meanObliquityCitedDegAtYear: (year: number) => number;
90
- /** The of-date period — the one-family beat inside ±2 Myr, the composed mean beyond. @param {number} year @returns {number} */
91
63
  ofDatePeriodYearsAtYear: (year: number) => number;
92
- /** f_S, the solar fraction of the J2000 precession torque. */
93
64
  solarShareJ2000: number;
94
- /** THE PRECESSION OF DATE — the solar-torque factor 1 + f_S·([(1 − e²)/(1 − e₀²)]^(−3/2) − 1) at the eccentricity of date (1 at J2000; +3.2·10⁻⁴ on the million-year mean). The spin integration multiplies it into the secular rate. @param {number} year @returns {number} */
95
65
  solarTorqueFactorOfDateAtYear: (year: number) => number;
96
- /** THE PRECESSION OF DATE — J₂(t)/J₂₀, the oblateness of date from the GIA channel (ψ̇ ∝ J₂; 1 at J2000, bounded ±5·10⁻⁴; dJ₂/dt at J2000 = the observed satellite rate). @param {number} year @returns {number} */
97
66
  ellipticityRatioOfDateAtYear: (year: number) => number;
98
- /** (a₀/a_M(t))³ — the lunar torque's growth on the recession history. @param {number} year @returns {number} */
99
67
  lunarTorqueFactorAtYear: (year: number) => number;
100
- /** f_S + (1 − f_S)(a₀/a_M)³ — the torque term the unit divides H_era by. @param {number} year @returns {number} */
101
68
  torqueTermAtYear: (year: number) => number;
102
- /** The hybrid's precession constant α = p₀ / cos ε₀, ″/yr (p₀ the derived J2000 rate, ε₀ the J2000 obliquity input; 54.81). */
103
69
  torqueConstantJ2000ArcsecPerYr: number;
104
- /** |s₃|, the dominant nodal mode of Earth's orbit — the largest-amplitude ζ mode of the banked deep secular modes, ″/yr (18.85; the obliquity beat's partner). ONE home for the registry, the browser and the API. */
105
70
  nodalModeS3ArcsecPerYr: number;
106
- /** The ecliptic (nodal) precession period 1,296,000/|s₃|, years (68,751) — an orbital quantity, fixed at every epoch at the two-body level. */
107
71
  nodalPeriodYears: number;
108
- /** THE SPIN AXIS'S INERTIAL PRECESSION RATE OF DATE, ″/yr — the composed rate scaled by the
109
- * hybrid's self-anchor factor (the inertial-to-general ratio at J2000, the multiplicative form
110
- * the obliquity integration itself applies): 50.385 at J2000 (series-driven). The obliquity beat and the
111
- * obliquity lines ride THIS rate; the general precession (meanRateArcsecPerYrAtYear) is the
112
- * equinox along the ecliptic of date. @param {number} year @returns {number} */
113
72
  spinAxisInertialRateArcsecPerYrAtYear: (year: number) => number;
114
- /** The obliquity beat 2π/(ψ̇ᵢₙ(t) − |s₃|), years — the SHIPPED deep-time obliquity period at an INSTANT
115
- * (falsification leg 1; 41,098 at J2000). ψ̇ᵢₙ is the spin axis's INERTIAL rate (above): the equator
116
- * against the ecliptic's nodal mode in the inertial frame, the rate the hybrid obliquity integration
117
- * self-anchors on — not the general precession, which reads the beat 0.3 % long (41,224). v23.0: a
118
- * dated record sees the beat of the pole rate's mean over its own window, with the pole's of-date
119
- * factors (obliquityPeriodRealizedYears below: 40,927 over the LR04 record, the climate formula's p+s₀
120
- * line; La2004's own series reads 40,900 on the same window — compare realized with realized, never
121
- * this instant with Laskar's long-window precession frequency 50.476). @param {number} year @returns {number} */
122
73
  obliquityBeatYearsAtYear: (year: number) => number;
123
- /** THE REALIZED POLE RATE OVER A WINDOW, ″/yr — see the one home above (the mean of the inertial rate of
124
- * date with its three of-date factors); the rate the obliquity lines of a record spanning the window carry. */
125
74
  spinAxisInertialRateMeanArcsecPerYr: (yearFrom: number, yearTo: number, stepYears?: number, opts?: {
126
75
  ellipticity?: boolean;
127
76
  }) => number;
128
- /** THE REALIZED OBLIQUITY PERIOD OVER A WINDOW, years — 1,296,000/(⟨ψ̇ᵢₙ⟩_window − |s₃|): the period a record
129
- * spanning [yearFrom, yearTo] sees (40,930 over the LR04 record 0–5.32 Ma, 41,018 over the last Myr); the
130
- * J2000 beat (obliquityBeatYearsAtYear) is its instantaneous limit.
131
- * @param {number} yearFrom @param {number} yearTo @returns {number} */
132
77
  obliquityPeriodRealizedYears: (yearFrom: number, yearTo: number) => number;
133
- /** The apsidal (perihelion vs the stars) period of date, JULIAN years — the ONE movement's own apsidal rate (the scene's perihelion; anom/(anom − sid) of the one family, ≡ 360°/apsidalRateFixedArcsecPerJulianYr), inside the published window only; null beyond. Before 2026-09 this rode the planet chain's secular tangent, which parted from the scene's perihelion passages by seconds of anomalistic year within a few millennia (year-lengths.cjs). @param {number} year @returns {number|null} */
134
78
  apsidalPeriodYearsAtYear: (year: number) => number | null;
135
- /** T_aps(t) / T_p(t) — the apsidal period in of-date precession periods (4.33 at J2000, a reading; 0.84 … 9.9 across ±26 kyr, measured); null beyond the published window. @param {number} year @returns {number|null} */
136
79
  apsidalPerPrecessionAtYear: (year: number) => number | null;
137
- /** T_peri(t) = 1/(1/T_p + 1/T_aps) — the perihelion-of-date period (equinox precession + inertial perihelion motion, frame arithmetic at every epoch), JULIAN years, on the of-date T_p — ≡ the one family's anom/(anom − trop); null beyond the published window. @param {number} year @returns {number|null} */
138
80
  periOfDatePeriodYearsAtYear: (year: number) => number | null;
139
- /** T_peri(t) / T_p(t) (0.812 at J2000 — the J2000 reading); null beyond the published window. @param {number} year @returns {number|null} */
140
81
  periOfDatePerPrecessionAtYear: (year: number) => number | null;
141
- /** The published of-date window, years from 2000. */
142
82
  publishedWindowYears: 2000000;
143
- /** THE SPIN AXIS'S INERTIAL PRECESSION PERIOD at J2000, years (25,722 in the shipped,
144
- * series-driven configuration) — the rate the hybrid obliquity integration self-anchors
145
- * ŝ on (earth/deep-orbital-history, D4e): the general-precession anchor p₀ PLUS the
146
- * planetary mean the N-body ecliptic's own motion carries (+0.097 ″/yr ≡ IAU's planetary
147
- * precession ψ_A − p_A; the bare 18-mode table anchors 0.18 — the g₂-gap trap: pass the
148
- * secular series). Two rates, two uses — the obliquity line frequencies p + s_i (the
149
- * spin axis against the ecliptic's nodal modes, in the inertial frame) carry THIS
150
- * rate; the climatic-precession lines p + g_i (the perihelion from the equinox along
151
- * the ecliptic of date) carry p₀. */
152
83
  spinAxisInertialPeriodYearsJ2000: number;
153
- /** The same as a rate, ″/yr (50.385 at J2000 with the series; p₀ = 50.288 is the general precession). */
154
84
  spinAxisInertialRateArcsecPerYrJ2000: number;
155
85
  }>;
156
86
  earth: Readonly<{
157
87
  perihelionLongitudeDeg: (year: number) => number;
158
88
  obliquityDeg: (year: number) => number;
159
- /** 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()). */
160
89
  obliquityHybridDomainYears: [number, number] | null;
161
- /** 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} */
162
90
  meanObliquityCitedDeg: (year: number) => number;
163
91
  eccentricity: (year: number) => number;
164
92
  inclinationDeg: (year: number) => number;
@@ -224,7 +152,6 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
224
152
  eclipse: Readonly<{
225
153
  sunLonDegAtJD: (jd: number) => number;
226
154
  sunLonCompletedDegAtJD: (jd: number) => number;
227
- /** 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} */
228
155
  sunApparentLonDegAtJD: (jdUT: number) => number;
229
156
  findLunarInRange: (jdStart: number, jdEnd: number) => {
230
157
  jd: number;
@@ -244,6 +171,7 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
244
171
  moonSunRatio: number;
245
172
  }[];
246
173
  deltaTSecondsAtJD: (jd: number) => number;
174
+ ttBridgeSeconds: any;
247
175
  frameworkSunDeps: Readonly<{
248
176
  sunMeanLongitudeJ2000Deg: any;
249
177
  tropicalRateDegPerCy: number;
@@ -255,6 +183,7 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
255
183
  latDeg: number;
256
184
  lonDeg: number;
257
185
  } | null;
186
+ gmstDegAtJD: (jdUT: number) => number;
258
187
  solarLocalCircumstances: (jdGreatest: number, latDeg: number, lonDeg: number) => {
259
188
  kind: "none" | "partial" | "annular" | "total";
260
189
  magnitude: number;
@@ -38,17 +38,13 @@ export type MoonArgsDeg = {
38
38
  * pair powers the (d′) of-date rate completion: pDyn = the DYNAMICAL
39
39
  * axial precession (day-form beat of the engine's sidereal/solar year
40
40
  * evaluators — the tweakpane identity, real at J2000, epoch-valid);
41
- * pKin = the KINEMATIC pair's beat (the H/13-family mean the chains
42
- * embed). Absent ⇒ the completion is disabled (pre-(d′) behaviour).
43
- * Plan 09: the Sun of the arguments is the engine's ONE certified Sun —
41
+ * pKin = the KINEMATIC pair's beat (the mean the chains embed). Absent ⇒
42
+ * the completion is disabled (pre-(d′) behaviour).
43
+ * The Sun of the arguments is the engine's ONE certified Sun —
44
44
  * sunMeanLonDegAtJdTT (the mean longitude that integrates the one-family
45
45
  * tropical year, unwrapped) and sunPerihelionLonDegAtJdTT (the mean
46
46
  * perihelion of date, wrapped — the arguments wrap M, and the rate anchors
47
- * difference it over ±25 days wrapped to ±180°). The former "model timeline" Sun — 360° per mean solar
48
- * year plus the closed-form integrals of the retired year-length combs,
49
- * the perihelion on the H/16 chain count — sat 0.2° behind the IAU mean
50
- * Sun at −2000 (the combs could not carry the tropical year's secular
51
- * drift); measured against Meeus L0 before the move.
47
+ * difference it over ±25 days wrapped to ±180°).
52
48
  */
53
49
  export function createMoonArguments({ constants, fns }: {
54
50
  constants: {
@@ -128,8 +124,6 @@ import { jdToDecimalYear } from "../time/calendar.cjs";
128
124
  /** The secular-completion taper half-width, Julian years: the cos² envelope
129
125
  * inside which the chain's Meeus-measured rate anchors and the Lp secular
130
126
  * completion act (full at the anchor, zero beyond). A recorded window of the
131
- * completion, not a law — the anchors were measured with it (plan 09 step
132
- * 5c: it was written as the era unit's twelfth, H/12, "lattice-derived";
133
- * the value is kept bit-identical and named for what it is). */
127
+ * completion, not a law — the anchors were measured with it. */
134
128
  export const SECULAR_COMPLETION_TAPER_YEARS: 27943.083333333332;
135
129
  export { jdToDecimalYear };
@@ -77,7 +77,8 @@ export type KcPlanetChain = {
77
77
  invariablePlane?: (KcInvariablePlane | undefined);
78
78
  };
79
79
  export const ANCHOR_EPOCH_YEAR: 2000;
80
- export const ANCHOR_EPOCH_JD: 2451545;
80
+ import ANCHOR_EPOCH_JD_1 = require("../constants/units.cjs");
81
+ import ANCHOR_EPOCH_JD = ANCHOR_EPOCH_JD_1.J2000_JD;
81
82
  /** Full osculating elements from a heliocentric ecliptic-J2000 state vector.
82
83
  * @param {number[]} rKm heliocentric position, km
83
84
  * @param {number[]} vKmS heliocentric velocity, km/s
@@ -154,7 +155,7 @@ export function computePlanetElementsAtYear(year: number, planetChain: KcPlanetC
154
155
  * @param {Object<string,KcPlanetChain>=} allChains the full chain map
155
156
  * @returns {number} deg/yr, prograde positive
156
157
  */
157
- export function computeApsidalSecularDegPerYr(year: number, planetChain: KcPlanetChain, allChains?: {
158
+ export function computeApsidalTangentDegPerYr(year: number, planetChain: KcPlanetChain, allChains?: {
158
159
  [x: string]: KcPlanetChain;
159
160
  } | undefined): number;
160
161
  /** The chain's canonical constructor from a PARSED governed artifact (K2.1 →
@@ -172,3 +173,4 @@ export function buildPlanetChainsFromArtifactData(art: any, opts?: {
172
173
  } | undefined): {
173
174
  [x: string]: KcPlanetChain;
174
175
  };
176
+ export { ANCHOR_EPOCH_JD };
@@ -1,8 +1,8 @@
1
1
  export type PlanetModelBody = {
2
2
  /**
3
- * - the observed sidereal period input, SI days (the scaffold period of the no-chain bodies; the chain planets ride the artifact's elements)
3
+ * - the body's orbital-period input, SI days — for the planets the period OF DATE (measured in sun-and-eclipses.js: their rates sit 1.4–1.6°/cy above the VSOP sidereal mean motions, the precession plus input rounding), not the sidereal period the field was once documented as; the scaffold period of the no-chain bodies — the chain planets ride the artifact's elements
4
4
  */
5
- solarYearInput: number;
5
+ orbitalPeriodInputDays: number;
6
6
  invPlaneInclinationJ2000?: number | undefined;
7
7
  longitudePerihelion?: number | undefined;
8
8
  /**
@@ -43,7 +43,7 @@ export type PlanetModelRecord = {
43
43
  };
44
44
  /**
45
45
  * @typedef {Object} PlanetModelBody
46
- * @property {number} solarYearInput - the observed sidereal period input, SI days (the scaffold period of the no-chain bodies; the chain planets ride the artifact's elements)
46
+ * @property {number} orbitalPeriodInputDays - the body's orbital-period input, SI days — for the planets the period OF DATE (measured in sun-and-eclipses.js: their rates sit 1.4–1.6°/cy above the VSOP sidereal mean motions, the precession plus input rounding), not the sidereal period the field was once documented as; the scaffold period of the no-chain bodies — the chain planets ride the artifact's elements
47
47
  * @property {number} [invPlaneInclinationJ2000]
48
48
  * @property {number} [longitudePerihelion]
49
49
  * @property {number} [wobblePeriodYears] - carriers: the chain's g-mode beat (input since Phase 7 commit 2)