@saber-usa/node-common 1.7.20 → 1.7.21
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 +5 -5
- package/src/udl.js +75 -1
- package/src/wasmProp/wasmAstro.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saber-usa/node-common",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.21",
|
|
4
4
|
"description": "Common node functions for Saber",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"author": "Saber USA",
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/client-s3": "^3.
|
|
27
|
-
"date-fns": "^4.
|
|
26
|
+
"@aws-sdk/client-s3": "^3.1062.0",
|
|
27
|
+
"date-fns": "^4.4.0",
|
|
28
28
|
"lodash": "4.18.1",
|
|
29
29
|
"mathjs": "^15.2.0",
|
|
30
30
|
"pious-squid": "^2.3.0",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"winston": "3.19.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@babel/preset-env": "^7.29.
|
|
38
|
+
"@babel/preset-env": "^7.29.7",
|
|
39
39
|
"@eslint/js": "^10.0.1",
|
|
40
40
|
"@jest/globals": "^30.3.0",
|
|
41
41
|
"@sonar/scan": "^4.3.6",
|
|
42
42
|
"cross-env": "^10.1.0",
|
|
43
|
-
"eslint": "^10.
|
|
43
|
+
"eslint": "^10.4.1",
|
|
44
44
|
"eslint-plugin-jest": "^29.15.2",
|
|
45
45
|
"globals": "^17.5.0",
|
|
46
46
|
"jest": "^30.3.0",
|
package/src/udl.js
CHANGED
|
@@ -103,6 +103,80 @@ const udlToNpsGroundSite = (udlRow) => ({
|
|
|
103
103
|
createdAt: fixDate(_.get(udlRow, "createdAt")),
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
const udlToNpsConjunction = (udlRow) => {
|
|
107
|
+
const satno1 = udlRow.idOnOrbit1
|
|
108
|
+
? _.get(udlRow, "idOnOrbit1", null)
|
|
109
|
+
: _.get(udlRow, "satNo1", null);
|
|
110
|
+
const satno2 = udlRow.idOnOrbit2
|
|
111
|
+
? _.get(udlRow, "idOnOrbit2", null)
|
|
112
|
+
: _.get(udlRow, "satNo2", null);
|
|
113
|
+
|
|
114
|
+
return lowerCaseObjectKeys({
|
|
115
|
+
IdUdl: _.get(udlRow, "id", null),
|
|
116
|
+
ClassificationMarking: _.get(udlRow, "classificationMarking", null),
|
|
117
|
+
SatNo1: satno1,
|
|
118
|
+
SatNo2: satno2,
|
|
119
|
+
Type: _.get(udlRow, "type", null),
|
|
120
|
+
Tca: fixDate(_.get(udlRow, "tca", null)),
|
|
121
|
+
MissDistance: _.get(udlRow, "missDistance", null),
|
|
122
|
+
CollisionProb: _.get(udlRow, "collisionProb", null),
|
|
123
|
+
CollisionProbMethod: _.get(udlRow, "collisionProbMethod", null),
|
|
124
|
+
IdStateVector1: _.get(udlRow, "idStateVector1", null),
|
|
125
|
+
IdStateVector2: _.get(udlRow, "idStateVector2", null),
|
|
126
|
+
IdElset1: _.get(udlRow, "idElset1", null),
|
|
127
|
+
IdElset2: _.get(udlRow, "idElset2", null),
|
|
128
|
+
EphemName1: _.get(udlRow, "ephemName1", null),
|
|
129
|
+
IdEphemerisSet1: _.get(udlRow, "idEphemerisSet1", null),
|
|
130
|
+
EphemName2: _.get(udlRow, "ephemName2", null),
|
|
131
|
+
IdEphemerisSet2: _.get(udlRow, "idEphemerisSet2", null),
|
|
132
|
+
RelPosR: _.get(udlRow, "relPosR", null),
|
|
133
|
+
RelPosT: _.get(udlRow, "relPosT", null),
|
|
134
|
+
RelPosN: _.get(udlRow, "relPosN", null),
|
|
135
|
+
RelVelMag: _.get(udlRow, "relVelMag", null),
|
|
136
|
+
RelVelR: _.get(udlRow, "relVelR", null),
|
|
137
|
+
RelVelT: _.get(udlRow, "relVelT", null),
|
|
138
|
+
RelVelN: _.get(udlRow, "relVelN", null),
|
|
139
|
+
HardBodyRadius: _.get(udlRow, "hardBodyRadius", null),
|
|
140
|
+
HardBodyRadiusShape: _.get(udlRow, "hardBodyRadiusShape", null),
|
|
141
|
+
PocDilution: _.get(udlRow, "pocDilution", null),
|
|
142
|
+
ScreenEntryTime: fixDate(_.get(udlRow, "screenEntryTime", null)),
|
|
143
|
+
ScreenExitTime: fixDate(_.get(udlRow, "screenExitTime", null)),
|
|
144
|
+
ScreenVolumeX: _.get(udlRow, "screenVolumeX", null),
|
|
145
|
+
ScreenVolumeY: _.get(udlRow, "screenVolumeY", null),
|
|
146
|
+
ScreenVolumeZ: _.get(udlRow, "screenVolumeZ", null),
|
|
147
|
+
VolShape: _.get(udlRow, "volShape", null),
|
|
148
|
+
VolEntryTime: fixDate(_.get(udlRow, "volEntryTime", null)),
|
|
149
|
+
VolExitTime: fixDate(_.get(udlRow, "volExitTime", null)),
|
|
150
|
+
PenetrationLevelSigma: _.get(udlRow, "penetrationLevelSigma", null),
|
|
151
|
+
CdAoM1: _.get(udlRow, "cdAoM1", null),
|
|
152
|
+
CrAoM1: _.get(udlRow, "crAoM1", null),
|
|
153
|
+
ThrustAccel1: _.get(udlRow, "thrustAccel1", null),
|
|
154
|
+
CdAoM2: _.get(udlRow, "cdAoM2", null),
|
|
155
|
+
CrAoM2: _.get(udlRow, "crAoM2", null),
|
|
156
|
+
ThrustAccel2: _.get(udlRow, "thrustAccel2", null),
|
|
157
|
+
Comments: _.get(udlRow, "comments", null),
|
|
158
|
+
Ccir: _.get(udlRow, "ccir", null),
|
|
159
|
+
ConcernNotes: _.get(udlRow, "concernNotes", null),
|
|
160
|
+
StateDeptNotified: _.get(udlRow, "stateDeptNotified", null),
|
|
161
|
+
OwnerContacted: _.get(udlRow, "ownerContacted", null),
|
|
162
|
+
MessageFor: _.get(udlRow, "messageFor", null),
|
|
163
|
+
MessageId: _.get(udlRow, "messageId", null),
|
|
164
|
+
UvwWarn: _.get(udlRow, "uvwWarn", null),
|
|
165
|
+
SmallRelVelWarning: _.get(udlRow, "smallRelVelWarning", null),
|
|
166
|
+
LargeRelPosWarning: _.get(udlRow, "largeRelPosWarning", null),
|
|
167
|
+
SmallCovWarning: _.get(udlRow, "smallCovWarning", null),
|
|
168
|
+
LargeCovWarning: _.get(udlRow, "largeCovWarning", null),
|
|
169
|
+
Source: _.get(udlRow, "source", null),
|
|
170
|
+
Origin: _.get(udlRow, "origin", null),
|
|
171
|
+
EventId: _.get(udlRow, "eventId", null),
|
|
172
|
+
Descriptor: _.get(udlRow, "descriptor", null),
|
|
173
|
+
DataMode: _.get(udlRow, "dataMode", null),
|
|
174
|
+
CreatedAt: fixDate(_.get(udlRow, "createdAt", null)),
|
|
175
|
+
CreatedBy: _.get(udlRow, "createdBy", null),
|
|
176
|
+
OrigNetwork: _.get(udlRow, "origNetwork", null),
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
|
|
106
180
|
/**
|
|
107
181
|
* Formats the response data based on the topic
|
|
108
182
|
*
|
|
@@ -233,4 +307,4 @@ const enrichUdlFields = (npsOb) => {
|
|
|
233
307
|
return npsOb;
|
|
234
308
|
};
|
|
235
309
|
|
|
236
|
-
export {udlToNpsElset, udlToNpsGroundSite, enrichUdlFields};
|
|
310
|
+
export {udlToNpsElset, udlToNpsGroundSite, udlToNpsConjunction, enrichUdlFields};
|
|
@@ -97,7 +97,9 @@ const getLeoRpoDataBulk = async (line1, line2, sats, startTime, endTime, include
|
|
|
97
97
|
* @param {Number} [lonTime] datetime to analyze longitude and lon drift at, Unix ms
|
|
98
98
|
* @return {Promise<Array<Object>>}
|
|
99
99
|
*/
|
|
100
|
-
const getGeoRpoDataBulk = async (
|
|
100
|
+
const getGeoRpoDataBulk = async (
|
|
101
|
+
line1, line2, sats, startTime, endTime, lonTime, includeRIC=false,
|
|
102
|
+
) => {
|
|
101
103
|
const results = [];
|
|
102
104
|
const start = new Date(startTime).getTime();
|
|
103
105
|
const end = new Date(endTime).getTime();
|