@saber-usa/node-common 1.7.11 → 1.7.12

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/astro.js +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saber-usa/node-common",
3
- "version": "1.7.11",
3
+ "version": "1.7.12",
4
4
  "description": "Common node functions for Saber",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/astro.js CHANGED
@@ -1251,6 +1251,20 @@ const GetResiduals = (obs, tle) => {
1251
1251
  / 1000
1252
1252
  / 60;
1253
1253
  const pv = sgp4(sat, dt);
1254
+ if (!isPropagateValid(pv)) {
1255
+ // Skip this observation if propagation failed, add residual with null errors
1256
+ residuals.push({
1257
+ SatNo: ob.SatNo,
1258
+ ElErr: null,
1259
+ AzErr: null,
1260
+ RangeErr: null,
1261
+ ObTime: ob.ObTime,
1262
+ Source: ob.Source,
1263
+ SensorId: ob.IdSensor,
1264
+ Type: (ob.Type!==undefined && ob.Type!==null) ? ob.Type : null,
1265
+ });
1266
+ continue;
1267
+ }
1254
1268
  const gmst = gstime(obTimeUtc);
1255
1269
  const observerGd = {
1256
1270
  latitude: degreesToRadians(ob.SenLat),