@saber-usa/node-common 1.7.41-alpha.3 → 1.7.41
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/udl.js +11 -0
package/package.json
CHANGED
package/src/udl.js
CHANGED
|
@@ -525,6 +525,17 @@ const udlToNpsState = (udlRow) => {
|
|
|
525
525
|
// [ a, e, i, Ω, ω, θ ]
|
|
526
526
|
// sma (km), eccentricity, inclination (deg), raan (deg), arg of perigee (deg), true anomaly (deg)
|
|
527
527
|
keplerians = cartesianToKeplerian(pos, vel);
|
|
528
|
+
if (_.isEmpty(keplerians)) {
|
|
529
|
+
const idStateVector = _.get(udlRow, "idStateVector", null);
|
|
530
|
+
const epoch = _.get(udlRow, "epoch", null);
|
|
531
|
+
console.error(
|
|
532
|
+
"Keplerian conversion failed. "
|
|
533
|
+
+ `idStateVector: ${idStateVector}, epoch: ${epoch}, `
|
|
534
|
+
+ `xpos: ${Xpos} km, ypos: ${Ypos} km, zpos: ${Zpos} km, `
|
|
535
|
+
+ `xvel: ${Xvel} km/s, yvel: ${Yvel} km/s, zvel: ${Zvel} km/s`,
|
|
536
|
+
);
|
|
537
|
+
keplerians = {a: null, e: null, i: null, raan: null, w: null, f: null};
|
|
538
|
+
}
|
|
528
539
|
}
|
|
529
540
|
|
|
530
541
|
const regime = computeStateRegimeFromKeplerians(keplerians);
|