@essrt/physics 20.0.0 → 21.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.
- package/README.md +4 -4
- package/package.json +3 -8
- package/src/cardinal/one-source-structure.cjs +3 -2
- package/src/chain-cycles/index.cjs +12 -30
- package/src/constants/coefficients.d.ts +16 -92
- package/src/constants/coefficients.js +5 -21
- package/src/constants/generated.d.ts +12 -16
- package/src/constants/generated.js +21 -25
- package/src/deltat/deep-time.cjs +36 -92
- package/src/deltat/recession-history.cjs +2 -1
- package/src/earth/deep-orbital-history.cjs +4 -4
- package/src/earth/precession-composed.cjs +3 -3
- package/src/earth/year-lengths.cjs +16 -1
- package/src/eclipse/sun-planetary-completion.cjs +11 -12
- package/src/index.js +22 -46
- package/src/layer0/derive-params.js +10 -5
- package/src/layer0/index.js +27 -73
- package/src/layer1/index.js +6 -37
- package/src/model.js +190 -215
- package/src/moon/arguments.cjs +57 -83
- package/src/moon/deep-modes-artifact.cjs +2 -2
- package/src/moon/month-chain.cjs +25 -59
- package/src/moon/series.cjs +9 -5
- package/src/phase/deep-calendar.cjs +35 -80
- package/src/planets/chain-artifact.js +2 -2
- package/src/planets/geometry.cjs +52 -23
- package/src/planets/model.cjs +5 -5
- package/types/chain-cycles/index.d.cts +9 -4
- package/types/constants/coefficients.d.ts +16 -92
- package/types/constants/generated.d.ts +12 -16
- package/types/deltat/deep-time.d.cts +3 -16
- package/types/earth/year-lengths.d.cts +12 -0
- package/types/eclipse/sun-planetary-completion.d.cts +0 -9
- package/types/index.d.ts +2 -12
- package/types/layer0/derive-params.d.ts +7 -4
- package/types/layer0/index.d.ts +6 -13
- package/types/layer1/index.d.ts +0 -2
- package/types/model.d.ts +14 -11
- package/types/moon/arguments.d.cts +23 -22
- package/types/moon/deep-modes-artifact.d.cts +3 -3
- package/types/moon/month-chain.d.cts +7 -16
- package/types/moon/series.d.cts +2 -2
- package/types/phase/deep-calendar.d.cts +14 -50
- package/types/planets/geometry.d.cts +27 -11
- package/types/planets/model.d.cts +9 -3
- package/src/cardinal/index.cjs +0 -324
- package/src/moon/ecc-channel.cjs +0 -141
- package/src/phase/index.cjs +0 -186
- package/src/planets/ecc-channel.cjs +0 -59
- package/src/sun/longitude-correction.cjs +0 -68
- package/types/cardinal/index.d.cts +0 -80
- package/types/moon/ecc-channel.d.cts +0 -30
- package/types/phase/index.d.cts +0 -38
- package/types/planets/ecc-channel.d.cts +0 -20
- package/types/sun/longitude-correction.d.cts +0 -41
package/src/layer0/index.js
CHANGED
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
* @property {number} moonEccentricityFactor sqrt(1 - e^2)
|
|
44
44
|
* @property {number} earthMassKg
|
|
45
45
|
* @property {number} earthRadiusM
|
|
46
|
-
* @property {number} holisticYearJ2000
|
|
47
46
|
* @property {number} lodNowH13Seconds
|
|
48
47
|
* @property {number} siderealYearJ2000Seconds
|
|
49
48
|
* @property {number} solarMassLossFracPerYear
|
|
50
49
|
* @property {number} precessionSolarShareJ2000 f_S, the solar fraction of the J2000 precession torque
|
|
50
|
+
* @property {number} precessionRateJ2000ArcsecPerYr p₀, the composed precession rate's J2000 anchor (1,296,000/axial0)
|
|
51
51
|
*/
|
|
52
52
|
|
|
53
53
|
/**
|
|
@@ -55,12 +55,8 @@
|
|
|
55
55
|
* @property {(year: number) => number} tMa
|
|
56
56
|
* @property {(year: number) => number} moonDistanceMetres
|
|
57
57
|
* @property {(year: number) => number|null} lodSeconds
|
|
58
|
-
* @property {(year: number) => number|null} holisticH the UNIT: 13 × the composed lunisolar precession period
|
|
59
58
|
* @property {(year: number) => number} siderealYearSeconds
|
|
60
|
-
* @property {(year: number) => number} tropicalYearSeconds
|
|
61
|
-
* @property {(year: number) => number|null} anomalisticYearSeconds
|
|
62
|
-
* @property {(year: number) => number|null} eraClockH the frozen era clock's phase convention H₀·LOD/LOD₀ (device tier)
|
|
63
|
-
* @property {(year: number) => number} eraClockTropicalYearSeconds T_sid·(1 − 13/H_era) — the frozen comb family's base
|
|
59
|
+
* @property {(year: number) => number} tropicalYearSeconds sidereal less one equinox turn per T_p(t) (the composed precession period)
|
|
64
60
|
*/
|
|
65
61
|
|
|
66
62
|
/**
|
|
@@ -100,35 +96,10 @@ export const createEpochPrimitives = ({ params: p, alphaAtAgeMa }) => {
|
|
|
100
96
|
- p.moonMassKg * Math.sqrt(p.gmEarthMoonM3S2 * a) * p.moonEccentricityFactor);
|
|
101
97
|
};
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
* with their coefficients as a named device constant (plan 06 Phase 3,
|
|
108
|
-
* D8), never as "H(t)".
|
|
109
|
-
* @param {number} t age in Ma
|
|
110
|
-
* @returns {number|null} years
|
|
111
|
-
*/
|
|
112
|
-
const eraClockHCore = (t) => {
|
|
113
|
-
const lod = lodSecondsCore(t);
|
|
114
|
-
return lod === null ? null : p.holisticYearJ2000 * lod / p.lodNowH13Seconds;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* The unit H(t) ≡ 13 × the composed lunisolar precession period:
|
|
119
|
-
* H_era(t) / [f_S + (1 − f_S)·(a₀/a_M(t))³] — the spin scaling AND the
|
|
120
|
-
* lunar torque growing on the recession history (plan 06 D6/Phase 3; the
|
|
121
|
-
* formula's home is earth/precession-composed, this is its Layer-0 twin,
|
|
122
|
-
* held bit-identical to deltat/deep-time.cjs by the layer0 gate).
|
|
123
|
-
* @param {number} t age in Ma
|
|
124
|
-
* @returns {number|null} years
|
|
125
|
-
*/
|
|
126
|
-
const holisticHCore = (t) => {
|
|
127
|
-
const hEra = eraClockHCore(t);
|
|
128
|
-
if (hEra === null) return null;
|
|
129
|
-
const lf = Math.pow(p.moonDistanceNowM / moonDistanceMetresCore(t), 3);
|
|
130
|
-
return hEra / (p.precessionSolarShareJ2000 + (1 - p.precessionSolarShareJ2000) * lf);
|
|
131
|
-
};
|
|
99
|
+
// (Plan 09 step 7b: the unit H(t) = H₀·(LOD/LOD₀)/[f_S + (1 − f_S)(a₀/a_M)³]
|
|
100
|
+
// — `holisticH`, 13.011 composed precession periods, a fit constant's
|
|
101
|
+
// multiple of T_p(t) — and its spin-scaling factor (step 7a's `eraClockH`)
|
|
102
|
+
// are deleted. The physics is the composed precession rate below.)
|
|
132
103
|
|
|
133
104
|
/**
|
|
134
105
|
* Sidereal year. Driver 2 alone — solar mass loss via Kepler, `dT/T = -2 dM/M`
|
|
@@ -149,57 +120,40 @@ export const createEpochPrimitives = ({ params: p, alphaAtAgeMa }) => {
|
|
|
149
120
|
};
|
|
150
121
|
|
|
151
122
|
/**
|
|
152
|
-
* Tropical year
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
123
|
+
* Tropical year of date — the sidereal year less the equinox's own motion
|
|
124
|
+
* over one year: one turn per the composed lunisolar precession period
|
|
125
|
+
* T_p(t), i.e. 1/T_trop = 1/T_sid + ψ̇(t)/(1,296,000″ · Julian-year s) with
|
|
126
|
+
* ψ̇(t) = [ω₀/ω(t)]⁻¹… spelled as (LOD₀/LOD(t))·p₀·[f_S + (1 − f_S)(a₀/a_M)³].
|
|
127
|
+
* Plan 09 step 5d: it was the unit's calendar convention sid·(1 − 13/H(t))
|
|
128
|
+
* (plan 06 D2 kept it as a named device), 0.086 % slow on the equinox term
|
|
129
|
+
* — 1.0 s of year at J2000, integrated by the deep JD↔year calendar. The
|
|
130
|
+
* SAME operations as deltat/deep-time.cjs tropicalYearSecondsFromLod (the
|
|
131
|
+
* layer0 gate holds the twins bit-identical). Past the tidal chain's
|
|
132
|
+
* domain the J2000 rate stands in.
|
|
133
|
+
* (The former anomalistic identity T_sid·(H − 13)/(H − 16) left with it:
|
|
134
|
+
* the model publishes the anomalistic year of date inside the one-family
|
|
135
|
+
* window only, from the series' own apsidal rate.)
|
|
157
136
|
* @param {number} t age in Ma
|
|
158
137
|
* @returns {number} seconds
|
|
159
138
|
*/
|
|
160
139
|
const tropicalYearSecondsCore = (t) => {
|
|
161
140
|
const sid = siderealYearSecondsCore(t);
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* NOT `T_sid * (1 + 3/H)`. That is the FIRST-ORDER form and the plan quotes
|
|
170
|
-
* it, but the shipped chain composes the lattice steps exactly: tropical is
|
|
171
|
-
* `(H-13)/H` of sidereal, then anomalistic is `H/(H-16)` of tropical, giving
|
|
172
|
-
* `T_sid * (H-13)/(H-16)`. The two differ by `48/H^2 * T_sid` ~ 13.5 ms —
|
|
173
|
-
* comparable to 6d's own 0.0178 s anomalistic RMSE, so adopting the
|
|
174
|
-
* first-order form would move a shipped value for no reason. Exact
|
|
175
|
-
* composition it is; the identity 13 + 3 = 16 still holds to first order.
|
|
176
|
-
*
|
|
177
|
-
* @param {number} t age in Ma
|
|
178
|
-
* @returns {number|null} seconds
|
|
179
|
-
*/
|
|
180
|
-
const anomalisticYearSecondsCore = (t) => {
|
|
181
|
-
const H = holisticHCore(t);
|
|
182
|
-
if (H === null) return null;
|
|
183
|
-
const sid = siderealYearSecondsCore(t);
|
|
184
|
-
return sid * (H - 13) / H * H / (H - 16);
|
|
141
|
+
const lod = lodSecondsCore(t);
|
|
142
|
+
const a = moonDistanceMetresCore(t);
|
|
143
|
+
const lf = (a === null || !(a > 0)) ? null : Math.pow(p.moonDistanceNowM / a, 3);
|
|
144
|
+
const term = lf === null ? null : p.precessionSolarShareJ2000 + (1 - p.precessionSolarShareJ2000) * lf;
|
|
145
|
+
const p0 = p.precessionRateJ2000ArcsecPerYr;
|
|
146
|
+
const rate = (lod === null || !(lod > 0) || term === null) ? p0 : (p.lodNowH13Seconds / lod) * p0 * term;
|
|
147
|
+
return 1 / (1 / sid + rate / (1296000 * 365.25 * 86400));
|
|
185
148
|
};
|
|
186
149
|
|
|
187
|
-
|
|
188
|
-
const eraClockTropicalYearSecondsCore = (t) => {
|
|
189
|
-
const sid = siderealYearSecondsCore(t);
|
|
190
|
-
const H = eraClockHCore(t);
|
|
191
|
-
return H === null ? sid * (1 - 13 / p.holisticYearJ2000) : sid * (1 - 13 / H);
|
|
192
|
-
};
|
|
150
|
+
// (plan 09 step 7a: the frozen comb family's tropical base T_sid·(1 − 13/H_era) is deleted)
|
|
193
151
|
|
|
194
152
|
return Object.freeze({
|
|
195
153
|
tMa,
|
|
196
154
|
moonDistanceMetres: (year) => moonDistanceMetresCore(tMa(year)),
|
|
197
155
|
lodSeconds: (year) => lodSecondsCore(tMa(year)),
|
|
198
|
-
holisticH: (year) => holisticHCore(tMa(year)),
|
|
199
156
|
siderealYearSeconds: (year) => siderealYearSecondsCore(tMa(year)),
|
|
200
157
|
tropicalYearSeconds: (year) => tropicalYearSecondsCore(tMa(year)),
|
|
201
|
-
anomalisticYearSeconds: (year) => anomalisticYearSecondsCore(tMa(year)),
|
|
202
|
-
eraClockH: (year) => eraClockHCore(tMa(year)),
|
|
203
|
-
eraClockTropicalYearSeconds: (year) => eraClockTropicalYearSecondsCore(tMa(year)),
|
|
204
158
|
});
|
|
205
159
|
};
|
package/src/layer1/index.js
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
* @typedef {Object} DerivedViews
|
|
22
22
|
* @property {(year: number) => number|null} tropicalYearDays
|
|
23
23
|
* @property {(year: number) => number|null} siderealYearDays
|
|
24
|
-
* @property {(year: number) => number|null} anomalisticYearDays
|
|
25
|
-
* @property {(year: number) => number|null} siderealYearDaysViaLattice
|
|
26
24
|
*/
|
|
27
25
|
|
|
28
26
|
/**
|
|
@@ -44,45 +42,16 @@ export const createDerivedViews = ({ primitives: L0 }) => {
|
|
|
44
42
|
|
|
45
43
|
const tropicalYearDays = perDay(L0.tropicalYearSeconds);
|
|
46
44
|
const siderealYearDays = perDay(L0.siderealYearSeconds);
|
|
47
|
-
const anomalisticYearDays = perDay(L0.anomalisticYearSeconds);
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* differs, so it is not bit-identical everywhere. Measured across the fixture
|
|
56
|
-
* grid: identical at six of seven epochs, 0.7 ULP apart at +0.3 Ma. The
|
|
57
|
-
* browser shows exactly the same one-epoch split, which is how we know the
|
|
58
|
-
* port is faithful rather than merely close.
|
|
59
|
-
*
|
|
60
|
-
* It exists because `src/script.js` carried BOTH as separate mutable globals
|
|
61
|
-
* — `meansiderealyearlengthinDays` and `meansiderealyearlengthinDays_kinematic`
|
|
62
|
-
* — holding the same value at every epoch once `recomputeEpochAnchors` had
|
|
63
|
-
* run, diverging only at module load, where one is the IAU anchor
|
|
64
|
-
* (365.256363004) and the other lattice-derived: the 118 ms of R16.
|
|
65
|
-
*
|
|
66
|
-
* So the "kinematic" variant was never a different quantity, only a
|
|
67
|
-
* different arrival route with a different starting constant. The year/day
|
|
68
|
-
* collapse retired the mutable global: `meansiderealyearlengthinDays_kinematic`
|
|
69
|
-
* is now a J2000 CONSTANT in the browser (this route at f(2000)), and the
|
|
70
|
-
* epoch value is read from `meansiderealyearlengthinDays`. This view stays
|
|
71
|
-
* so the equality is measured, not asserted.
|
|
72
|
-
*
|
|
73
|
-
* @param {number} year
|
|
74
|
-
* @returns {number|null}
|
|
75
|
-
*/
|
|
76
|
-
const siderealYearDaysViaLattice = (year) => {
|
|
77
|
-
const trop = tropicalYearDays(year);
|
|
78
|
-
const H = L0.holisticH(year);
|
|
79
|
-
return (trop === null || H === null) ? null : trop * H / (H - 13);
|
|
80
|
-
};
|
|
46
|
+
// (Plan 09 step 5d: `anomalisticYearDays` — the H/16 device identity — and
|
|
47
|
+
// `siderealYearDaysViaLattice` — the tropical year inverted through the
|
|
48
|
+
// H/(H − 13) identity, kept to measure the browser's former two sidereal
|
|
49
|
+
// globals against each other — left with the identities: the tropical year
|
|
50
|
+
// of date is one equinox turn per T_p(t), and the anomalistic year of date
|
|
51
|
+
// is published from the series' apsidal rate inside the one-family window.)
|
|
81
52
|
|
|
82
53
|
return Object.freeze({
|
|
83
54
|
tropicalYearDays,
|
|
84
55
|
siderealYearDays,
|
|
85
|
-
anomalisticYearDays,
|
|
86
|
-
siderealYearDaysViaLattice,
|
|
87
56
|
});
|
|
88
57
|
};
|