@essrt/physics 4.8.0 → 5.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 -0
- package/package.json +42 -39
- package/src/climate/l1-orbital.cjs +76 -5
- package/src/constants/coefficients.d.ts +678 -0
- package/src/constants/coefficients.js +4 -4
- package/src/constants/generated.d.ts +42 -41
- package/src/constants/generated.js +6 -5
- package/src/deltat/deep-time.cjs +69 -2
- package/src/earth/deep-orbital-history.cjs +6 -5
- package/src/earth/precession-composed.cjs +120 -0
- package/src/earth/year-lengths.cjs +12 -1
- package/src/index.js +6 -2
- package/src/layer0/derive-params.js +21 -4
- package/src/layer0/index.js +35 -4
- package/src/model.js +176 -33
- package/src/planets/chain-artifact.js +2 -2
- package/types/cardinal/index.d.cts +80 -0
- package/types/cardinal/one-source-structure.d.cts +35 -0
- package/types/chain-cycles/index.d.cts +33 -0
- package/types/climate/l1-orbital.d.cts +103 -0
- package/types/constants/coefficients.d.ts +678 -0
- package/types/constants/generated.d.ts +754 -0
- package/types/constants/index.d.ts +2 -0
- package/types/deltat/cycles.d.cts +72 -0
- package/types/deltat/deep-time.d.cts +135 -0
- package/types/deltat/historical.d.cts +8 -0
- package/types/deltat/recession-history.d.cts +80 -0
- package/types/earth/deep-orbital-history.d.cts +77 -0
- package/types/earth/precession-composed.d.cts +59 -0
- package/types/earth/sidereal-channel-artifact.d.cts +12 -0
- package/types/earth/sidereal-year-channel.d.cts +38 -0
- package/types/earth/year-lengths.d.cts +67 -0
- package/types/eclipse/besselian.d.cts +101 -0
- package/types/eclipse/finders.d.cts +116 -0
- package/types/eclipse/sun-planetary-completion.d.cts +39 -0
- package/types/index.d.ts +78 -0
- package/types/layer0/derive-params.d.ts +46 -0
- package/types/layer0/index.d.ts +64 -0
- package/types/layer1/index.d.ts +10 -0
- package/types/model.d.ts +184 -0
- package/types/moon/apparent.d.cts +78 -0
- package/types/moon/arguments.d.cts +138 -0
- package/types/moon/deep-ecc-channel.d.cts +25 -0
- package/types/moon/deep-modes-artifact.d.cts +140 -0
- package/types/moon/ecc-channel.d.cts +30 -0
- package/types/moon/month-chain.d.cts +79 -0
- package/types/moon/series-extension.d.cts +11 -0
- package/types/moon/series.d.cts +91 -0
- package/types/phase/index.d.cts +38 -0
- package/types/planets/asc-node-integrator.d.cts +30 -0
- package/types/planets/chain-artifact.d.ts +15 -0
- package/types/planets/ecc-channel.d.cts +20 -0
- package/types/planets/fibonacci-laws.d.cts +90 -0
- package/types/planets/geometry.d.cts +60 -0
- package/types/planets/inv-plane-frame.d.cts +36 -0
- package/types/planets/keplerian-chain.d.cts +173 -0
- package/types/planets/model.d.cts +116 -0
- package/types/planets/orbit-chain.d.cts +12 -0
- package/types/planets/orientation.d.cts +67 -0
- package/types/planets/predict.d.cts +88 -0
- package/types/planets/secular-series.d.cts +73 -0
- package/types/sun/longitude-correction.d.cts +41 -0
package/README.md
CHANGED
|
@@ -34,6 +34,10 @@ const { createEclipseFinders } = require('@essrt/physics/eclipse/finders');
|
|
|
34
34
|
const { createPredictivePrecession } = require('@essrt/physics/planets/predict');
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
**TypeScript**: the package ships declaration files (`types/`, one per
|
|
38
|
+
subpath export) generated from the sources' JSDoc — `import` from
|
|
39
|
+
`@essrt/physics` or any subpath is fully typed; no ambient shim needed.
|
|
40
|
+
|
|
37
41
|
See the `exports` map in `package.json` for the full surface: moon
|
|
38
42
|
(arguments/series/apparent/ecc-channel/month-chain), planets (geometry,
|
|
39
43
|
corrections, predict, model, fibonacci-laws, …), deltat (cycles, deep-time,
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@essrt/physics",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "ESSRT (Expanding Solar System Resonance Theory) physics core
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "ESSRT (Expanding Solar System Resonance Theory) physics core — pure, injectable-constants, no I/O, no globals, no DOM. The complete model incl. fitted coefficients; every published version immutably ships one recorded model identity.",
|
|
5
5
|
"essrt": {
|
|
6
|
-
"modelVersion": "
|
|
7
|
-
"_note": "The model identity this package version ships (IP-unified-architecture
|
|
6
|
+
"modelVersion": "v14.0",
|
|
7
|
+
"_note": "The model identity this package version ships (IP-unified-architecture §10: package semver tracks the API axis; the model version + CONSTANTS_HASH/COEFFICIENTS_HASH in src/constants/ carry the scientific identity). The version-pinning gate enforces this pairing against public/input/model-version.json."
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "src/index.js",
|
|
11
|
+
"types": "types/index.d.ts",
|
|
11
12
|
"files": [
|
|
12
13
|
"src",
|
|
14
|
+
"types",
|
|
13
15
|
"README.md"
|
|
14
16
|
],
|
|
15
17
|
"repository": {
|
|
@@ -28,41 +30,42 @@
|
|
|
28
30
|
"geocentric-model"
|
|
29
31
|
],
|
|
30
32
|
"exports": {
|
|
31
|
-
".": "./src/index.js",
|
|
32
|
-
"./phase": "./src/phase/index.cjs",
|
|
33
|
-
"./cardinal": "./src/cardinal/index.cjs",
|
|
34
|
-
"./cardinal/one-source-structure": "./src/cardinal/one-source-structure.cjs",
|
|
35
|
-
"./moon/ecc-channel": "./src/moon/ecc-channel.cjs",
|
|
36
|
-
"./moon/deep-ecc-channel": "./src/moon/deep-ecc-channel.cjs",
|
|
37
|
-
"./moon/deep-modes-artifact": "./src/moon/deep-modes-artifact.cjs",
|
|
38
|
-
"./earth/deep-orbital-history": "./src/earth/deep-orbital-history.cjs",
|
|
39
|
-
"./earth/sidereal-year-channel": "./src/earth/sidereal-year-channel.cjs",
|
|
40
|
-
"./earth/year-lengths": "./src/earth/year-lengths.cjs",
|
|
41
|
-
"./
|
|
42
|
-
"./chain-
|
|
43
|
-
"./
|
|
44
|
-
"./moon/
|
|
45
|
-
"./moon/series
|
|
46
|
-
"./moon/
|
|
47
|
-
"./
|
|
48
|
-
"./planets/
|
|
49
|
-
"./planets/
|
|
50
|
-
"./planets/
|
|
51
|
-
"./planets/
|
|
52
|
-
"./planets/
|
|
53
|
-
"./planets/
|
|
54
|
-
"./planets/
|
|
55
|
-
"./planets/
|
|
56
|
-
"./planets/
|
|
57
|
-
"./planets/
|
|
58
|
-
"./
|
|
59
|
-
"./deltat/
|
|
60
|
-
"./deltat/
|
|
61
|
-
"./deltat/
|
|
62
|
-
"./
|
|
63
|
-
"./
|
|
64
|
-
"./eclipse/
|
|
65
|
-
"./sun/
|
|
33
|
+
".": { "types": "./types/index.d.ts", "default": "./src/index.js" },
|
|
34
|
+
"./phase": { "types": "./types/phase/index.d.cts", "default": "./src/phase/index.cjs" },
|
|
35
|
+
"./cardinal": { "types": "./types/cardinal/index.d.cts", "default": "./src/cardinal/index.cjs" },
|
|
36
|
+
"./cardinal/one-source-structure": { "types": "./types/cardinal/one-source-structure.d.cts", "default": "./src/cardinal/one-source-structure.cjs" },
|
|
37
|
+
"./moon/ecc-channel": { "types": "./types/moon/ecc-channel.d.cts", "default": "./src/moon/ecc-channel.cjs" },
|
|
38
|
+
"./moon/deep-ecc-channel": { "types": "./types/moon/deep-ecc-channel.d.cts", "default": "./src/moon/deep-ecc-channel.cjs" },
|
|
39
|
+
"./moon/deep-modes-artifact": { "types": "./types/moon/deep-modes-artifact.d.cts", "default": "./src/moon/deep-modes-artifact.cjs" },
|
|
40
|
+
"./earth/deep-orbital-history": { "types": "./types/earth/deep-orbital-history.d.cts", "default": "./src/earth/deep-orbital-history.cjs" },
|
|
41
|
+
"./earth/sidereal-year-channel": { "types": "./types/earth/sidereal-year-channel.d.cts", "default": "./src/earth/sidereal-year-channel.cjs" },
|
|
42
|
+
"./earth/year-lengths": { "types": "./types/earth/year-lengths.d.cts", "default": "./src/earth/year-lengths.cjs" },
|
|
43
|
+
"./earth/precession-composed": { "types": "./types/earth/precession-composed.d.cts", "default": "./src/earth/precession-composed.cjs" },
|
|
44
|
+
"./moon/month-chain": { "types": "./types/moon/month-chain.d.cts", "default": "./src/moon/month-chain.cjs" },
|
|
45
|
+
"./chain-cycles": { "types": "./types/chain-cycles/index.d.cts", "default": "./src/chain-cycles/index.cjs" },
|
|
46
|
+
"./moon/arguments": { "types": "./types/moon/arguments.d.cts", "default": "./src/moon/arguments.cjs" },
|
|
47
|
+
"./moon/series": { "types": "./types/moon/series.d.cts", "default": "./src/moon/series.cjs" },
|
|
48
|
+
"./moon/series-extension": { "types": "./types/moon/series-extension.d.cts", "default": "./src/moon/series-extension.cjs" },
|
|
49
|
+
"./moon/apparent": { "types": "./types/moon/apparent.d.cts", "default": "./src/moon/apparent.cjs" },
|
|
50
|
+
"./planets/geometry": { "types": "./types/planets/geometry.d.cts", "default": "./src/planets/geometry.cjs" },
|
|
51
|
+
"./planets/fibonacci-laws": { "types": "./types/planets/fibonacci-laws.d.cts", "default": "./src/planets/fibonacci-laws.cjs" },
|
|
52
|
+
"./planets/ecc-channel": { "types": "./types/planets/ecc-channel.d.cts", "default": "./src/planets/ecc-channel.cjs" },
|
|
53
|
+
"./planets/orientation": { "types": "./types/planets/orientation.d.cts", "default": "./src/planets/orientation.cjs" },
|
|
54
|
+
"./planets/asc-node-integrator": { "types": "./types/planets/asc-node-integrator.d.cts", "default": "./src/planets/asc-node-integrator.cjs" },
|
|
55
|
+
"./planets/orbit-chain": { "types": "./types/planets/orbit-chain.d.cts", "default": "./src/planets/orbit-chain.cjs" },
|
|
56
|
+
"./planets/keplerian-chain": { "types": "./types/planets/keplerian-chain.d.cts", "default": "./src/planets/keplerian-chain.cjs" },
|
|
57
|
+
"./planets/inv-plane-frame": { "types": "./types/planets/inv-plane-frame.d.cts", "default": "./src/planets/inv-plane-frame.cjs" },
|
|
58
|
+
"./planets/secular-series": { "types": "./types/planets/secular-series.d.cts", "default": "./src/planets/secular-series.cjs" },
|
|
59
|
+
"./planets/predict": { "types": "./types/planets/predict.d.cts", "default": "./src/planets/predict.cjs" },
|
|
60
|
+
"./planets/model": { "types": "./types/planets/model.d.cts", "default": "./src/planets/model.cjs" },
|
|
61
|
+
"./deltat/cycles": { "types": "./types/deltat/cycles.d.cts", "default": "./src/deltat/cycles.cjs" },
|
|
62
|
+
"./deltat/deep-time": { "types": "./types/deltat/deep-time.d.cts", "default": "./src/deltat/deep-time.cjs" },
|
|
63
|
+
"./deltat/historical": { "types": "./types/deltat/historical.d.cts", "default": "./src/deltat/historical.cjs" },
|
|
64
|
+
"./deltat/recession-history": { "types": "./types/deltat/recession-history.d.cts", "default": "./src/deltat/recession-history.cjs" },
|
|
65
|
+
"./climate/l1-orbital": { "types": "./types/climate/l1-orbital.d.cts", "default": "./src/climate/l1-orbital.cjs" },
|
|
66
|
+
"./eclipse/finders": { "types": "./types/eclipse/finders.d.cts", "default": "./src/eclipse/finders.cjs" },
|
|
67
|
+
"./eclipse/sun-planetary-completion": { "types": "./types/eclipse/sun-planetary-completion.d.cts", "default": "./src/eclipse/sun-planetary-completion.cjs" },
|
|
68
|
+
"./sun/longitude-correction": { "types": "./types/sun/longitude-correction.d.cts", "default": "./src/sun/longitude-correction.cjs" }
|
|
66
69
|
},
|
|
67
70
|
"license": "AGPL-3.0-or-later"
|
|
68
71
|
}
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @typedef {Object} ClimateL1Regime
|
|
25
|
-
* @property {Array<{
|
|
26
|
-
*
|
|
25
|
+
* @property {Array<{period_kyr: number, a: number, b: number}>} l1Terms - the
|
|
26
|
+
* L1 lines: periods in kyr (the engine's own orbital lines + the 405-kyr
|
|
27
|
+
* family — data/l1-physical-lines.json, ONE home) with fitted cos/sin
|
|
28
|
+
* coefficients
|
|
27
29
|
* @property {number} yStdDenormalization - the fit's y_std scale-back
|
|
28
|
-
* @property {number} eightHKyr - 8H in kyr (the fit's period base)
|
|
29
30
|
*/
|
|
30
31
|
|
|
31
32
|
/**
|
|
@@ -37,10 +38,80 @@ function evalClimateL1OrbitalPermil(year, regime) {
|
|
|
37
38
|
const t_kyr_BP = (2000 - year) / 1000;
|
|
38
39
|
let L1_sum = 0;
|
|
39
40
|
for (const c of regime.l1Terms) {
|
|
40
|
-
const omega = 2 * Math.PI
|
|
41
|
+
const omega = (2 * Math.PI) / c.period_kyr;
|
|
41
42
|
L1_sum += c.a * Math.cos(omega * t_kyr_BP) + c.b * Math.sin(omega * t_kyr_BP);
|
|
42
43
|
}
|
|
43
44
|
return L1_sum * regime.yStdDenormalization;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The GIA channel — the polar moment's LAGGED response to the ice history the
|
|
49
|
+
* L1 layer proxies (holisticuniverse plan 06, D7). The solid Earth responds to
|
|
50
|
+
* an ice load through the mantle's viscoelastic relaxation, so
|
|
51
|
+
*
|
|
52
|
+
* α(t) = α₀ − k · [ L1(t) − ⟨L1⟩_τ(t) ]
|
|
53
|
+
*
|
|
54
|
+
* with ⟨L1⟩_τ the causal exponential average over the PAST (time constant τ).
|
|
55
|
+
* Every L1 line passes that filter as a line, Ĉ' = Ĉ · iωτ/(1 + iωτ) with
|
|
56
|
+
* Ĉ = a + ib in physical time, so the evaluator stays a sinusoid sum and each
|
|
57
|
+
* runtime's lattice-α pin and memo are untouched. k > 0 is the direct-load
|
|
58
|
+
* sign (an uncompensated ice load lowers α); after a rapid deglaciation
|
|
59
|
+
* L1 − ⟨L1⟩ < 0, α sits above equilibrium and relaxes for ~τ — today's
|
|
60
|
+
* −0.35 ms/cy non-tidal drift is that tail. k is DERIVED at construction so
|
|
61
|
+
* that dα/dt(J2000) equals the satellite-gravimetry rate (Cox & Chao 2002
|
|
62
|
+
* dJ₂/dt ÷ the Peltier J₂→α factor): no stored scale. τ was MEASURED against
|
|
63
|
+
* the historical ΔT record through the joint fitter (optimum 5–6 kyr,
|
|
64
|
+
* the degree-2 Maxwell estimate; plan 06 D7 record). Replaces the
|
|
65
|
+
* instantaneous α ∝ L1 law, which had the deglacial transient's sign and
|
|
66
|
+
* timing backwards and depended on fitted comb lines the T1 test retired.
|
|
67
|
+
*
|
|
68
|
+
* @param {Array<{period_kyr: number, a: number, b: number}>} l1Terms
|
|
69
|
+
* @param {number} relaxationKyr - τ in kyr
|
|
70
|
+
* @returns {Array<{period_kyr: number, a: number, b: number}>}
|
|
71
|
+
*/
|
|
72
|
+
function laggedL1Terms(l1Terms, relaxationKyr) {
|
|
73
|
+
return l1Terms.map((c) => {
|
|
74
|
+
const wt = ((2 * Math.PI) / c.period_kyr) * relaxationKyr; // ωτ, dimensionless
|
|
75
|
+
const d = 1 + wt * wt;
|
|
76
|
+
const Hre = (wt * wt) / d, Him = wt / d; // H(ω) = iωτ / (1 + iωτ)
|
|
77
|
+
return { period_kyr: c.period_kyr, a: c.a * Hre - c.b * Him, b: c.a * Him + c.b * Hre };
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @param {{
|
|
83
|
+
* l1Terms: Array<{period_kyr: number, a: number, b: number}>,
|
|
84
|
+
* yStdDenormalization: number,
|
|
85
|
+
* relaxationKyr: number,
|
|
86
|
+
* alphaGiaRateJ2000PerYr: number,
|
|
87
|
+
* alphaJ2000: number,
|
|
88
|
+
* }} cfg - relaxationKyr and alphaGiaRateJ2000PerYr are model-parameters
|
|
89
|
+
* deepTime constants; alphaJ2000 the IERS moment-of-inertia factor
|
|
90
|
+
* @returns {{
|
|
91
|
+
* alphaAt: (year: number) => number,
|
|
92
|
+
* laggedL1PermilAt: (year: number) => number,
|
|
93
|
+
* kPerPermille: number,
|
|
94
|
+
* relaxationKyr: number,
|
|
95
|
+
* laggedL1Terms: Array<{period_kyr: number, a: number, b: number}>,
|
|
96
|
+
* }}
|
|
97
|
+
*/
|
|
98
|
+
function createAlphaGiaChannel({ l1Terms, yStdDenormalization, relaxationKyr, alphaGiaRateJ2000PerYr, alphaJ2000 }) {
|
|
99
|
+
const lagged = laggedL1Terms(l1Terms, relaxationKyr);
|
|
100
|
+
const regime = { l1Terms: lagged, yStdDenormalization };
|
|
101
|
+
// dL'/dyear at J2000 in closed form: with t = (2000 − year)/1000,
|
|
102
|
+
// d/dyear Σ[a cos ωt + b sin ωt] = −(1/1000)·Σ ω(−a sin ωt + b cos ωt) → at t = 0: −(1/1000)·Σ ω b
|
|
103
|
+
let sum = 0;
|
|
104
|
+
for (const c of lagged) sum += ((2 * Math.PI) / c.period_kyr) * c.b;
|
|
105
|
+
const slopeJ2000PermillePerYr = (-sum / 1000) * yStdDenormalization;
|
|
106
|
+
const kPerPermille = -alphaGiaRateJ2000PerYr / slopeJ2000PermillePerYr; // dα/dt = −k · dL'/dt
|
|
107
|
+
const laggedJ2000 = evalClimateL1OrbitalPermil(2000, regime);
|
|
108
|
+
return {
|
|
109
|
+
alphaAt: (year) => alphaJ2000 - kPerPermille * (evalClimateL1OrbitalPermil(year, regime) - laggedJ2000),
|
|
110
|
+
laggedL1PermilAt: (year) => evalClimateL1OrbitalPermil(year, regime),
|
|
111
|
+
kPerPermille,
|
|
112
|
+
relaxationKyr,
|
|
113
|
+
laggedL1Terms: lagged,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
module.exports = { evalClimateL1OrbitalPermil, laggedL1Terms, createAlphaGiaChannel };
|