@saber-usa/node-common 1.7.38 → 1.7.39
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 +1 -1
- package/src/astro.js +28 -5
package/package.json
CHANGED
package/src/astro.js
CHANGED
|
@@ -335,13 +335,36 @@ const orbitalMeanMotionRevPerDay = (aKm, muKm3s2) => {
|
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* Classify orbit regime using JCO v1.0.0 primary period/eccentricity cuts
|
|
338
|
-
* (Orbit_Class_Definitions_v1.0.0_11Jun2024.csv).
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
338
|
+
* (Orbit_Class_Definitions_v1.0.0_11Jun2024.csv).
|
|
339
|
+
*
|
|
340
|
+
* Documentation:
|
|
341
|
+
* https://unifieddatalibrary.com/scs/download?id=/CommunityData/JCO_DOK/JCO_JSON_Requirements/Orbit_Class_Definitions_v1.0.0_11Jun2024.xlsx
|
|
342
|
+
*
|
|
343
|
+
* Symbols (from the `orbit` argument, case-insensitive keys via lowerCaseObjectKeys):
|
|
344
|
+
* - e — eccentricity (dimensionless), where: `orbit.eccentricity`
|
|
345
|
+
* - T — orbital period (minutes), where: `orbit.period`
|
|
346
|
+
* - n — mean motion (revolutions per day), where: `orbit.meanmotion`
|
|
347
|
+
* - i — inclination (degrees), where: `orbit.inclination`
|
|
348
|
+
*
|
|
349
|
+
* Evaluation order:
|
|
350
|
+
*
|
|
351
|
+
* 1. e ≥ 0.25 → HEO (4)
|
|
352
|
+
* 2. 1300 < T < 1800 → GEO family: GeoStationary (256), GeoInclined (8), or GeoDrifter (512)
|
|
353
|
+
* - 256 when 0.99 ≤ n ≤ 1.01 and i ≤ 0.01°
|
|
354
|
+
* - 8 when 0.99 ≤ n ≤ 1.01 and i > 0.01°
|
|
355
|
+
* - 512 for the remainder of the JCO GEO period window (near-geosync / drifters)
|
|
356
|
+
* 3. 600 < T < 900 → MEO (16)
|
|
357
|
+
* 4. T ≤ 225 → LEO (2)
|
|
358
|
+
* 5. else → Undetermined (1) — JCO OTHER, XGEO, and period gaps (no dedicated enums yet)
|
|
359
|
+
*
|
|
360
|
+
* Guards:
|
|
361
|
+
* - missing or undefined `orbit` → Undetermined (1)
|
|
362
|
+
* - missing e → Undetermined (1)
|
|
363
|
+
* - missing T, or T ≤ 0 → Undetermined (1)
|
|
364
|
+
* - GEO subclass (step 2) requires n and i; if either is missing → Undetermined (1)
|
|
342
365
|
*
|
|
343
366
|
* @param {Object} orbit Object with keys eccentricity, inclination (deg), meanmotion (rev/day) and period (min)
|
|
344
|
-
* @return {number}
|
|
367
|
+
* @return {number} REGIMES bitflag index (see constants.js)
|
|
345
368
|
*/
|
|
346
369
|
const calcRegime = (orbit) => {
|
|
347
370
|
if (!isDefined(orbit)) {
|