@saber-usa/node-common 1.7.37 → 1.7.38
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 +25 -12
package/package.json
CHANGED
package/src/astro.js
CHANGED
|
@@ -334,8 +334,12 @@ const orbitalMeanMotionRevPerDay = (aKm, muKm3s2) => {
|
|
|
334
334
|
};
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
337
|
+
* Classify orbit regime using JCO v1.0.0 primary period/eccentricity cuts
|
|
338
|
+
* (Orbit_Class_Definitions_v1.0.0_11Jun2024.csv). Evaluation order matters:
|
|
339
|
+
* HEO first, then GEO family (1300–1800 min), MEO, LEO, else Undetermined.
|
|
340
|
+
*
|
|
341
|
+
* Documentation available at: https://unifieddatalibrary.com/scs/download?id=/CommunityData/JCO_DOK/JCO_JSON_Requirements/Orbit_Class_Definitions_v1.0.0_11Jun2024.xlsx
|
|
342
|
+
*
|
|
339
343
|
* @param {Object} orbit Object with keys eccentricity, inclination (deg), meanmotion (rev/day) and period (min)
|
|
340
344
|
* @return {number} the regime index
|
|
341
345
|
*/
|
|
@@ -344,34 +348,43 @@ const calcRegime = (orbit) => {
|
|
|
344
348
|
return REGIMES.Undetermined;
|
|
345
349
|
}
|
|
346
350
|
|
|
347
|
-
const {eccentricity, inclination, meanmotion, period}
|
|
351
|
+
const {eccentricity: e, inclination: i, meanmotion: n, period: T}
|
|
348
352
|
= lowerCaseObjectKeys(orbit);
|
|
349
353
|
|
|
350
|
-
if (!isDefined(
|
|
354
|
+
if (!isDefined(e)) {
|
|
351
355
|
return REGIMES.Undetermined;
|
|
352
356
|
}
|
|
353
357
|
|
|
354
|
-
if (
|
|
355
|
-
return REGIMES.
|
|
358
|
+
if (e >= 0.25) {
|
|
359
|
+
return REGIMES.Heo;
|
|
356
360
|
}
|
|
357
361
|
|
|
358
|
-
if (
|
|
359
|
-
return REGIMES.
|
|
362
|
+
if (!isDefined(T) || T <= 0) {
|
|
363
|
+
return REGIMES.Undetermined;
|
|
360
364
|
}
|
|
361
365
|
|
|
362
|
-
if (
|
|
366
|
+
if (T > 1300 && T < 1800) {
|
|
367
|
+
if (!isDefined(n) || !isDefined(i)) {
|
|
368
|
+
return REGIMES.Undetermined;
|
|
369
|
+
}
|
|
370
|
+
if (n >= 0.99 && n <= 1.01 && i <= 0.01) {
|
|
371
|
+
return REGIMES.GeoStationary;
|
|
372
|
+
}
|
|
373
|
+
if (n >= 0.99 && n <= 1.01 && i > 0.01) {
|
|
374
|
+
return REGIMES.GeoInclined;
|
|
375
|
+
}
|
|
363
376
|
return REGIMES.GeoDrifter;
|
|
364
377
|
}
|
|
365
378
|
|
|
366
|
-
if (
|
|
379
|
+
if (T > 600 && T < 900) {
|
|
367
380
|
return REGIMES.Meo;
|
|
368
381
|
}
|
|
369
382
|
|
|
370
|
-
if (
|
|
383
|
+
if (T <= 225) {
|
|
371
384
|
return REGIMES.Leo;
|
|
372
385
|
}
|
|
373
386
|
|
|
374
|
-
return
|
|
387
|
+
return REGIMES.Undetermined;
|
|
375
388
|
};
|
|
376
389
|
|
|
377
390
|
/**
|