@essrt/physics 12.0.0 → 13.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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@essrt/physics",
3
- "version": "12.0.0",
3
+ "version": "13.0.0",
4
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": "v16.2",
6
+ "modelVersion": "v17.0",
7
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",
@@ -36,7 +36,7 @@
36
36
  export const CONSTANTS_HASH = "726b10e23d8ace09";
37
37
 
38
38
  /** Model version label — single source: public/input/model-version.json (§10 two-axis scheme). */
39
- export const MODEL_VERSION = "v16.2";
39
+ export const MODEL_VERSION = "v17.0";
40
40
 
41
41
  /** Canonical preprint DOI — single source: public/input/model-version.json. */
42
42
  export const PREPRINT_DOI = "10.21203/rs.3.rs-8758810/v4";
package/src/model.js CHANGED
@@ -97,12 +97,11 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
97
97
  const meanAnomalisticYearDays = (meanSolarYearDays * (H / 16)) / (H / 16 - 1);
98
98
  const meanTropicalYearJ2000Seconds = meanSolarYearDays * meanLengthOfDay;
99
99
 
100
- const earthtiltMean = C.earth.earthtiltMean;
101
100
  const earthInclAmplitude = C.earth.earthInvPlaneInclinationAmplitude;
102
- // eccentricityAmplitude: the Law-4 input A (the 1246 triangle closure; the
103
- // wobble-marker distance). It is the K calibration input ONLY — Earth's
104
- // eccentricity law does not use it; see eccentricityAt (base' derived) below.
105
- const eccentricityAmplitude = C.earth.eccentricityAmplitude;
101
+ // Plan 07 R6: `earthtiltMean` and `eccentricityAmplitude` were read here
102
+ // ONLY to invert the K constant from Earth's calibration. With the K law
103
+ // retired nothing in this module reads either — they remain on C.earth for
104
+ // the Earth-side devices (R9) and the registry.
106
105
  const earthInclMean = C.earthOrbital.earthInclinationJ2000_deg
107
106
  - earthInclAmplitude * Math.cos(((C.earthOrbital.earthPerihelionLongitudeJ2000
108
107
  - C.earthOrbital.earthInclinationCycleAnchor) * Math.PI) / 180);
@@ -722,14 +721,9 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
722
721
  massEarthAlone,
723
722
  massSun: M_SUN,
724
723
  });
725
- const eccentricityAmplitudeK = FL.computeKConstant({
726
- eccentricityAmplitude,
727
- massEarthAlone,
728
- massSun: M_SUN,
729
- earthTiltMeanDeg: earthtiltMean,
730
- });
731
- const systemResetN = C.foundational.systemResetN;
732
- const t2000 = 2000 - (balancedYear - systemResetN * H);
724
+ // (plan 07 R6: eccentricityAmplitudeK — the K constant inverted from
725
+ // Earth's calibration — and the t2000 phase offset it fed went with the
726
+ // eccentricity law. systemResetN is kept where other consumers read it.)
733
727
 
734
728
  /** @param {[number, number]|null} frac @returns {number|null} */
735
729
  const fractionToYears = (frac) => (frac === null ? null : (H * frac[0]) / frac[1]);
@@ -763,20 +757,7 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
763
757
  anchorAscNodeEclipticDeg: /** @type {any} */ (CHAIN_ARTIFACT).j2000AnchorElements[k].ascNodeEclipticDeg,
764
758
  obliquityJ2000Deg: C.earthOrbital.obliquityJ2000_deg,
765
759
  });
766
- const obliquityMean = Math.min(obliquityDerived, 180 - obliquityDerived); // acute: the K law reads sin|ε|
767
- const el = FL.computeEccentricityLaw({
768
- fibonacciD: mp.fibonacciD,
769
- massFrac: massFraction[k],
770
- solarYearInput: ar.solarYearInput,
771
- orbitalEccentricityJ2000: ar.orbitalEccentricityJ2000,
772
- antiPhase: mp.antiPhase || false,
773
- }, {
774
- kConstant: eccentricityAmplitudeK,
775
- obliquityMeanDeg: obliquityMean,
776
- wobblePeriodYears: wobble,
777
- t2000,
778
- meanSolarYearDays,
779
- });
760
+ const obliquityMean = Math.min(obliquityDerived, 180 - obliquityDerived); // acute form of the derived J2000 obliquity
780
761
  PLANET_RECORDS[k] = Object.freeze({
781
762
  name: mp.name,
782
763
  perihelionEclipticYears: ecl,
@@ -793,15 +774,14 @@ export function assembleModel(C, F, laws = {}, secularSeriesArtifact = /** @type
793
774
  invPlaneInclinationMean: il.mean,
794
775
  obliquityMean,
795
776
  orbitalEccentricityJ2000: ar.orbitalEccentricityJ2000,
796
- orbitalEccentricityAmplitude: el.amplitude,
797
- orbitalEccentricityBase: el.base,
798
- eccentricityPhaseJ2000: el.phaseJ2000,
799
777
  solarYearInput: ar.solarYearInput,
800
778
  axialTiltJ2000: ar.axialTiltJ2000,
801
779
  });
802
780
  // R8 (plan 07): what `model.planets.record()` PUBLISHES is not the record
803
- // above. The record keeps the ψ/K law outputs because the fitting pipeline
804
- // reads them (step 7a derive-eccentricity-amplitudes, the EoC fractions) —
781
+ // above. The internal record kept the ψ/K law outputs for the fitting
782
+ // pipeline; at R6 the K half and both fitter steps that read it are gone,
783
+ // so what remains above is the ψ half (until R5) and the structural inputs.
784
+ // The separation stands for the same reason it was made —
805
785
  // but nothing outside needs the device, and serving it made /v1/bodies
806
786
  // contradict the model's own chain on the SAME quantities: Mercury's node
807
787
  // cycle 298,060 yr against the chain's 232,001, Jupiter's perihelion period
@@ -72,37 +72,24 @@ function computeInclinationLaw(b, psiConstant) {
72
72
  // obliquity input the derived J2000 obliquity (spin-channel
73
73
  // computeObliquityJ2000Deg). docs/retired-record.md carries the record.)
74
74
 
75
- /**
76
- * K constant from Earth's calibration. @param {{
77
- * eccentricityAmplitude: number, massEarthAlone: number, massSun: number,
78
- * earthTiltMeanDeg: number }} c @returns {number} */
79
- function computeKConstant(c) {
80
- return c.eccentricityAmplitude * Math.sqrt(c.massEarthAlone / c.massSun)
81
- / (Math.sin(c.earthTiltMeanDeg * Math.PI / 180) * Math.sqrt(3));
82
- }
83
-
84
- /**
85
- * K law: eccentricity amplitude, base and J2000 phase.
86
- * @param {{ fibonacciD: number, massFrac: number, solarYearInput: number,
87
- * orbitalEccentricityJ2000: number, antiPhase: boolean }} b
88
- * @param {{ kConstant: number, obliquityMeanDeg: number,
89
- * wobblePeriodYears: number, t2000: number, meanSolarYearDays: number }} env
90
- * @returns {{ amplitude: number, base: number, phaseJ2000: number }} */
91
- function computeEccentricityLaw(b, env) {
92
- const a = Math.pow(b.solarYearInput / env.meanSolarYearDays, 2 / 3);
93
- const amplitude = env.kConstant * Math.sin(Math.abs(env.obliquityMeanDeg) * Math.PI / 180) * Math.sqrt(b.fibonacciD)
94
- / (Math.sqrt(b.massFrac) * Math.pow(a, 1.5));
95
- const eJ2000 = b.orbitalEccentricityJ2000;
96
- const phaseOffset = b.antiPhase ? 270 : 90;
97
- const phaseDeg = (env.t2000 / env.wobblePeriodYears) * 360 + phaseOffset;
98
- const cosTheta = Math.cos(phaseDeg * Math.PI / 180);
99
- const sinTheta = Math.sin(phaseDeg * Math.PI / 180);
100
- const disc = eJ2000 * eJ2000 - amplitude * amplitude * sinTheta * sinTheta;
101
- const base = amplitude * cosTheta + Math.sqrt(Math.max(0, disc));
102
- return { amplitude, base, phaseJ2000: ((phaseDeg % 360) + 360) % 360 };
103
- }
75
+ // Plan 07 R6: computeKConstant and computeEccentricityLaw stood here — the
76
+ // K relation (K = e_amp·√m·a^1.5 / (sin(tilt)·√d), inverted per planet) and
77
+ // the System-Reset eccentricity construction it fed
78
+ // (base = A·cosθ + √(e_J2000² − A²sin²θ) at the J2000 phase, θ measured on
79
+ // the wobble beat with a 90°/270° anti-phase offset).
80
+ //
81
+ // They are DELETED, not reclassified. Measured first (plan 07 §9e): scaling
82
+ // their outputs by 1.10 moved no scene position and no published record
83
+ // field — both twins place planets from the N-body chain, which overwrites
84
+ // the construction entirely — and the registry keys built on them had no
85
+ // consumer in the docs, on the website or in the paper. The nine balance and
86
+ // Fibonacci-law instruments that computed from them are retired with them;
87
+ // docs/retired-record.md is the record.
88
+ //
89
+ // A planet's eccentricity of date now has one home: the chain
90
+ // (`model.planets.eccentricity(k, year)`), and its long-term shape is the
91
+ // chain's own g-mode structure.
104
92
 
105
93
  module.exports = {
106
94
  computePsiConstant, computeInclinationLaw,
107
- computeKConstant, computeEccentricityLaw,
108
95
  };
@@ -67,8 +67,7 @@ const FL = require('./fibonacci-laws.cjs');
67
67
  * @property {number} earthEccentricityJ2000
68
68
  * @property {number} earthPerihelionLongitudeJ2000Deg
69
69
  * @property {{ earthInvPlaneInclinationAmplitude: number,
70
- * massEarthAlone: number, massSun: number,
71
- * eccentricityAmplitude: number, earthTiltMeanDeg: number }} calibration
70
+ * massEarthAlone: number, massSun: number }} calibration
72
71
  * @property {Record<string, number>} massFractions
73
72
  */
74
73
 
@@ -78,9 +77,6 @@ const FL = require('./fibonacci-laws.cjs');
78
77
  * @property {number} [invPlaneInclinationMean]
79
78
  * @property {number} [wobblePeriodYears]
80
79
  * @property {number} [obliquityMeanDeg]
81
- * @property {number} [eccentricityAmplitude]
82
- * @property {number} [eccentricityBase]
83
- * @property {number} [eccentricityPhaseJ2000Deg]
84
80
  * @property {ReturnType<typeof derivePlanetGeometry>} geometry
85
81
  */
86
82
 
@@ -91,8 +87,7 @@ const FL = require('./fibonacci-laws.cjs');
91
87
  * @param {Record<string, PlanetModelBody>} bodies - keyed by body name
92
88
  * (the key selects the body-unique geometry branches: mercury, pluto,
93
89
  * halleys, ceres)
94
- * @returns {{ psiConstant: number, kConstant: number,
95
- * eccentricityAnchor: number, t2000: number,
90
+ * @returns {{ psiConstant: number,
96
91
  * bodies: Record<string, PlanetModelRecord> }}
97
92
  */
98
93
  function createPlanetModel(env, bodies) {
@@ -101,15 +96,9 @@ function createPlanetModel(env, bodies) {
101
96
  massEarthAlone: env.calibration.massEarthAlone,
102
97
  massSun: env.calibration.massSun,
103
98
  });
104
- const kConstant = FL.computeKConstant({
105
- eccentricityAmplitude: env.calibration.eccentricityAmplitude,
106
- massEarthAlone: env.calibration.massEarthAlone,
107
- massSun: env.calibration.massSun,
108
- earthTiltMeanDeg: env.calibration.earthTiltMeanDeg,
109
- });
110
- // Anchor = balancedYear − systemResetN·H (n=7: the System Reset state).
111
- const eccentricityAnchor = env.balancedYear - env.systemResetN * env.holisticYears;
112
- const t2000 = 2000 - eccentricityAnchor;
99
+ // Plan 07 R6: kConstant, the System-Reset eccentricityAnchor
100
+ // (balancedYear − systemResetN·H) and the t2000 phase it fed went with the
101
+ // eccentricity law.
113
102
 
114
103
  const geomEnv = {
115
104
  holisticYears: env.holisticYears,
@@ -146,27 +135,18 @@ function createPlanetModel(env, bodies) {
146
135
  if (b.wobblePeriodYears !== undefined) rec.wobblePeriodYears = b.wobblePeriodYears;
147
136
  if (b.obliquityMeanDeg !== undefined) rec.obliquityMeanDeg = b.obliquityMeanDeg;
148
137
 
149
- if (b.fibonacciD && massFrac) {
150
- const el = FL.computeEccentricityLaw({
151
- fibonacciD: b.fibonacciD, massFrac,
152
- solarYearInput: b.solarYearInput,
153
- orbitalEccentricityJ2000: /** @type {number} */ (b.orbitalEccentricityJ2000),
154
- antiPhase: /** @type {boolean} */ (b.antiPhase),
155
- }, {
156
- kConstant, obliquityMeanDeg: /** @type {number} */ (rec.obliquityMeanDeg),
157
- wobblePeriodYears: /** @type {number} */ (rec.wobblePeriodYears), t2000,
158
- meanSolarYearDays: env.meanSolarYearDays,
159
- });
160
- rec.eccentricityAmplitude = el.amplitude;
161
- rec.eccentricityBase = el.base;
162
- rec.eccentricityPhaseJ2000Deg = el.phaseJ2000;
163
- }
138
+ // Plan 07 R6: the K law's eccentricityAmplitude / eccentricityBase /
139
+ // eccentricityPhaseJ2000Deg stood here. With the law gone, the ellipse
140
+ // geometry below reads the OBSERVED J2000 eccentricity where it used to
141
+ // read the law's System-Reset base — the observation the chain is
142
+ // anchored on, not a construction. The stored base survives only for the
143
+ // additional bodies, which carry theirs in model-parameters.json.
164
144
 
165
145
  rec.geometry = derivePlanetGeometry({
166
146
  key, type: b.type,
167
147
  solarYearInput: b.solarYearInput,
168
- orbitalEccentricityBase: rec.eccentricityBase !== undefined
169
- ? rec.eccentricityBase : b.orbitalEccentricityBase,
148
+ orbitalEccentricityBase: b.orbitalEccentricityBase !== undefined
149
+ ? b.orbitalEccentricityBase : b.orbitalEccentricityJ2000,
170
150
  longitudePerihelion: b.longitudePerihelion,
171
151
  ascendingNode: b.ascendingNode,
172
152
  rotationPeriodDays: b.rotationPeriodDays,
@@ -176,7 +156,7 @@ function createPlanetModel(env, bodies) {
176
156
  out[key] = rec;
177
157
  }
178
158
 
179
- return { psiConstant, kConstant, eccentricityAnchor, t2000, bodies: out };
159
+ return { psiConstant, bodies: out };
180
160
  }
181
161
 
182
162
  module.exports = { createPlanetModel };
@@ -25,37 +25,3 @@ export function computeInclinationLaw(b: {
25
25
  amplitude: number;
26
26
  mean: number;
27
27
  };
28
- /**
29
- * K constant from Earth's calibration. @param {{
30
- * eccentricityAmplitude: number, massEarthAlone: number, massSun: number,
31
- * earthTiltMeanDeg: number }} c @returns {number} */
32
- export function computeKConstant(c: {
33
- eccentricityAmplitude: number;
34
- massEarthAlone: number;
35
- massSun: number;
36
- earthTiltMeanDeg: number;
37
- }): number;
38
- /**
39
- * K law: eccentricity amplitude, base and J2000 phase.
40
- * @param {{ fibonacciD: number, massFrac: number, solarYearInput: number,
41
- * orbitalEccentricityJ2000: number, antiPhase: boolean }} b
42
- * @param {{ kConstant: number, obliquityMeanDeg: number,
43
- * wobblePeriodYears: number, t2000: number, meanSolarYearDays: number }} env
44
- * @returns {{ amplitude: number, base: number, phaseJ2000: number }} */
45
- export function computeEccentricityLaw(b: {
46
- fibonacciD: number;
47
- massFrac: number;
48
- solarYearInput: number;
49
- orbitalEccentricityJ2000: number;
50
- antiPhase: boolean;
51
- }, env: {
52
- kConstant: number;
53
- obliquityMeanDeg: number;
54
- wobblePeriodYears: number;
55
- t2000: number;
56
- meanSolarYearDays: number;
57
- }): {
58
- amplitude: number;
59
- base: number;
60
- phaseJ2000: number;
61
- };
@@ -41,8 +41,6 @@ export type PlanetModelEnv = {
41
41
  earthInvPlaneInclinationAmplitude: number;
42
42
  massEarthAlone: number;
43
43
  massSun: number;
44
- eccentricityAmplitude: number;
45
- earthTiltMeanDeg: number;
46
44
  };
47
45
  massFractions: Record<string, number>;
48
46
  };
@@ -51,9 +49,6 @@ export type PlanetModelRecord = {
51
49
  invPlaneInclinationMean?: number | undefined;
52
50
  wobblePeriodYears?: number | undefined;
53
51
  obliquityMeanDeg?: number | undefined;
54
- eccentricityAmplitude?: number | undefined;
55
- eccentricityBase?: number | undefined;
56
- eccentricityPhaseJ2000Deg?: number | undefined;
57
52
  geometry: ReturnType<typeof derivePlanetGeometry>;
58
53
  };
59
54
  /**
@@ -86,8 +81,7 @@ export type PlanetModelRecord = {
86
81
  * @property {number} earthEccentricityJ2000
87
82
  * @property {number} earthPerihelionLongitudeJ2000Deg
88
83
  * @property {{ earthInvPlaneInclinationAmplitude: number,
89
- * massEarthAlone: number, massSun: number,
90
- * eccentricityAmplitude: number, earthTiltMeanDeg: number }} calibration
84
+ * massEarthAlone: number, massSun: number }} calibration
91
85
  * @property {Record<string, number>} massFractions
92
86
  */
93
87
  /**
@@ -96,9 +90,6 @@ export type PlanetModelRecord = {
96
90
  * @property {number} [invPlaneInclinationMean]
97
91
  * @property {number} [wobblePeriodYears]
98
92
  * @property {number} [obliquityMeanDeg]
99
- * @property {number} [eccentricityAmplitude]
100
- * @property {number} [eccentricityBase]
101
- * @property {number} [eccentricityPhaseJ2000Deg]
102
93
  * @property {ReturnType<typeof derivePlanetGeometry>} geometry
103
94
  */
104
95
  /**
@@ -108,15 +99,11 @@ export type PlanetModelRecord = {
108
99
  * @param {Record<string, PlanetModelBody>} bodies - keyed by body name
109
100
  * (the key selects the body-unique geometry branches: mercury, pluto,
110
101
  * halleys, ceres)
111
- * @returns {{ psiConstant: number, kConstant: number,
112
- * eccentricityAnchor: number, t2000: number,
102
+ * @returns {{ psiConstant: number,
113
103
  * bodies: Record<string, PlanetModelRecord> }}
114
104
  */
115
105
  export function createPlanetModel(env: PlanetModelEnv, bodies: Record<string, PlanetModelBody>): {
116
106
  psiConstant: number;
117
- kConstant: number;
118
- eccentricityAnchor: number;
119
- t2000: number;
120
107
  bodies: Record<string, PlanetModelRecord>;
121
108
  };
122
109
  import { derivePlanetGeometry } from "./geometry.cjs";