@essrt/physics 4.3.0 → 4.4.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@essrt/physics",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "ESSRT (Expanding Solar System Resonance Theory) physics core \u2014 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
6
  "modelVersion": "v13.0",
@@ -101,6 +101,31 @@ function createCardinalStructure({ sampleAt, tropicalYearSecondsAtYearFn }) {
101
101
  + eocOffsetSeconds(year + 1, type) - eocOffsetSeconds(year, type);
102
102
  }
103
103
 
104
+ /**
105
+ * The ANOMALISTIC year — time between successive perihelion passages,
106
+ * SI seconds. At perihelion the equation of center is ZERO by definition
107
+ * (M = 0), so perihelion passages are pure mean-anomaly events and the
108
+ * closed form needs no EoC term at all:
109
+ *
110
+ * T_anom(year) = T_mean(year+½) · 360 / (360 − Δϖ_yr)
111
+ *
112
+ * with Δϖ_yr = ϖ(year+1) − ϖ(year) (wrapped; the year-over-year apsidal
113
+ * advance RELATIVE TO THE EQUINOX — periOfDateDeg is equinox-referenced,
114
+ * so this is the climatic-precession rate, ~0.017°/yr ≈ +25 min at
115
+ * J2000). Exact difference form; driven by the ENGINE's ϖ(t) — this is
116
+ * the model's physics, replacing the retired K-family anomalistic
117
+ * harmonic fit (the family that measured worst against the one-source
118
+ * movement: 0.41 s broadband).
119
+ * @param {number} year the interval starts at this year's perihelion
120
+ * @returns {number} seconds
121
+ */
122
+ function anomalisticYearSeconds(year) {
123
+ const p0 = sampleAt(year).periOfDateDeg;
124
+ const p1 = sampleAt(year + 1).periOfDateDeg;
125
+ const dPeriDeg = ((p1 - p0 + 540) % 360) - 180; // wrapped, prograde +
126
+ return tropicalYearSecondsAtYearFn(year + 0.5) * 360 / (360 - dPeriDeg);
127
+ }
128
+
104
129
  /**
105
130
  * The four year lengths minus the mean — the e(t)-proportional spread.
106
131
  * @param {number} year
@@ -116,7 +141,7 @@ function createCardinalStructure({ sampleAt, tropicalYearSecondsAtYearFn }) {
116
141
  return out;
117
142
  }
118
143
 
119
- return { eocOffsetSeconds, yearLengthSeconds, spreadSeconds };
144
+ return { eocOffsetSeconds, yearLengthSeconds, spreadSeconds, anomalisticYearSeconds };
120
145
  }
121
146
 
122
147
  module.exports = { createCardinalStructure, equationOfCenterDeg, CARDINAL_LONGITUDE_DEG };
package/src/model.js CHANGED
@@ -1175,6 +1175,7 @@ export function assembleModel(C, F, laws = {}) {
1175
1175
  yearLengthSeconds: /** @param {number} year @param {'VE'|'SS'|'AE'|'WS'} type @returns {number} */ (year, type) => cardinalStructureM.yearLengthSeconds(year, type),
1176
1176
  eocOffsetSeconds: /** @param {number} year @param {'VE'|'SS'|'AE'|'WS'} type @returns {number} */ (year, type) => cardinalStructureM.eocOffsetSeconds(year, type),
1177
1177
  spreadSeconds: /** @param {number} year */ (year) => cardinalStructureM.spreadSeconds(year),
1178
+ anomalisticYearSeconds: /** @param {number} year @returns {number} */ (year) => cardinalStructureM.anomalisticYearSeconds(year),
1178
1179
  }),
1179
1180
  moon: Object.freeze({
1180
1181
  distanceKmAtYear: /** @param {number} year @returns {number} */ (year) => moonDistanceMetresAtAge(yearToTMa(year)) / 1000,