@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/types/index.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
export { createEpochPrimitives } from "./layer0/index.js";
|
|
2
2
|
export { deriveEpochParams } from "./layer0/derive-params.js";
|
|
3
3
|
export { createDerivedViews } from "./layer1/index.js";
|
|
4
|
-
export { createPhaseMachinery } from "./phase/index.cjs";
|
|
5
4
|
export { createDeepCalendar } from "./phase/deep-calendar.cjs";
|
|
6
|
-
export { createCardinalModel } from "./cardinal/index.cjs";
|
|
7
5
|
export { createCardinalStructure } from "./cardinal/one-source-structure.cjs";
|
|
8
|
-
export { createMoonEccChannel } from "./moon/ecc-channel.cjs";
|
|
9
6
|
export { createMoonMonthChain } from "./moon/month-chain.cjs";
|
|
10
7
|
export { createChainCycleIntegrator } from "./chain-cycles/index.cjs";
|
|
11
8
|
export { createMoonArguments } from "./moon/arguments.cjs";
|
|
12
9
|
export { createMoonSeries } from "./moon/series.cjs";
|
|
13
10
|
export { createMoonApparent } from "./moon/apparent.cjs";
|
|
14
|
-
export { derivePlanetGeometry } from "./planets/geometry.cjs";
|
|
15
11
|
export * as planetOrbitChain from "./planets/orbit-chain.cjs";
|
|
16
12
|
export { computeSecularShape } from "./planets/secular-shape.cjs";
|
|
17
13
|
export { createSecularSeriesOverride } from "./planets/secular-series.cjs";
|
|
@@ -23,7 +19,6 @@ export { createDeltaTCycles } from "./deltat/cycles.cjs";
|
|
|
23
19
|
export { createDeepTimeLod } from "./deltat/deep-time.cjs";
|
|
24
20
|
export { deltaTEspenakMeeusCanonSeconds } from "./deltat/historical.cjs";
|
|
25
21
|
export { createEclipseFinders } from "./eclipse/finders.cjs";
|
|
26
|
-
export { createSunLongitudeCorrection } from "./sun/longitude-correction.cjs";
|
|
27
22
|
export function createModel(constants?: Constants, opts?: {
|
|
28
23
|
laws?: {
|
|
29
24
|
eccentricityAt?: (year: number) => number;
|
|
@@ -50,11 +45,6 @@ export type ModelIdentity = {
|
|
|
50
45
|
export type Model = {
|
|
51
46
|
constants: Constants;
|
|
52
47
|
hash: string;
|
|
53
|
-
computeLatticePeriodsYears: () => {
|
|
54
|
-
axialPrecessionPeriodYears: number;
|
|
55
|
-
inclinationPrecessionPeriodYears: number;
|
|
56
|
-
perihelionPrecessionPeriodYears: number;
|
|
57
|
-
};
|
|
58
48
|
eccentricity: (year: number) => number;
|
|
59
49
|
identity: ModelIdentity;
|
|
60
50
|
} & ModelSurfaces;
|
|
@@ -67,13 +57,13 @@ import { assembleModel } from './model.js';
|
|
|
67
57
|
export { GENERATED as DEFAULT_CONSTANTS, CONSTANTS_HASH, MODEL_VERSION, PREPRINT_DOI, REFERENCE_DATA };
|
|
68
58
|
export { FITTED_COEFFICIENTS, COEFFICIENTS_HASH } from "./constants/index.js";
|
|
69
59
|
export { computeEarthFrameOfDate, solveWheelAngleForLongitude } from "./earth/frame-of-date.cjs";
|
|
70
|
-
export {
|
|
60
|
+
export { derivePlanetGeometry, scaffoldOrbitInputs } from "./planets/geometry.cjs";
|
|
71
61
|
export { buildPlanetChainsFromArtifactData, computePlanetElementsAtYear, computeHeliocentricEclipticFromElements, computePoissonArgRad, computeOsculatingElements, solveKeplerRad, computeApsidalSecularDegPerYr, ANCHOR_EPOCH_YEAR, ANCHOR_EPOCH_JD } from "./planets/keplerian-chain.cjs";
|
|
72
62
|
export { computeEquatorNodeOriginSFrameDeg, convertNodeSFrameToEquatorOriginDeg } from "./planets/inv-plane-frame.cjs";
|
|
73
63
|
export { computePlanetPrecessionConstant, createPlanetSpinChannel, createPlanetSpinChannelFromArtifacts, computeObliquityJ2000Deg } from "./planets/spin-channel.cjs";
|
|
74
64
|
export { CHAIN_ARTIFACT, CHAIN_ARTIFACT_HASH } from "./planets/chain-artifact.js";
|
|
75
65
|
export { DEEP_MODES_ARTIFACT, DEEP_MODES_ARTIFACT_HASH } from "./moon/deep-modes-artifact.cjs";
|
|
76
|
-
export { createYearLengths, ONE_FAMILY_WINDOW_YEARS } from "./earth/year-lengths.cjs";
|
|
66
|
+
export { createYearLengths, computeMeanTropicalYearJ2000Days, ONE_FAMILY_WINDOW_YEARS } from "./earth/year-lengths.cjs";
|
|
77
67
|
export { computeSolarTorqueShare, createComposedPrecession } from "./earth/precession-composed.cjs";
|
|
78
68
|
export { createMoonRecessionHistory, createSolarChannelBudget } from "./deltat/recession-history.cjs";
|
|
79
69
|
export { evalClimateL1OrbitalPermil, laggedL1Terms, createAlphaGiaChannel } from "./climate/l1-orbital.cjs";
|
|
@@ -15,12 +15,11 @@ export type RawEpochConstants = {
|
|
|
15
15
|
alpha1PerMa: number;
|
|
16
16
|
alpha3PerMa3: number;
|
|
17
17
|
alpha4PerMa4: number;
|
|
18
|
+
meanSiderealYearSeconds: number;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* ω₀: the J2000 day length, SI seconds (the SI day since plan 09)
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
meanSiderealYearSeconds: number;
|
|
23
|
-
meanSiderealYearDaysKinematic: number;
|
|
22
|
+
lodJ2000Seconds: number;
|
|
24
23
|
/**
|
|
25
24
|
* M_SUN
|
|
26
25
|
*/
|
|
@@ -43,4 +42,8 @@ export type RawEpochConstants = {
|
|
|
43
42
|
astronomicalUnitKm: number;
|
|
44
43
|
earthOrbitalEccentricityJ2000: number;
|
|
45
44
|
moonEclipticInclinationJ2000Deg: number;
|
|
45
|
+
/**
|
|
46
|
+
* the model's ONE J2000 precession reading (1,296,000/p_A; plan 09)
|
|
47
|
+
*/
|
|
48
|
+
axialPrecessionJ2000Years: number;
|
|
46
49
|
};
|
package/types/layer0/index.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export type EpochParams = {
|
|
|
33
33
|
moonEccentricityFactor: number;
|
|
34
34
|
earthMassKg: number;
|
|
35
35
|
earthRadiusM: number;
|
|
36
|
-
holisticYearJ2000: number;
|
|
37
36
|
lodNowH13Seconds: number;
|
|
38
37
|
siderealYearJ2000Seconds: number;
|
|
39
38
|
solarMassLossFracPerYear: number;
|
|
@@ -41,24 +40,18 @@ export type EpochParams = {
|
|
|
41
40
|
* f_S, the solar fraction of the J2000 precession torque
|
|
42
41
|
*/
|
|
43
42
|
precessionSolarShareJ2000: number;
|
|
43
|
+
/**
|
|
44
|
+
* p₀, the composed precession rate's J2000 anchor (1,296,000/axial0)
|
|
45
|
+
*/
|
|
46
|
+
precessionRateJ2000ArcsecPerYr: number;
|
|
44
47
|
};
|
|
45
48
|
export type EpochPrimitives = {
|
|
46
49
|
tMa: (year: number) => number;
|
|
47
50
|
moonDistanceMetres: (year: number) => number;
|
|
48
51
|
lodSeconds: (year: number) => number | null;
|
|
49
|
-
/**
|
|
50
|
-
* the UNIT: 13 × the composed lunisolar precession period
|
|
51
|
-
*/
|
|
52
|
-
holisticH: (year: number) => number | null;
|
|
53
52
|
siderealYearSeconds: (year: number) => number;
|
|
54
|
-
tropicalYearSeconds: (year: number) => number;
|
|
55
|
-
anomalisticYearSeconds: (year: number) => number | null;
|
|
56
|
-
/**
|
|
57
|
-
* the frozen era clock's phase convention H₀·LOD/LOD₀ (device tier)
|
|
58
|
-
*/
|
|
59
|
-
eraClockH: (year: number) => number | null;
|
|
60
53
|
/**
|
|
61
|
-
*
|
|
54
|
+
* sidereal less one equinox turn per T_p(t) (the composed precession period)
|
|
62
55
|
*/
|
|
63
|
-
|
|
56
|
+
tropicalYearSeconds: (year: number) => number;
|
|
64
57
|
};
|
package/types/layer1/index.d.ts
CHANGED
|
@@ -5,6 +5,4 @@ export type EpochPrimitives = import("../layer0/index.js").EpochPrimitives;
|
|
|
5
5
|
export type DerivedViews = {
|
|
6
6
|
tropicalYearDays: (year: number) => number | null;
|
|
7
7
|
siderealYearDays: (year: number) => number | null;
|
|
8
|
-
anomalisticYearDays: (year: number) => number | null;
|
|
9
|
-
siderealYearDaysViaLattice: (year: number) => number | null;
|
|
10
8
|
};
|
package/types/model.d.ts
CHANGED
|
@@ -32,16 +32,20 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
|
|
|
32
32
|
jdFromYear: (year: number) => number;
|
|
33
33
|
siTropicalYearDays: number;
|
|
34
34
|
}>;
|
|
35
|
+
sun: Readonly<{
|
|
36
|
+
/** Mean longitude of date, degrees, unwrapped — L0 + 360·∫dt/T_trop (the one-family tropical year). @param {number} year @returns {number} */
|
|
37
|
+
meanLongitudeDegAt: (year: number) => number;
|
|
38
|
+
/** The Sun's mean perihelion longitude of date (Earth's ϖ, mean elements), degrees, wrapped to [0, 360). @param {number} year @returns {number} */
|
|
39
|
+
perihelionLongitudeDegAt: (year: number) => number;
|
|
40
|
+
}>;
|
|
35
41
|
epoch: Readonly<{
|
|
36
42
|
yearToTMa: (year: number) => number;
|
|
37
|
-
hAtYear: (year: number) => number | null;
|
|
38
43
|
lodSecondsAtYear: (year: number) => number | null;
|
|
39
44
|
lodRealSecondsAtYear: (year: number) => number;
|
|
40
45
|
alphaAtYear: (year: number) => number;
|
|
41
46
|
moonDistanceKmAtYear: (year: number) => number;
|
|
42
47
|
siderealYearSecondsAtYear: (year: number) => number;
|
|
43
48
|
deltaTSecondsAtYear: (year: number) => number;
|
|
44
|
-
cyclesBetween: (yearA: number, yearB: number, divisorN: number) => number;
|
|
45
49
|
axialPrecessionYearsAtYear: (year: number) => number;
|
|
46
50
|
tropicalYearSecondsAtYear: (year: number) => number;
|
|
47
51
|
}>;
|
|
@@ -74,11 +78,14 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
|
|
|
74
78
|
* obliquity lines ride THIS rate; the general precession (meanRateArcsecPerYrAtYear) is the
|
|
75
79
|
* equinox along the ecliptic of date. @param {number} year @returns {number} */
|
|
76
80
|
spinAxisInertialRateArcsecPerYrAtYear: (year: number) => number;
|
|
77
|
-
/** The obliquity beat 2π/(ψ̇ᵢₙ(t) − |s₃|), years — the SHIPPED deep-time obliquity period
|
|
78
|
-
* leg 1; 41,098 at J2000
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
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} */
|
|
82
89
|
obliquityBeatYearsAtYear: (year: number) => number;
|
|
83
90
|
/** THE REALIZED POLE RATE OVER A WINDOW, ″/yr — see the one home above (the mean of the inertial rate of
|
|
84
91
|
* date with its three of-date factors); the rate the obliquity lines of a record spanning the window carry. */
|
|
@@ -116,22 +123,18 @@ export function assembleModel(C: Readonly<Record<string, any>>, F: Readonly<Reco
|
|
|
116
123
|
earth: Readonly<{
|
|
117
124
|
perihelionLongitudeDeg: (year: number) => number;
|
|
118
125
|
obliquityDeg: (year: number) => number;
|
|
119
|
-
obliquityCombDeg: (year: number) => number;
|
|
120
126
|
eccentricity: (year: number) => number;
|
|
121
127
|
inclinationDeg: (year: number) => number;
|
|
122
128
|
ascendingNodeDeg: (year: number) => number;
|
|
123
129
|
}>;
|
|
124
130
|
lengths: Readonly<{
|
|
125
131
|
tropicalYearDays: (year: number) => number;
|
|
126
|
-
tropicalYearDirectDays: (year: number) => number;
|
|
127
132
|
siderealYearDays: (year: number) => number;
|
|
128
133
|
anomalisticYearDays: (year: number) => number;
|
|
129
134
|
dayLengthSeconds: (year: number) => number;
|
|
130
135
|
lodRealSeconds: (year: number) => number;
|
|
131
136
|
siderealDaySeconds: (year: number) => number;
|
|
132
137
|
stellarDaySeconds: (year: number) => number;
|
|
133
|
-
measuredSolarDaySeconds: (year: number) => number;
|
|
134
|
-
raDayOffsetMs: (year: number) => number;
|
|
135
138
|
}>;
|
|
136
139
|
cardinal: Readonly<{
|
|
137
140
|
jd: (year: number, type: string) => number;
|
|
@@ -5,20 +5,11 @@ export type MoonArgsDeg = {
|
|
|
5
5
|
Mp: number;
|
|
6
6
|
F: number;
|
|
7
7
|
};
|
|
8
|
-
/**
|
|
9
|
-
* @typedef {{Lp: number, D: number, M: number, Mp: number, F: number}} MoonArgsDeg
|
|
10
|
-
*/
|
|
11
8
|
/**
|
|
12
9
|
* @param {{
|
|
13
10
|
* constants: {
|
|
14
11
|
* j2000JD: number,
|
|
15
12
|
* julianCenturyDays: number,
|
|
16
|
-
* holisticYearJ2000: number,
|
|
17
|
-
* balancedYearJ2000: number,
|
|
18
|
-
* meanSolarYearDays: number,
|
|
19
|
-
* meanAnomalisticYearDays: number,
|
|
20
|
-
* tropicalYearHarmonics: Array<[number, number, number]>,
|
|
21
|
-
* anomalisticYearHarmonics: Array<[number, number, number]>,
|
|
22
13
|
* eccentricityJ2000: number,
|
|
23
14
|
* eccentricityDotJ2000: number,
|
|
24
15
|
* eccentricityDotDotJ2000: number,
|
|
@@ -30,11 +21,12 @@ export type MoonArgsDeg = {
|
|
|
30
21
|
* eccAt: (tYr: number) => number,
|
|
31
22
|
* channelIntegral: (T: number, s: number) => number,
|
|
32
23
|
* computeObliquityEarth: (year: number) => number,
|
|
24
|
+
* sunMeanLonDegAtJdTT: (jdTT: number) => number,
|
|
25
|
+
* sunPerihelionLonDegAtJdTT: (jdTT: number) => number,
|
|
33
26
|
* jdToSIyear: (jd: number) => number,
|
|
34
27
|
* tropicalOrbitsBetween: (yearA: number, yearB: number) => (number | null),
|
|
35
28
|
* apsidalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null),
|
|
36
29
|
* nodalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null),
|
|
37
|
-
* cyclesBetween: (yearA: number, yearB: number, divisorN: number) => (number | null),
|
|
38
30
|
* isDeepTime: () => boolean,
|
|
39
31
|
* isFrameworkNative: () => boolean,
|
|
40
32
|
* pDynDegPerYearAt?: (year: number) => number,
|
|
@@ -48,17 +40,20 @@ export type MoonArgsDeg = {
|
|
|
48
40
|
* evaluators — the tweakpane identity, real at J2000, epoch-valid);
|
|
49
41
|
* pKin = the KINEMATIC pair's beat (the H/13-family mean the chains
|
|
50
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 —
|
|
44
|
+
* sunMeanLonDegAtJdTT (the mean longitude that integrates the one-family
|
|
45
|
+
* tropical year, unwrapped) and sunPerihelionLonDegAtJdTT (the mean
|
|
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.
|
|
51
52
|
*/
|
|
52
53
|
export function createMoonArguments({ constants, fns }: {
|
|
53
54
|
constants: {
|
|
54
55
|
j2000JD: number;
|
|
55
56
|
julianCenturyDays: number;
|
|
56
|
-
holisticYearJ2000: number;
|
|
57
|
-
balancedYearJ2000: number;
|
|
58
|
-
meanSolarYearDays: number;
|
|
59
|
-
meanAnomalisticYearDays: number;
|
|
60
|
-
tropicalYearHarmonics: Array<[number, number, number]>;
|
|
61
|
-
anomalisticYearHarmonics: Array<[number, number, number]>;
|
|
62
57
|
eccentricityJ2000: number;
|
|
63
58
|
eccentricityDotJ2000: number;
|
|
64
59
|
eccentricityDotDotJ2000: number;
|
|
@@ -70,11 +65,12 @@ export function createMoonArguments({ constants, fns }: {
|
|
|
70
65
|
eccAt: (tYr: number) => number;
|
|
71
66
|
channelIntegral: (T: number, s: number) => number;
|
|
72
67
|
computeObliquityEarth: (year: number) => number;
|
|
68
|
+
sunMeanLonDegAtJdTT: (jdTT: number) => number;
|
|
69
|
+
sunPerihelionLonDegAtJdTT: (jdTT: number) => number;
|
|
73
70
|
jdToSIyear: (jd: number) => number;
|
|
74
71
|
tropicalOrbitsBetween: (yearA: number, yearB: number) => (number | null);
|
|
75
72
|
apsidalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null);
|
|
76
73
|
nodalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null);
|
|
77
|
-
cyclesBetween: (yearA: number, yearB: number, divisorN: number) => (number | null);
|
|
78
74
|
isDeepTime: () => boolean;
|
|
79
75
|
isFrameworkNative: () => boolean;
|
|
80
76
|
pDynDegPerYearAt?: (year: number) => number;
|
|
@@ -85,10 +81,6 @@ export function createMoonArguments({ constants, fns }: {
|
|
|
85
81
|
fwArgs: (jdTT: number) => MoonArgsDeg;
|
|
86
82
|
fwArgsDeep: (jd: number) => MoonArgsDeg | null;
|
|
87
83
|
pureMeeusArgs: (jdTT: number) => MoonArgsDeg;
|
|
88
|
-
sunSecularDeviations: (jdTT: number) => {
|
|
89
|
-
dLs: number;
|
|
90
|
-
dPeri: number;
|
|
91
|
-
};
|
|
92
84
|
planetaryCarrier: (T: number) => number;
|
|
93
85
|
obliquityCarrier: (T: number) => number;
|
|
94
86
|
lpSecularCompletion: (T: number) => number;
|
|
@@ -101,7 +93,6 @@ export function createMoonArguments({ constants, fns }: {
|
|
|
101
93
|
LPR: number;
|
|
102
94
|
DR: number;
|
|
103
95
|
MR: number;
|
|
104
|
-
P_DEGCY: number;
|
|
105
96
|
WDOT: number;
|
|
106
97
|
NDOT: number;
|
|
107
98
|
T2_W: number;
|
|
@@ -136,3 +127,13 @@ export function createMoonArguments({ constants, fns }: {
|
|
|
136
127
|
* Sun secular deviations. @param {number} jd @returns {number}
|
|
137
128
|
*/
|
|
138
129
|
export function jdToDecimalYear(jd: number): number;
|
|
130
|
+
/**
|
|
131
|
+
* @typedef {{Lp: number, D: number, M: number, Mp: number, F: number}} MoonArgsDeg
|
|
132
|
+
*/
|
|
133
|
+
/** The secular-completion taper half-width, Julian years: the cos² envelope
|
|
134
|
+
* inside which the chain's Meeus-measured rate anchors and the Lp secular
|
|
135
|
+
* completion act (full at the anchor, zero beyond). A recorded window of the
|
|
136
|
+
* completion, not a law — the anchors were measured with it (plan 09 step
|
|
137
|
+
* 5c: it was written as the era unit's twelfth, H/12, "lattice-derived";
|
|
138
|
+
* the value is kept bit-identical and named for what it is). */
|
|
139
|
+
export const SECULAR_COMPLETION_TAPER_YEARS: 27943.083333333332;
|
|
@@ -151,11 +151,11 @@ export const DEEP_MODES_ARTIFACT: Readonly<{
|
|
|
151
151
|
im: number;
|
|
152
152
|
}[];
|
|
153
153
|
};
|
|
154
|
-
anchorE: 0.
|
|
155
|
-
anchorPeriEclipticDeg: 462.
|
|
154
|
+
anchorE: 0.016702435651957125;
|
|
155
|
+
anchorPeriEclipticDeg: 462.9179213996576;
|
|
156
156
|
anchorInclEclipticDeg: 0.00010345820355474172;
|
|
157
157
|
anchorAscNodeEclipticDeg: 140.29217988414328;
|
|
158
158
|
anchorZDotPerYr: number[];
|
|
159
159
|
slopeTaperYears: 27943.083333333332;
|
|
160
160
|
}>;
|
|
161
|
-
export const DEEP_MODES_ARTIFACT_HASH: "
|
|
161
|
+
export const DEEP_MODES_ARTIFACT_HASH: "87c325fac77d94a4";
|
|
@@ -8,14 +8,9 @@
|
|
|
8
8
|
* gmEarthMoonM3PerS2: number,
|
|
9
9
|
* massRatioEarthMoon: number,
|
|
10
10
|
* moonSiderealMonthInputDays: number,
|
|
11
|
-
* holisticYearJ2000: number,
|
|
12
11
|
* meanSiderealYearJ2000Seconds: number,
|
|
13
|
-
* nApsidalOfDateJ2000: number,
|
|
14
|
-
* nNodalOfDateJ2000: number,
|
|
15
12
|
* moonApsidalJ2000Seconds: number,
|
|
16
13
|
* moonNodalJ2000Seconds: number,
|
|
17
|
-
* moonApsidalOfDateJ2000Seconds: number,
|
|
18
|
-
* moonNodalOfDateJ2000Seconds: number,
|
|
19
14
|
* moonSiderealMonthJ2000Seconds: number,
|
|
20
15
|
* sPerigee: number,
|
|
21
16
|
* sNode: number,
|
|
@@ -23,13 +18,18 @@
|
|
|
23
18
|
* fns: {
|
|
24
19
|
* meanLodSecondsAtAge: (tMa: number) => (number | null),
|
|
25
20
|
* meanSiderealYearSecondsAtAge: (tMa: number) => number,
|
|
26
|
-
*
|
|
21
|
+
* precessionPeriodYearsAtAge: (tMa: number) => (number | null),
|
|
27
22
|
* modulation: (tMa: number, s: number) => number,
|
|
28
23
|
* distanceMetresAtAge?: (tMa: number) => number,
|
|
29
24
|
* },
|
|
30
25
|
* }} deps — fns are the ENGINE'S OWN layer-0/1 evaluators and the shared
|
|
31
26
|
* eccentricity channel's modulation; constants are the engine's derived
|
|
32
27
|
* J2000 anchors (both engines derive them from the same JSON).
|
|
28
|
+
* fns.precessionPeriodYearsAtAge is the engine's lunisolar precession period
|
|
29
|
+
* of date T_p(t), Julian years (the composed rate's period; plan 09 step
|
|
30
|
+
* 5c — the tropical month's equinox turn, formerly the counter's 13/H(t),
|
|
31
|
+
* 0.086 % slow: the chain's J2000 tropical month sat 5.85 ms above the IAU
|
|
32
|
+
* input, the 1/T_p form is within 0.1 ms of it).
|
|
33
33
|
* fns.distanceMetresAtAge, when present, OVERRIDES the internal quartic —
|
|
34
34
|
* the Driver-1½ regime-aware history (recession-history.cjs); absent, the
|
|
35
35
|
* internal quartic is the pure twin (bit-identical for t ≤ jointMa).
|
|
@@ -43,14 +43,9 @@ export function createMoonMonthChain({ constants, fns }: {
|
|
|
43
43
|
gmEarthMoonM3PerS2: number;
|
|
44
44
|
massRatioEarthMoon: number;
|
|
45
45
|
moonSiderealMonthInputDays: number;
|
|
46
|
-
holisticYearJ2000: number;
|
|
47
46
|
meanSiderealYearJ2000Seconds: number;
|
|
48
|
-
nApsidalOfDateJ2000: number;
|
|
49
|
-
nNodalOfDateJ2000: number;
|
|
50
47
|
moonApsidalJ2000Seconds: number;
|
|
51
48
|
moonNodalJ2000Seconds: number;
|
|
52
|
-
moonApsidalOfDateJ2000Seconds: number;
|
|
53
|
-
moonNodalOfDateJ2000Seconds: number;
|
|
54
49
|
moonSiderealMonthJ2000Seconds: number;
|
|
55
50
|
sPerigee: number;
|
|
56
51
|
sNode: number;
|
|
@@ -58,7 +53,7 @@ export function createMoonMonthChain({ constants, fns }: {
|
|
|
58
53
|
fns: {
|
|
59
54
|
meanLodSecondsAtAge: (tMa: number) => (number | null);
|
|
60
55
|
meanSiderealYearSecondsAtAge: (tMa: number) => number;
|
|
61
|
-
|
|
56
|
+
precessionPeriodYearsAtAge: (tMa: number) => (number | null);
|
|
62
57
|
modulation: (tMa: number, s: number) => number;
|
|
63
58
|
distanceMetresAtAge?: (tMa: number) => number;
|
|
64
59
|
};
|
|
@@ -70,10 +65,6 @@ export function createMoonMonthChain({ constants, fns }: {
|
|
|
70
65
|
siderealMonthSecondsAtAge: (tMa: number) => number | null;
|
|
71
66
|
synodicMonthSecondsAtAge: (tMa: number) => number | null;
|
|
72
67
|
tropicalMonthSecondsAtAge: (tMa: number) => number | null;
|
|
73
|
-
apsidalCyclesOfDateAtAge: (tMa: number) => number | null;
|
|
74
|
-
nodalCyclesOfDateAtAge: (tMa: number) => number | null;
|
|
75
|
-
apsidalPrecessionSecondsOfDateAtAge: (tMa: number) => number | null;
|
|
76
|
-
nodalPrecessionSecondsOfDateAtAge: (tMa: number) => number | null;
|
|
77
68
|
perigeePrecessionSecondsAtAge: (tMa: number) => number | null;
|
|
78
69
|
nodePrecessionSecondsAtAge: (tMa: number) => number | null;
|
|
79
70
|
anomalisticMonthSecondsAtAge: (tMa: number) => number | null;
|
package/types/moon/series.d.cts
CHANGED
|
@@ -26,7 +26,7 @@ export type MeeusTermTable = Array<[number, number, number, number, number]>;
|
|
|
26
26
|
* jdToSIyear: (jd: number) => number,
|
|
27
27
|
* tropicalOrbitsBetween: (yearA: number, yearB: number) => (number | null),
|
|
28
28
|
* apsidalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null),
|
|
29
|
-
*
|
|
29
|
+
* siderealOrbitsBetween: (yearA: number, yearB: number) => (number | null),
|
|
30
30
|
* jupiterOrbitsBetween: (yearA: number, yearB: number) => (number | null),
|
|
31
31
|
* isDeepTime: () => boolean,
|
|
32
32
|
* isFrameworkNative: () => boolean,
|
|
@@ -66,7 +66,7 @@ export function createMoonSeries({ constants, fns }: {
|
|
|
66
66
|
jdToSIyear: (jd: number) => number;
|
|
67
67
|
tropicalOrbitsBetween: (yearA: number, yearB: number) => (number | null);
|
|
68
68
|
apsidalOfDateCyclesBetween: (yearA: number, yearB: number) => (number | null);
|
|
69
|
-
|
|
69
|
+
siderealOrbitsBetween: (yearA: number, yearB: number) => (number | null);
|
|
70
70
|
jupiterOrbitsBetween: (yearA: number, yearB: number) => (number | null);
|
|
71
71
|
isDeepTime: () => boolean;
|
|
72
72
|
isFrameworkNative: () => boolean;
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
export type PhaseMachinery = {
|
|
2
|
-
ensureTable: () => void;
|
|
3
|
-
cumulAtYear: (year: number) => (number | null);
|
|
4
|
-
yearAtCumul: (targetCumul: number) => (number | null);
|
|
5
|
-
grid: () => {
|
|
6
|
-
yearMin: number;
|
|
7
|
-
yearMax: number;
|
|
8
|
-
stepYears: number;
|
|
9
|
-
j2000Idx: number;
|
|
10
|
-
length: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
1
|
export type DeepCalendar = {
|
|
14
2
|
/**
|
|
15
3
|
* SI-tropical-year label for a
|
|
@@ -23,10 +11,6 @@ export type DeepCalendar = {
|
|
|
23
11
|
* the exact inverse of jdToSIyear.
|
|
24
12
|
*/
|
|
25
13
|
siYearToJD: (ySI: number) => number;
|
|
26
|
-
/**
|
|
27
|
-
* inverse of the phase machinery's cumulAtYear — null outside the table.
|
|
28
|
-
*/
|
|
29
|
-
yearAtCumulIntegral: (targetCumul: number) => (number | null);
|
|
30
14
|
/**
|
|
31
15
|
* builds the ∫ daysPerYear dt table
|
|
32
16
|
* (idempotent; under the lattice α).
|
|
@@ -39,24 +23,12 @@ export type DeepCalendar = {
|
|
|
39
23
|
* year = startModelYear.
|
|
40
24
|
*/
|
|
41
25
|
yearToJD: (year: number) => (number | null);
|
|
42
|
-
/**
|
|
43
|
-
* calendar year of the k-th H-balanced event, k = 0 being `balancedYear`;
|
|
44
|
-
* negative k = past; null outside the table domain.
|
|
45
|
-
*/
|
|
46
|
-
balancedYearAtCycle: (cycleOffset: number) => (number | null);
|
|
47
26
|
/**
|
|
48
27
|
* diagnostic — the
|
|
49
28
|
* table length once built, null before.
|
|
50
29
|
*/
|
|
51
30
|
cumulDaysTableLength: () => (number | null);
|
|
52
31
|
};
|
|
53
|
-
/**
|
|
54
|
-
* @typedef {Object} PhaseMachinery
|
|
55
|
-
* @property {() => void} ensureTable
|
|
56
|
-
* @property {(year: number) => (number | null)} cumulAtYear
|
|
57
|
-
* @property {(targetCumul: number) => (number | null)} yearAtCumul
|
|
58
|
-
* @property {() => {yearMin: number, yearMax: number, stepYears: number, j2000Idx: number, length: number}} grid
|
|
59
|
-
*/
|
|
60
32
|
/**
|
|
61
33
|
* @typedef {Object} DeepCalendar
|
|
62
34
|
* @property {(jd: number) => number} jdToSIyear SI-tropical-year label for a
|
|
@@ -65,51 +37,43 @@ export type DeepCalendar = {
|
|
|
65
37
|
* with the runtime by construction; the round-trip bias Y_SI − Y is −11.0 yr
|
|
66
38
|
* at −302,635 and grows quadratically).
|
|
67
39
|
* @property {(ySI: number) => number} siYearToJD the exact inverse of jdToSIyear.
|
|
68
|
-
* @property {(targetCumul: number) => (number | null)} yearAtCumulIntegral
|
|
69
|
-
* inverse of the phase machinery's cumulAtYear — null outside the table.
|
|
70
40
|
* @property {() => void} ensureCumulDaysTable builds the ∫ daysPerYear dt table
|
|
71
41
|
* (idempotent; under the lattice α).
|
|
72
42
|
* @property {(year: number) => (number | null)} yearToJD calendar year → JD,
|
|
73
43
|
* integrating days-per-year from startModelYear; null outside the table
|
|
74
44
|
* domain or past the tidal-lock asymptote; startModelJD exactly at
|
|
75
45
|
* year = startModelYear.
|
|
76
|
-
* @property {(cycleOffset: number) => (number | null)} balancedYearAtCycle
|
|
77
|
-
* calendar year of the k-th H-balanced event, k = 0 being `balancedYear`;
|
|
78
|
-
* negative k = past; null outside the table domain.
|
|
79
46
|
* @property {() => (number | null)} cumulDaysTableLength diagnostic — the
|
|
80
47
|
* table length once built, null before.
|
|
81
48
|
*/
|
|
82
49
|
/**
|
|
83
50
|
* @param {{
|
|
84
|
-
* phase: () => PhaseMachinery,
|
|
85
51
|
* meanYearInDaysAtAgeMa: (tMa: number) => (number | null),
|
|
86
52
|
* withLatticeAlpha: (build: () => void) => void,
|
|
87
53
|
* startModelJD: number,
|
|
88
54
|
* startModelYear: number,
|
|
89
55
|
* startModelYearWithCorrection: number,
|
|
90
56
|
* siTropicalYearDays: number,
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* }} deps — `
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* `
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* anchor (≈ 2000.4977) — two different constants, do not unify.
|
|
57
|
+
* yearMin?: number,
|
|
58
|
+
* yearMax?: number,
|
|
59
|
+
* stepYears?: number,
|
|
60
|
+
* }} deps — `meanYearInDaysAtAgeMa` is the engine's days-per-year source
|
|
61
|
+
* (the LOD channel's `yearInDaysAtAge`); `withLatticeAlpha` the engine's
|
|
62
|
+
* R2 pin; `startModelYear` is the table zero (2000.5) and
|
|
63
|
+
* `startModelYearWithCorrection` the SI-axis anchor (≈ 2000.4977) — two
|
|
64
|
+
* different constants, do not unify; the grid (±500 Myr, 10-kyr cells)
|
|
65
|
+
* is the engines' deep-time grid — the table zero sits at the cell
|
|
66
|
+
* nearest `startModelYear`.
|
|
102
67
|
* @returns {DeepCalendar}
|
|
103
68
|
*/
|
|
104
|
-
export function createDeepCalendar({
|
|
105
|
-
phase: () => PhaseMachinery;
|
|
69
|
+
export function createDeepCalendar({ meanYearInDaysAtAgeMa, withLatticeAlpha, startModelJD, startModelYear, startModelYearWithCorrection, siTropicalYearDays, yearMin, yearMax, stepYears, }: {
|
|
106
70
|
meanYearInDaysAtAgeMa: (tMa: number) => (number | null);
|
|
107
71
|
withLatticeAlpha: (build: () => void) => void;
|
|
108
72
|
startModelJD: number;
|
|
109
73
|
startModelYear: number;
|
|
110
74
|
startModelYearWithCorrection: number;
|
|
111
75
|
siTropicalYearDays: number;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
76
|
+
yearMin?: number;
|
|
77
|
+
yearMax?: number;
|
|
78
|
+
stepYears?: number;
|
|
115
79
|
}): DeepCalendar;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type PlanetGeometryBody = {
|
|
2
2
|
key: string;
|
|
3
3
|
type?: string;
|
|
4
|
-
|
|
4
|
+
periodDays: number;
|
|
5
|
+
semiMajorAxisAu?: number;
|
|
5
6
|
orbitalEccentricityBase?: number;
|
|
6
7
|
longitudePerihelion?: number;
|
|
7
8
|
ascendingNode?: number;
|
|
@@ -12,7 +13,8 @@ export type PlanetGeometryBody = {
|
|
|
12
13
|
* @typedef {{
|
|
13
14
|
* key: string,
|
|
14
15
|
* type?: string,
|
|
15
|
-
*
|
|
16
|
+
* periodDays: number,
|
|
17
|
+
* semiMajorAxisAu?: number,
|
|
16
18
|
* orbitalEccentricityBase?: number,
|
|
17
19
|
* longitudePerihelion?: number,
|
|
18
20
|
* ascendingNode?: number,
|
|
@@ -21,19 +23,19 @@ export type PlanetGeometryBody = {
|
|
|
21
23
|
* }} PlanetGeometryBody
|
|
22
24
|
*/
|
|
23
25
|
/**
|
|
24
|
-
* @param {PlanetGeometryBody} body
|
|
26
|
+
* @param {PlanetGeometryBody} body — `periodDays` the body's sidereal orbital
|
|
27
|
+
* period in SI days; `semiMajorAxisAu` the chain's J2000 a where a chain
|
|
28
|
+
* exists (else Kepler's a from the period, in the scene's solar-year units)
|
|
25
29
|
* @param {{
|
|
26
|
-
* holisticYears: number,
|
|
27
30
|
* meanSolarYearDays: number,
|
|
28
31
|
* currentAUDistanceKm: number,
|
|
29
32
|
* earthEccentricityJ2000: number,
|
|
30
33
|
* earthPerihelionLongitudeJ2000Deg: number,
|
|
31
|
-
* }} env — the engine's J2000 values
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* untouched by this layer).
|
|
34
|
+
* }} env — the engine's J2000 values; `meanSolarYearDays` is the scene's
|
|
35
|
+
* year unit (`pos` counts mean solar years), so `periodYears` is the period
|
|
36
|
+
* in that unit, the scaffold's `speed` = 2π/periodYears.
|
|
35
37
|
* @returns {{
|
|
36
|
-
*
|
|
38
|
+
* orbitDistance: number, periodYears: number, periodDays: number,
|
|
37
39
|
* realOrbitalEccentricity: (number | undefined),
|
|
38
40
|
* elipticOrbit: (number | undefined), perihelionDistance: (number | undefined),
|
|
39
41
|
* speedKmh: number, rotationPeriodHours: (number | undefined),
|
|
@@ -41,15 +43,14 @@ export type PlanetGeometryBody = {
|
|
|
41
43
|
* }}
|
|
42
44
|
*/
|
|
43
45
|
export function derivePlanetGeometry(body: PlanetGeometryBody, env: {
|
|
44
|
-
holisticYears: number;
|
|
45
46
|
meanSolarYearDays: number;
|
|
46
47
|
currentAUDistanceKm: number;
|
|
47
48
|
earthEccentricityJ2000: number;
|
|
48
49
|
earthPerihelionLongitudeJ2000Deg: number;
|
|
49
50
|
}): {
|
|
50
|
-
solarYearCount: number;
|
|
51
51
|
orbitDistance: number;
|
|
52
52
|
periodYears: number;
|
|
53
|
+
periodDays: number;
|
|
53
54
|
realOrbitalEccentricity: (number | undefined);
|
|
54
55
|
elipticOrbit: (number | undefined);
|
|
55
56
|
perihelionDistance: (number | undefined);
|
|
@@ -58,3 +59,18 @@ export function derivePlanetGeometry(body: PlanetGeometryBody, env: {
|
|
|
58
59
|
eccentricityPerihelion: (number | undefined);
|
|
59
60
|
lowestPoint: (number | undefined);
|
|
60
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* The scaffold's orbit inputs for one body — ONE home for the rule (plan 09
|
|
64
|
+
* step 7b): where the governed engine-D chain artifact has the body, the
|
|
65
|
+
* chain's J2000 semi-major axis and its fitted era-window mean motion (deg
|
|
66
|
+
* per Julian year → the period in SI days); otherwise the body's observed
|
|
67
|
+
* period input (the no-chain bodies Pluto, Halley, Eros, Ceres).
|
|
68
|
+
* @param {string} key
|
|
69
|
+
* @param {any} chainArtifact the CHAIN_ARTIFACT (or the governed JSON it embeds)
|
|
70
|
+
* @param {number} fallbackPeriodDays the observed period input, SI days
|
|
71
|
+
* @returns {{ periodDays: number, semiMajorAxisAu: (number | undefined) }}
|
|
72
|
+
*/
|
|
73
|
+
export function scaffoldOrbitInputs(key: string, chainArtifact: any, fallbackPeriodDays: number): {
|
|
74
|
+
periodDays: number;
|
|
75
|
+
semiMajorAxisAu: (number | undefined);
|
|
76
|
+
};
|
|
@@ -3,6 +3,9 @@ export type PlanetModelBody = {
|
|
|
3
3
|
* - geometry type branch ('I' | 'II' | 'III')
|
|
4
4
|
*/
|
|
5
5
|
type?: string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* - the observed sidereal period input, SI days (the scaffold period of the no-chain bodies; the chain planets ride the artifact's elements)
|
|
8
|
+
*/
|
|
6
9
|
solarYearInput: number;
|
|
7
10
|
invPlaneInclinationJ2000?: number | undefined;
|
|
8
11
|
longitudePerihelion?: number | undefined;
|
|
@@ -26,7 +29,10 @@ export type PlanetModelBody = {
|
|
|
26
29
|
orbitDistanceOverride?: number | undefined;
|
|
27
30
|
};
|
|
28
31
|
export type PlanetModelEnv = {
|
|
29
|
-
|
|
32
|
+
/**
|
|
33
|
+
* - the governed engine-D chain artifact (CHAIN_ARTIFACT): the seven chain planets' scaffold a and period ride its J2000 elements (plan 09 step 7b)
|
|
34
|
+
*/
|
|
35
|
+
chainArtifact?: any;
|
|
30
36
|
meanSolarYearDays: number;
|
|
31
37
|
balancedYear: number;
|
|
32
38
|
systemResetN: number;
|
|
@@ -42,7 +48,7 @@ export type PlanetModelRecord = {
|
|
|
42
48
|
/**
|
|
43
49
|
* @typedef {Object} PlanetModelBody
|
|
44
50
|
* @property {string} [type] - geometry type branch ('I' | 'II' | 'III')
|
|
45
|
-
* @property {number} solarYearInput
|
|
51
|
+
* @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
52
|
* @property {number} [invPlaneInclinationJ2000]
|
|
47
53
|
* @property {number} [longitudePerihelion]
|
|
48
54
|
* @property {number} [wobblePeriodYears] - carriers: the chain's g-mode beat (input since Phase 7 commit 2)
|
|
@@ -57,7 +63,7 @@ export type PlanetModelRecord = {
|
|
|
57
63
|
*/
|
|
58
64
|
/**
|
|
59
65
|
* @typedef {Object} PlanetModelEnv
|
|
60
|
-
* @property {
|
|
66
|
+
* @property {any} [chainArtifact] - the governed engine-D chain artifact (CHAIN_ARTIFACT): the seven chain planets' scaffold a and period ride its J2000 elements (plan 09 step 7b)
|
|
61
67
|
* @property {number} meanSolarYearDays
|
|
62
68
|
* @property {number} balancedYear
|
|
63
69
|
* @property {number} systemResetN
|