ootk 2.0.1 → 3.0.0
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/.eslintrc.json +4 -4
- package/.prettierrc +17 -0
- package/babel.config.js +16 -0
- package/dist/objects/detailed-sat.d.ts +3 -3
- package/dist/objects/sat.d.ts +4 -4
- package/dist/objects/sensor.d.ts +8 -2
- package/dist/objects/star.d.ts +8 -8
- package/dist/ootk.d.ts +0 -1
- package/dist/ootk.js +1 -1
- package/dist/sgp4/sgp4.d.ts +9 -9
- package/dist/tle/tle.d.ts +25 -24
- package/dist/transforms/transforms.d.ts +40 -1
- package/dist/types/types.d.ts +417 -92
- package/dist/utils/moon-math.d.ts +18 -18
- package/dist/utils/sun-math.d.ts +118 -118
- package/dist/utils/utils.d.ts +6 -6
- package/jest.config.ts +30 -0
- package/lib/objects/base-object.js +33 -63
- package/lib/objects/base-object.js.map +1 -1
- package/lib/objects/detailed-sat.d.ts +3 -3
- package/lib/objects/detailed-sat.js.map +1 -1
- package/lib/objects/sat.d.ts +4 -4
- package/lib/objects/sat.js +1 -1
- package/lib/objects/sat.js.map +1 -1
- package/lib/objects/sensor.d.ts +8 -2
- package/lib/objects/sensor.js +51 -33
- package/lib/objects/sensor.js.map +1 -1
- package/lib/objects/space-object.js.map +1 -1
- package/lib/objects/star.d.ts +8 -8
- package/lib/objects/star.js +4 -4
- package/lib/objects/star.js.map +1 -1
- package/lib/ootk.d.ts +0 -1
- package/lib/ootk.js +0 -1
- package/lib/ootk.js.map +1 -1
- package/lib/sgp4/sgp4.d.ts +9 -9
- package/lib/sgp4/sgp4.js +15 -27
- package/lib/sgp4/sgp4.js.map +1 -1
- package/lib/tle/tle.d.ts +25 -24
- package/lib/tle/tle.js +4 -4
- package/lib/tle/tle.js.map +1 -1
- package/lib/transforms/transforms.d.ts +40 -1
- package/lib/transforms/transforms.js +100 -1
- package/lib/transforms/transforms.js.map +1 -1
- package/lib/types/types.d.ts +417 -92
- package/lib/types/types.js +3 -1
- package/lib/types/types.js.map +1 -1
- package/lib/utils/moon-math.d.ts +18 -18
- package/lib/utils/moon-math.js +45 -45
- package/lib/utils/moon-math.js.map +1 -1
- package/lib/utils/sun-math.d.ts +118 -118
- package/lib/utils/sun-math.js +237 -237
- package/lib/utils/sun-math.js.map +1 -1
- package/lib/utils/utils.d.ts +6 -6
- package/lib/utils/utils.js +17 -15
- package/lib/utils/utils.js.map +1 -1
- package/package.json +19 -35
- package/tsconfig.base.json +31 -0
- package/tsconfig.build.json +14 -0
- package/dist/sgp4/Sgp4Assembly.d.ts +0 -5
- package/lib/sgp4/Sgp4Assembly.d.ts +0 -5
- package/lib/sgp4/Sgp4Assembly.js +0 -75
- package/lib/sgp4/Sgp4Assembly.js.map +0 -1
package/lib/types/types.d.ts
CHANGED
|
@@ -1,39 +1,224 @@
|
|
|
1
|
+
import { Sensor } from '@src/objects';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a distinct type.
|
|
4
|
+
*
|
|
5
|
+
* This type is used to create new types based on existing ones, but with a unique identifier.
|
|
6
|
+
* This can be useful for creating types that are semantically different but structurally the same.
|
|
7
|
+
*
|
|
8
|
+
* @template T The base type from which the distinct type is created.
|
|
9
|
+
* @template DistinctName A unique identifier for the distinct type.
|
|
10
|
+
*
|
|
11
|
+
* @property __TYPE__ A property that holds the unique identifier for the distinct type.
|
|
12
|
+
*/
|
|
1
13
|
type Distinct<T, DistinctName> = T & {
|
|
2
14
|
__TYPE__: DistinctName;
|
|
3
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Represents a quantity of hours.
|
|
18
|
+
*
|
|
19
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
20
|
+
* with other number-based types.
|
|
21
|
+
*/
|
|
4
22
|
export type Hours = Distinct<number, 'Hours'>;
|
|
23
|
+
/**
|
|
24
|
+
* Represents a quantity of minutes.
|
|
25
|
+
*
|
|
26
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
27
|
+
* with other number-based types.
|
|
28
|
+
*/
|
|
5
29
|
export type Minutes = Distinct<number, 'Minutes'>;
|
|
30
|
+
/**
|
|
31
|
+
* Represents a quantity of seconds.
|
|
32
|
+
*
|
|
33
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
34
|
+
* with other number-based types.
|
|
35
|
+
*/
|
|
6
36
|
export type Seconds = Distinct<number, 'Seconds'>;
|
|
37
|
+
/**
|
|
38
|
+
* Represents a quantity of milliseconds.
|
|
39
|
+
*
|
|
40
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
41
|
+
* with other number-based types.
|
|
42
|
+
*/
|
|
7
43
|
export type Milliseconds = Distinct<number, 'Milliseconds'>;
|
|
44
|
+
/**
|
|
45
|
+
* Represents a quantity of degrees.
|
|
46
|
+
*
|
|
47
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
48
|
+
* with other number-based types.
|
|
49
|
+
*/
|
|
8
50
|
export type Degrees = Distinct<number, 'Degrees'>;
|
|
51
|
+
/**
|
|
52
|
+
* Represents a quantity of radians.
|
|
53
|
+
*
|
|
54
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
55
|
+
* with other number-based types.
|
|
56
|
+
*/
|
|
9
57
|
export type Radians = Distinct<number, 'Radians'>;
|
|
58
|
+
/**
|
|
59
|
+
* Represents a quantity of kilometers.
|
|
60
|
+
*
|
|
61
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
62
|
+
* with other number-based types.
|
|
63
|
+
*/
|
|
10
64
|
export type Kilometers = Distinct<number, 'Kilometers'>;
|
|
65
|
+
/**
|
|
66
|
+
* Represents a quantity of meters.
|
|
67
|
+
*
|
|
68
|
+
* This type is based on the number type, but is distinct and cannot be used interchangeably
|
|
69
|
+
* with other number-based types.
|
|
70
|
+
*/
|
|
11
71
|
export type Meters = Distinct<number, 'Meters'>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Represents a three-dimensional vector.
|
|
74
|
+
*
|
|
75
|
+
* This type is used to represent a point in space in terms of x, y, and z coordinates.
|
|
76
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
77
|
+
* The default unit of measure is Kilometers.
|
|
78
|
+
*
|
|
79
|
+
* @template Units The unit of measure used for the dimensions.
|
|
80
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
81
|
+
*
|
|
82
|
+
* @property x The x dimension of the vector, representing the distance from the origin to
|
|
83
|
+
* the point in the x direction.
|
|
84
|
+
* @property y The y dimension of the vector, representing the distance from the origin to
|
|
85
|
+
* the point in the y direction.
|
|
86
|
+
* @property z The z dimension of the vector, representing the distance from the origin to
|
|
87
|
+
* the point in the z direction.
|
|
88
|
+
*/
|
|
89
|
+
export type Vec3<Units = Kilometers> = {
|
|
90
|
+
x: Units;
|
|
91
|
+
y: Units;
|
|
92
|
+
z: Units;
|
|
22
93
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Represents a three-dimensional vector in Earth-Centered Inertial (ECI) coordinates.
|
|
96
|
+
*
|
|
97
|
+
* This type is used to represent a point in space in terms of x, y, and z coordinates.
|
|
98
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
99
|
+
* The default unit of measure is Kilometers.
|
|
100
|
+
*
|
|
101
|
+
* @property x The x dimension of the vector, representing the distance from the origin to
|
|
102
|
+
* the point in the x direction.
|
|
103
|
+
* @property y The y dimension of the vector, representing the distance from the origin to
|
|
104
|
+
* the point in the y direction.
|
|
105
|
+
* @property z The z dimension of the vector, representing the distance from the origin to
|
|
106
|
+
* the point in the z direction.
|
|
107
|
+
*/
|
|
108
|
+
export type EciVec3<Units = Kilometers> = Vec3<Units>;
|
|
109
|
+
/**
|
|
110
|
+
* Represents a three-dimensional vector in Earth-Centered Fixed (ECF) coordinates.
|
|
111
|
+
*
|
|
112
|
+
* NOTE: ECF (Earth-Centered Fixed) and ECEF (Earth-Centered, Earth-Fixed) are essentially
|
|
113
|
+
* the same thing. Both refer to a coordinate system that is fixed with respect to the Earth,
|
|
114
|
+
* meaning that the coordinates of a point in this system do not change even as the Earth rotates.
|
|
115
|
+
*
|
|
116
|
+
* The difference between the two is that ECF is a Cartesian coordinate system, while ECEF is a
|
|
117
|
+
* spherical coordinate system. The ECF system is used in this library because it is easier to
|
|
118
|
+
* work with in the context of the SGP4 algorithm.
|
|
119
|
+
*
|
|
120
|
+
* This type is used to represent a point in space in terms of x, y, and z coordinates.
|
|
121
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
122
|
+
* The default unit of measure is Kilometers.
|
|
123
|
+
*
|
|
124
|
+
* @property x The x dimension of the vector, representing the distance from the origin to
|
|
125
|
+
* the point in the x direction.
|
|
126
|
+
* @property y The y dimension of the vector, representing the distance from the origin to
|
|
127
|
+
* the point in the y direction.
|
|
128
|
+
* @property z The z dimension of the vector, representing the distance from the origin to
|
|
129
|
+
* the point in the z direction.
|
|
130
|
+
*/
|
|
131
|
+
export type EcfVec3<Units = Kilometers> = Vec3<Units>;
|
|
132
|
+
/**
|
|
133
|
+
* Represents a three-dimensional vector in Earth-Centered Earth-Fixed (ECEF) coordinates.
|
|
134
|
+
*/
|
|
135
|
+
export type EcefVec3<Units = Kilometers> = EcfVec3<Units>;
|
|
136
|
+
/**
|
|
137
|
+
* Represents a three-dimensional vector in East, North, Up (ENU) coordinates.
|
|
138
|
+
*
|
|
139
|
+
* East–west tangent to parallels, North–south tangent to meridians, and
|
|
140
|
+
* Up–down in the direction normal to the oblate spheroid used as Earth's ellipsoid,
|
|
141
|
+
* which does not generally pass through the center of Earth.
|
|
142
|
+
*
|
|
143
|
+
* In many targeting and tracking applications the local East, North, Up (ENU)
|
|
144
|
+
* Cartesian coordinate system is far more intuitive and practical than ECEF or
|
|
145
|
+
* Geodetic coordinates. The local ENU coordinates are formed from a plane tangent
|
|
146
|
+
* to the Earth's surface fixed to a specific location and hence it is sometimes
|
|
147
|
+
* known as a "Local Tangent" or "local geodetic" plane. By convention the east axis
|
|
148
|
+
* is labeled x, the north y, and the up z.
|
|
149
|
+
*
|
|
150
|
+
* @see https://en.wikipedia.org/wiki/Local_tangent_plane_coordinates
|
|
151
|
+
*
|
|
152
|
+
* @template Units The unit of measure used for the dimensions.
|
|
153
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
154
|
+
*
|
|
155
|
+
* @property e The east dimension of the vector, representing the distance from the origin to
|
|
156
|
+
* the point in the east direction.
|
|
157
|
+
* @property n The north dimension of the vector, representing the distance from the origin to
|
|
158
|
+
* the point in the north direction.
|
|
159
|
+
* @property u The up dimension of the vector, representing the distance from the origin to
|
|
160
|
+
* the point in the upward direction.
|
|
161
|
+
*/
|
|
162
|
+
export type EnuVec3<Units = Kilometers> = Vec3<Units>;
|
|
163
|
+
/**
|
|
164
|
+
* Represents a three-dimensional vector in geographical coordinates.
|
|
165
|
+
*
|
|
166
|
+
* This type is used to represent a point in space in terms of latitude, longitude, and altitude.
|
|
167
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
168
|
+
*
|
|
169
|
+
* @template AngleUnit The unit of measure used for the latitude and longitude dimensions.
|
|
170
|
+
* This is typically a type representing an angle, such as degrees or radians. The default is Radians.
|
|
171
|
+
*
|
|
172
|
+
* @template DistanceUnit The unit of measure used for the altitude dimension.
|
|
173
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
174
|
+
*/
|
|
175
|
+
export type LlaVec3<AngleUnit = Radians, DistanceUnit = Kilometers> = {
|
|
176
|
+
lat: AngleUnit;
|
|
177
|
+
lon: AngleUnit;
|
|
178
|
+
alt: DistanceUnit;
|
|
27
179
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Represents a three-dimensional vector in Range, Azimuth, and Elevation (RAE) coordinates.
|
|
182
|
+
*
|
|
183
|
+
* This type is used to represent a point in space in terms of range, azimuth, and elevation.
|
|
184
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
185
|
+
*
|
|
186
|
+
* @template DistanceUnit The unit of measure used for the altitude dimension.
|
|
187
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
188
|
+
*
|
|
189
|
+
* @template AngleUnit The unit of measure used for the latitude and longitude dimensions.
|
|
190
|
+
* This is typically a type representing an angle, such as degrees or radians. The default is Radians.
|
|
191
|
+
*
|
|
192
|
+
* @property rng The range dimension of the vector, representing the distance from the origin to the point.
|
|
193
|
+
* @property az The azimuth dimension of the vector, representing the angle in the horizontal plane from a
|
|
194
|
+
* reference direction.
|
|
195
|
+
* @property el The elevation dimension of the vector, representing the angle from the horizontal plane to the point.
|
|
196
|
+
*/
|
|
197
|
+
export type RaeVec3<DistanceUnit = Kilometers, AngleUnit = Radians> = {
|
|
198
|
+
rng: DistanceUnit;
|
|
199
|
+
az: AngleUnit;
|
|
200
|
+
el: AngleUnit;
|
|
32
201
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Represents a three-dimensional vector in South, East, and Zenith (SEZ) coordinates.
|
|
204
|
+
*
|
|
205
|
+
* This type is used to represent a point in space in terms of south, east, and zenith.
|
|
206
|
+
* It is a generic type that allows for flexibility in the units of measure used for each dimension.
|
|
207
|
+
*
|
|
208
|
+
* @template Units The unit of measure used for the dimensions.
|
|
209
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
210
|
+
*
|
|
211
|
+
* @property s The south dimension of the vector, representing the distance from the origin to
|
|
212
|
+
* the point in the south direction.
|
|
213
|
+
* @property e The east dimension of the vector, representing the distance from the origin to
|
|
214
|
+
* the point in the east direction.
|
|
215
|
+
* @property z The zenith dimension of the vector, representing the distance from the origin to
|
|
216
|
+
* the point in the upward direction.
|
|
217
|
+
*/
|
|
218
|
+
export type SezVec3<Units = Kilometers> = {
|
|
219
|
+
s: Units;
|
|
220
|
+
e: Units;
|
|
221
|
+
z: Units;
|
|
37
222
|
};
|
|
38
223
|
/**
|
|
39
224
|
* @interface SatelliteRecord contains all of the orbital parameters necessary for running SGP4.
|
|
@@ -41,12 +226,15 @@ export type SezVec3 = {
|
|
|
41
226
|
*
|
|
42
227
|
*/
|
|
43
228
|
export interface SatelliteRecord {
|
|
229
|
+
Om: number;
|
|
230
|
+
PInco: number;
|
|
44
231
|
a: number;
|
|
45
|
-
am: number;
|
|
46
232
|
alta: number;
|
|
47
233
|
altp: number;
|
|
234
|
+
am: number;
|
|
48
235
|
argpdot: number;
|
|
49
236
|
argpo: number;
|
|
237
|
+
atime: number;
|
|
50
238
|
aycof: number;
|
|
51
239
|
bstar: number;
|
|
52
240
|
cc1: number;
|
|
@@ -54,15 +242,30 @@ export interface SatelliteRecord {
|
|
|
54
242
|
cc5: number;
|
|
55
243
|
con41: number;
|
|
56
244
|
d2: number;
|
|
245
|
+
d2201: number;
|
|
246
|
+
d2211: number;
|
|
57
247
|
d3: number;
|
|
248
|
+
d3210: number;
|
|
249
|
+
d3222: number;
|
|
58
250
|
d4: number;
|
|
251
|
+
d4410: number;
|
|
252
|
+
d4422: number;
|
|
253
|
+
d5220: number;
|
|
59
254
|
d5232: number;
|
|
60
255
|
d5421: number;
|
|
61
256
|
d5433: number;
|
|
62
257
|
dedt: number;
|
|
63
|
-
delmo: number;
|
|
64
258
|
del1: number;
|
|
259
|
+
del2: number;
|
|
260
|
+
del3: number;
|
|
261
|
+
delmo: number;
|
|
262
|
+
didt: number;
|
|
263
|
+
dmdt: number;
|
|
264
|
+
dnodt: number;
|
|
265
|
+
domdt: number;
|
|
266
|
+
e3: number;
|
|
65
267
|
ecco: number;
|
|
268
|
+
ee2: number;
|
|
66
269
|
em: number;
|
|
67
270
|
epochdays: number;
|
|
68
271
|
epochyr: number;
|
|
@@ -72,56 +275,34 @@ export interface SatelliteRecord {
|
|
|
72
275
|
im: number;
|
|
73
276
|
inclo: number;
|
|
74
277
|
init: string;
|
|
278
|
+
irez: number;
|
|
75
279
|
isimp: number;
|
|
280
|
+
j2: number;
|
|
281
|
+
j3: number;
|
|
282
|
+
j3oj2: number;
|
|
283
|
+
j4: number;
|
|
76
284
|
jdsatepoch: number;
|
|
77
285
|
mdot: number;
|
|
78
286
|
method: string;
|
|
79
|
-
mo: number;
|
|
80
287
|
mm: number;
|
|
288
|
+
mo: number;
|
|
289
|
+
mus: number;
|
|
81
290
|
nddot: number;
|
|
82
291
|
ndot: number;
|
|
292
|
+
nm: number;
|
|
83
293
|
no: number;
|
|
84
294
|
nodecf: number;
|
|
85
295
|
nodedot: number;
|
|
86
296
|
nodeo: number;
|
|
87
297
|
om: number;
|
|
88
|
-
Om: number;
|
|
89
298
|
omgcof: number;
|
|
90
299
|
operationmode: string;
|
|
91
|
-
satnum: string;
|
|
92
|
-
sinmao: number;
|
|
93
|
-
t: number;
|
|
94
|
-
t2cof: number;
|
|
95
|
-
t3cof: number;
|
|
96
|
-
t4cof: number;
|
|
97
|
-
t5cof: number;
|
|
98
|
-
x1mth2: number;
|
|
99
|
-
x7thm1: number;
|
|
100
|
-
xlcof: number;
|
|
101
|
-
xmcof: number;
|
|
102
|
-
xfact: number;
|
|
103
|
-
xlamo: number;
|
|
104
|
-
xli: number;
|
|
105
|
-
xgh4: number;
|
|
106
|
-
xgh3: number;
|
|
107
|
-
xh2: number;
|
|
108
|
-
xi2: number;
|
|
109
|
-
xi3: number;
|
|
110
|
-
xl2: number;
|
|
111
|
-
xl3: number;
|
|
112
|
-
xl4: number;
|
|
113
|
-
zmol: number;
|
|
114
|
-
zmos: number;
|
|
115
|
-
dmdt: number;
|
|
116
|
-
dnodt: number;
|
|
117
|
-
domdt: number;
|
|
118
|
-
e3: number;
|
|
119
|
-
ee2: number;
|
|
120
300
|
peo: number;
|
|
121
301
|
pgho: number;
|
|
122
302
|
pho: number;
|
|
123
|
-
PInco: number;
|
|
124
303
|
plo: number;
|
|
304
|
+
radiusearthkm: number;
|
|
305
|
+
satnum: string;
|
|
125
306
|
se2: number;
|
|
126
307
|
se3: number;
|
|
127
308
|
sgh2: number;
|
|
@@ -131,35 +312,48 @@ export interface SatelliteRecord {
|
|
|
131
312
|
sh3: number;
|
|
132
313
|
si2: number;
|
|
133
314
|
si3: number;
|
|
315
|
+
sinmao: number;
|
|
134
316
|
sl2: number;
|
|
135
317
|
sl3: number;
|
|
136
318
|
sl4: number;
|
|
319
|
+
t: number;
|
|
320
|
+
t2cof: number;
|
|
321
|
+
t3cof: number;
|
|
322
|
+
t4cof: number;
|
|
323
|
+
t5cof: number;
|
|
324
|
+
tumin: number;
|
|
325
|
+
x1mth2: number;
|
|
326
|
+
x7thm1: number;
|
|
327
|
+
xfact: number;
|
|
137
328
|
xgh2: number;
|
|
329
|
+
xgh3: number;
|
|
330
|
+
xgh4: number;
|
|
331
|
+
xh2: number;
|
|
138
332
|
xh3: number;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
irez: number;
|
|
142
|
-
d3210: number;
|
|
143
|
-
d3222: number;
|
|
144
|
-
d4410: number;
|
|
145
|
-
d4422: number;
|
|
146
|
-
d5220: number;
|
|
147
|
-
del2: number;
|
|
148
|
-
del3: number;
|
|
149
|
-
didt: number;
|
|
150
|
-
atime: number;
|
|
151
|
-
j2: number;
|
|
152
|
-
j3: number;
|
|
153
|
-
j4: number;
|
|
154
|
-
mus: number;
|
|
333
|
+
xi2: number;
|
|
334
|
+
xi3: number;
|
|
155
335
|
xke: number;
|
|
156
|
-
|
|
336
|
+
xl2: number;
|
|
337
|
+
xl3: number;
|
|
338
|
+
xl4: number;
|
|
339
|
+
xlamo: number;
|
|
340
|
+
xlcof: number;
|
|
341
|
+
xli: number;
|
|
342
|
+
xmcof: number;
|
|
157
343
|
xni: number;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
nm: number;
|
|
344
|
+
zmol: number;
|
|
345
|
+
zmos: number;
|
|
161
346
|
}
|
|
162
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* The StateVector is a type that represents the output from the Sgp4.propagate function.
|
|
349
|
+
* It consists of two main properties: position and velocity, each of which is a three-dimensional vector.
|
|
350
|
+
*
|
|
351
|
+
* The position and velocity vectors are represented as objects with x, y, and z properties,
|
|
352
|
+
* each of which is a number. Alternatively, they can be a boolean value.
|
|
353
|
+
*
|
|
354
|
+
* This type is primarily used in the context of satellite tracking and prediction,
|
|
355
|
+
* where it is crucial to know both the current position and velocity of a satellite.
|
|
356
|
+
*/
|
|
163
357
|
export type StateVector = {
|
|
164
358
|
position: {
|
|
165
359
|
x: number;
|
|
@@ -172,12 +366,88 @@ export type StateVector = {
|
|
|
172
366
|
z: number;
|
|
173
367
|
} | boolean;
|
|
174
368
|
};
|
|
175
|
-
/**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
369
|
+
/**
|
|
370
|
+
* The RUV coordinate system is a spherical coordinate system with the origin
|
|
371
|
+
* at the radar. The RUV coordinate system is defined with respect to the
|
|
372
|
+
* radar boresight. The R-axis points outward along the boresight with
|
|
373
|
+
* the origin at the radar. The U-axis is in the horizontal plane and
|
|
374
|
+
* points to the right of the boresight. The V-axis is in the vertical
|
|
375
|
+
* plane and points down from the boresight.
|
|
376
|
+
*
|
|
377
|
+
* @template DistanceUnit The unit of measure used for the altitude dimension.
|
|
378
|
+
* This is typically a type representing a distance, such as kilometers or meters. The default is Kilometers.
|
|
379
|
+
*
|
|
380
|
+
* * @template AngleUnit The unit of measure used for the latitude and longitude dimensions.
|
|
381
|
+
* This is typically a type representing an angle, such as degrees or radians. The default is Radians.
|
|
382
|
+
*/
|
|
383
|
+
export type RuvVec3<DistanceUnit = Kilometers, AngleUnit = Radians> = {
|
|
384
|
+
rng: DistanceUnit;
|
|
385
|
+
u: AngleUnit;
|
|
386
|
+
v: AngleUnit;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Phased Array Radar Face Cartesian Coordinates
|
|
390
|
+
* The cartesian coordinates (XRF, YRF ZRF) are defined with respect to the
|
|
391
|
+
* phased array radar face. The radar face lies in the XRF-YRF plane, with
|
|
392
|
+
* the XRF-axis horizontal and the YRF-axis pointing upward.
|
|
393
|
+
* The ZRF-axis points outward along the normal to the array face.
|
|
394
|
+
*
|
|
395
|
+
* The orientation of the phased array face is defined by the azimuth and
|
|
396
|
+
* the elevation of the phased array boresight (i.e., the phased array Z-axis).
|
|
397
|
+
*/
|
|
398
|
+
export type RfVec3<Units = Kilometers> = Vec3<Units>;
|
|
399
|
+
/**
|
|
400
|
+
* A type that represents a three-dimensional vector in a flat array format.
|
|
401
|
+
* This type is used in vector mathematics and physics calculations.
|
|
402
|
+
*
|
|
403
|
+
* It is an array of three numbers, where each number represents a coordinate in 3D space:
|
|
404
|
+
* - The first number represents the x-coordinate.
|
|
405
|
+
* - The second number represents the y-coordinate.
|
|
406
|
+
* - The third number represents the z-coordinate.
|
|
407
|
+
*
|
|
408
|
+
* This format is particularly useful in scenarios where you need to perform operations on vectors,
|
|
409
|
+
* such as addition, subtraction, scalar multiplication, dot product, and cross product.
|
|
410
|
+
*/
|
|
411
|
+
export type Vec3Flat<T = number> = [T, T, T];
|
|
412
|
+
/**
|
|
413
|
+
* A type that represents a two-line element set (TLE).
|
|
414
|
+
* A TLE is a data format used to convey sets of orbital elements that describe the orbits of Earth-orbiting objects.
|
|
415
|
+
* It consists of two lines of text, each of which is 69 characters long.
|
|
416
|
+
* @see https://en.wikipedia.org/wiki/Two-line_element_set
|
|
417
|
+
*/
|
|
418
|
+
export type TleLine1 = Distinct<string, 'TLE Line 1'>;
|
|
419
|
+
/**
|
|
420
|
+
* A type that represents a two-line element set (TLE).
|
|
421
|
+
* A TLE is a data format used to convey sets of orbital elements that describe the orbits of Earth-orbiting objects.
|
|
422
|
+
* It consists of two lines of text, each of which is 69 characters long.
|
|
423
|
+
* @see https://en.wikipedia.org/wiki/Two-line_element_set
|
|
424
|
+
*/
|
|
425
|
+
export type TleLine2 = Distinct<string, 'TLE Line 2'>;
|
|
426
|
+
/**
|
|
427
|
+
* The Line1Data type represents the first line of a two-line element set (TLE).
|
|
428
|
+
* A TLE is a data format used to convey sets of orbital elements that describe the orbits of Earth-orbiting objects.
|
|
429
|
+
*
|
|
430
|
+
* The properties of this type include:
|
|
431
|
+
* - lineNumber1: The line number of the TLE (should be 1 for this line).
|
|
432
|
+
* - satNum: The satellite number.
|
|
433
|
+
* - satNumRaw: The raw string representation of the satellite number.
|
|
434
|
+
* - classification: The classification of the satellite (e.g., "U" for unclassified).
|
|
435
|
+
* - intlDes: The international designator for the satellite.
|
|
436
|
+
* - intlDesYear: The year of the international designator.
|
|
437
|
+
* - intlDesLaunchNum: The launch number of the international designator.
|
|
438
|
+
* - intlDesLaunchPiece: The piece of the launch of the international designator.
|
|
439
|
+
* - epochYear: The last two digits of the year of the epoch.
|
|
440
|
+
* - epochYearFull: The full four-digit year of the epoch.
|
|
441
|
+
* - epochDay: The day of the year of the epoch.
|
|
442
|
+
* - meanMoDev1: The first derivative of the Mean Motion.
|
|
443
|
+
* - meanMoDev2: The second derivative of the Mean Motion.
|
|
444
|
+
* - bstar: The BSTAR drag term.
|
|
445
|
+
* - ephemerisType: The type of ephemeris used.
|
|
446
|
+
* - elsetNum: The element set number.
|
|
447
|
+
* - checksum1: The checksum of the first line of the TLE.
|
|
448
|
+
*
|
|
449
|
+
* @see https://en.wikipedia.org/wiki/Two-line_element_set
|
|
450
|
+
*/
|
|
181
451
|
export type Line1Data = {
|
|
182
452
|
lineNumber1: number;
|
|
183
453
|
satNum: number;
|
|
@@ -197,6 +467,25 @@ export type Line1Data = {
|
|
|
197
467
|
elsetNum: number;
|
|
198
468
|
checksum1: number;
|
|
199
469
|
};
|
|
470
|
+
/**
|
|
471
|
+
* The Line2Data type represents the second line of a two-line element set (TLE).
|
|
472
|
+
* A TLE is a data format used to convey sets of orbital elements that describe the orbits of Earth-orbiting objects.
|
|
473
|
+
*
|
|
474
|
+
* The properties of this type include:
|
|
475
|
+
* - lineNumber2: The line number of the TLE (should be 2 for this line).
|
|
476
|
+
* - satNum: The satellite number.
|
|
477
|
+
* - satNumRaw: The raw string representation of the satellite number.
|
|
478
|
+
* - inclination: The inclination of the satellite's orbit.
|
|
479
|
+
* - raan: The Right Ascension of the Ascending Node.
|
|
480
|
+
* - eccentricity: The eccentricity of the satellite's orbit.
|
|
481
|
+
* - argOfPerigee: The argument of perigee.
|
|
482
|
+
* - meanAnomaly: The mean anomaly of the satellite.
|
|
483
|
+
* - meanMotion: The mean motion of the satellite.
|
|
484
|
+
* - revNum: The revolution number at epoch.
|
|
485
|
+
* - checksum2: The checksum of the second line of the TLE.
|
|
486
|
+
*
|
|
487
|
+
* @see https://en.wikipedia.org/wiki/Two-line_element_set
|
|
488
|
+
*/
|
|
200
489
|
export type Line2Data = {
|
|
201
490
|
lineNumber2: number;
|
|
202
491
|
satNum: number;
|
|
@@ -210,6 +499,9 @@ export type Line2Data = {
|
|
|
210
499
|
revNum: number;
|
|
211
500
|
checksum2: number;
|
|
212
501
|
};
|
|
502
|
+
/**
|
|
503
|
+
* Enum representing different types of objects.
|
|
504
|
+
*/
|
|
213
505
|
export declare enum SpaceObjectType {
|
|
214
506
|
UNKNOWN = 0,
|
|
215
507
|
PAYLOAD = 1,
|
|
@@ -241,7 +533,48 @@ export declare enum SpaceObjectType {
|
|
|
241
533
|
LAUNCH_VEHICLE_MANUFACTURER = 27,
|
|
242
534
|
ENGINE_MANUFACTURER = 28
|
|
243
535
|
}
|
|
244
|
-
|
|
536
|
+
/**
|
|
537
|
+
* Represents the Greenwich Mean Sidereal Time (GMST).
|
|
538
|
+
*
|
|
539
|
+
* GMST is a time system that is a measure of the angle, on the celestial equator, from the
|
|
540
|
+
* Greenwich meridian to the meridian that passes through the vernal equinox.
|
|
541
|
+
*/
|
|
542
|
+
export type GreenwichMeanSiderealTime = Distinct<number, 'Greenwich Mean Sidereal Time'>;
|
|
543
|
+
/**
|
|
544
|
+
* Represents the azimuth and elevation of an object in the sky.
|
|
545
|
+
* Azimuth and elevation are the two coordinates that define the position of a
|
|
546
|
+
* celestial body (sun, moon, planet, star, etc.) in the sky as observed from a specific location
|
|
547
|
+
* on the Earth's surface.
|
|
548
|
+
*
|
|
549
|
+
* @template Units The units in which the azimuth and elevation are expressed. By default, this is radians.
|
|
550
|
+
*
|
|
551
|
+
* @property az The azimuth of the object. This is the angle between the observer's north vector and
|
|
552
|
+
* the perpendicular projection of the object onto the observer's local horizon.
|
|
553
|
+
* @property el The elevation of the object. This is the angle between the object and the observer's local horizon.
|
|
554
|
+
*/
|
|
555
|
+
export type AzEl<Units = Radians> = {
|
|
556
|
+
az: Units;
|
|
557
|
+
el: Units;
|
|
558
|
+
};
|
|
559
|
+
export interface RadarSensor extends Sensor {
|
|
560
|
+
coneHalfAngle: Radians;
|
|
561
|
+
boresight: {
|
|
562
|
+
az: Radians;
|
|
563
|
+
el: Radians;
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Represents the solar noon and nadir times.
|
|
568
|
+
*
|
|
569
|
+
* @property solarNoon The time at which the sun is at its highest point in the
|
|
570
|
+
* sky (directly above the observer's head). This is the midpoint of the day.
|
|
571
|
+
* @property nadir The time at which the sun is at its lowest point, directly below the observer.
|
|
572
|
+
* This is the midpoint of the night.
|
|
573
|
+
*/
|
|
574
|
+
export type SunTime = {
|
|
575
|
+
solarNoon: Date;
|
|
576
|
+
nadir: Date;
|
|
577
|
+
};
|
|
245
578
|
export type LaunchDetails = {
|
|
246
579
|
launchDate?: string;
|
|
247
580
|
launchMass?: string;
|
|
@@ -269,12 +602,4 @@ export type OperationsDetails = {
|
|
|
269
602
|
owner?: string;
|
|
270
603
|
country?: string;
|
|
271
604
|
};
|
|
272
|
-
export type AzEl = {
|
|
273
|
-
az: Radians;
|
|
274
|
-
el: Radians;
|
|
275
|
-
};
|
|
276
|
-
export type SunTime = {
|
|
277
|
-
solarNoon: Date;
|
|
278
|
-
nadir: Date;
|
|
279
|
-
};
|
|
280
605
|
export {};
|
package/lib/types/types.js
CHANGED
package/lib/types/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAmhBA;;GAEG;AACH,MAAM,CAAN,IAAY,eA8BX;AA9BD,WAAY,eAAe;IACzB,2DAAW,CAAA;IACX,2DAAW,CAAA;IACX,mEAAe,CAAA;IACf,yDAAU,CAAA;IACV,2DAAW,CAAA;IACX,+EAAqB,CAAA;IACrB,mEAAe,CAAA;IACf,qEAAgB,CAAA;IAChB,+EAAqB,CAAA;IACrB,qDAAQ,CAAA;IACR,0GAAmC,CAAA;IACnC,oGAAgC,CAAA;IAChC,wEAAkB,CAAA;IAClB,oJAAwD,CAAA;IACxD,sFAAyB,CAAA;IACzB,wEAAkB,CAAA;IAClB,oEAAgB,CAAA;IAChB,4EAAoB,CAAA;IACpB,4EAAoB,CAAA;IACpB,8EAAqB,CAAA;IACrB,wFAA0B,CAAA;IAC1B,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kFAAuB,CAAA;IACvB,8DAAa,CAAA;IACb,8FAA6B,CAAA;IAC7B,4DAAY,CAAA;IACZ,oGAAgC,CAAA;IAChC,oFAAwB,CAAA;AAC1B,CAAC,EA9BW,eAAe,KAAf,eAAe,QA8B1B"}
|