ootk 4.0.0-1 → 4.0.0-11
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/CHANGELOG.md +73 -1
- package/dist/enums/CatalogSource.d.ts +8 -0
- package/dist/enums/CatalogSource.js +10 -0
- package/dist/enums/CatalogSource.js.map +1 -0
- package/dist/enums/CommLink.d.ts +7 -0
- package/dist/enums/CommLink.js +9 -0
- package/dist/enums/CommLink.js.map +1 -0
- package/dist/enums/index.d.ts +2 -0
- package/dist/enums/index.js +3 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/force/EarthGravity.d.ts +26 -0
- package/dist/force/EarthGravity.js +26 -1
- package/dist/force/EarthGravity.js.map +1 -1
- package/dist/force/ForceModel.d.ts +8 -0
- package/dist/force/ForceModel.js +8 -0
- package/dist/force/ForceModel.js.map +1 -1
- package/dist/force/index.d.ts +1 -0
- package/dist/force/index.js +2 -0
- package/dist/force/index.js.map +1 -0
- package/dist/interfaces/RfSensorParams.d.ts +12 -6
- package/dist/interfaces/RfSensorParams.js +1 -1
- package/dist/main.d.ts +5 -2
- package/dist/main.js +5 -4
- package/dist/main.js.map +1 -1
- package/dist/objects/DetailedSatellite.d.ts +4 -2
- package/dist/objects/DetailedSatellite.js +23 -3
- package/dist/objects/DetailedSatellite.js.map +1 -1
- package/dist/objects/DetailedSensor.d.ts +13 -18
- package/dist/objects/DetailedSensor.js +20 -33
- package/dist/objects/DetailedSensor.js.map +1 -1
- package/dist/objects/RfSensor.d.ts +45 -11
- package/dist/objects/RfSensor.js +67 -19
- package/dist/objects/RfSensor.js.map +1 -1
- package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +4 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.js +4 -4
- package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -1
- package/dist/propagator/Sgp4Propagator.d.ts +42 -0
- package/dist/propagator/Sgp4Propagator.js +42 -2
- package/dist/propagator/Sgp4Propagator.js.map +1 -1
- package/dist/propagator/index.d.ts +3 -0
- package/dist/propagator/index.js +4 -0
- package/dist/propagator/index.js.map +1 -0
- package/dist/transforms/transforms.d.ts +5 -4
- package/dist/transforms/transforms.js +8 -6
- package/dist/transforms/transforms.js.map +1 -1
- package/dist/types/types.d.ts +6 -13
- package/dist/types/types.js.map +1 -1
- package/dist/utils/functions.d.ts +8 -0
- package/dist/utils/functions.js +18 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/jacobian.d.ts +1 -1
- package/dist/utils/jacobian.js +2 -2
- package/dist/utils/jacobian.js.map +1 -1
- package/package.json +2 -3
- package/src/enums/CatalogSource.ts +8 -0
- package/src/enums/CommLink.ts +7 -0
- package/src/enums/index.ts +2 -0
- package/src/force/EarthGravity.ts +26 -1
- package/src/force/ForceModel.ts +8 -0
- package/src/force/index.ts +1 -0
- package/src/interfaces/RfSensorParams.ts +12 -6
- package/src/main.ts +5 -4
- package/src/objects/DetailedSatellite.ts +31 -4
- package/src/objects/DetailedSensor.ts +24 -35
- package/src/objects/RfSensor.ts +72 -21
- package/src/orbit_determination/BatchLeastSquaresOD.ts +4 -4
- package/src/propagator/Sgp4Propagator.ts +42 -2
- package/src/propagator/index.ts +3 -0
- package/src/transforms/transforms.ts +9 -7
- package/src/types/types.ts +6 -13
- package/src/utils/functions.ts +21 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/jacobian.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Theodore Kruczek.
|
|
3
|
-
* @license
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
4
|
* @copyright (c) 2022-2024 Theodore Kruczek Permission is
|
|
5
5
|
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
6
|
* software and associated documentation files (the "Software"), to deal in the
|
|
@@ -20,22 +20,56 @@
|
|
|
20
20
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
* SOFTWARE.
|
|
22
22
|
*/
|
|
23
|
-
import { Degrees, Radians
|
|
23
|
+
import { Degrees, Radians } from 'ootk-core';
|
|
24
24
|
import { RfSensorParams } from '../main';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
boresightAz: Degrees;
|
|
28
|
-
boresightEl: Degrees;
|
|
25
|
+
import { DetailedSensor } from './DetailedSensor';
|
|
26
|
+
export declare class RfSensor extends DetailedSensor {
|
|
27
|
+
boresightAz: Degrees[];
|
|
28
|
+
boresightEl: Degrees[];
|
|
29
|
+
faces: number;
|
|
30
|
+
freqBand?: string;
|
|
31
|
+
beamwidth: Degrees;
|
|
29
32
|
constructor(info: RfSensorParams);
|
|
30
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Converts azimuth and elevation angles to unit vector coordinates.
|
|
35
|
+
* @param az - The azimuth angle in degrees.
|
|
36
|
+
* @param el - The elevation angle in degrees.
|
|
37
|
+
* @param face - The face number (optional).
|
|
38
|
+
* @returns The unit vector coordinates.
|
|
39
|
+
*/
|
|
40
|
+
uvFromAzEl(az: Degrees, el: Degrees, face?: number): {
|
|
31
41
|
u: number;
|
|
32
42
|
v: number;
|
|
33
43
|
};
|
|
34
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Converts the given UV coordinates to azimuth and elevation angles.
|
|
46
|
+
* @param u - The U coordinate.
|
|
47
|
+
* @param v - The V coordinate.
|
|
48
|
+
* @param face - The face number for multi-faced sensors. (optional)
|
|
49
|
+
* @returns An object containing the azimuth and elevation angles in degrees.
|
|
50
|
+
* @throws Error if face number is not specified for multi-faced sensors.
|
|
51
|
+
*/
|
|
52
|
+
azElFromUV(u: number, v: number, face?: number): {
|
|
35
53
|
az: Degrees;
|
|
36
54
|
el: Degrees;
|
|
37
55
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Converts the boresight azimuth angle to radians.
|
|
58
|
+
* @param face - The face number for multi-faced sensors. (Optional)
|
|
59
|
+
* @returns The boresight azimuth angle in radians.
|
|
60
|
+
* @throws An error if the face number is not specified for multi-faced sensors.
|
|
61
|
+
*/
|
|
62
|
+
boresightAzRad(face?: number): Radians;
|
|
63
|
+
/**
|
|
64
|
+
* Converts the boresight elevation angle of the sensor to radians.
|
|
65
|
+
* @param face - The face number of the sensor (optional for single-faced sensors).
|
|
66
|
+
* @returns The boresight elevation angle in radians.
|
|
67
|
+
* @throws Error if the face number is not specified for multi-faced sensors.
|
|
68
|
+
*/
|
|
69
|
+
boresightElRad(face?: number): Radians;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the beamwidth in radians.
|
|
72
|
+
* @returns The beamwidth in radians.
|
|
73
|
+
*/
|
|
74
|
+
get beamwidthRad(): Radians;
|
|
41
75
|
}
|
package/dist/objects/RfSensor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Theodore Kruczek.
|
|
3
|
-
* @license
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
4
|
* @copyright (c) 2022-2024 Theodore Kruczek Permission is
|
|
5
5
|
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
6
|
* software and associated documentation files (the "Software"), to deal in the
|
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
* SOFTWARE.
|
|
22
22
|
*/
|
|
23
|
-
import { DEG2RAD, RAD2DEG,
|
|
23
|
+
import { DEG2RAD, RAD2DEG, SpaceObjectType } from 'ootk-core';
|
|
24
24
|
import { azel2uv, uv2azel } from '../main';
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
import { DetailedSensor } from './DetailedSensor';
|
|
26
|
+
export class RfSensor extends DetailedSensor {
|
|
27
27
|
boresightAz;
|
|
28
28
|
boresightEl;
|
|
29
|
+
faces;
|
|
30
|
+
freqBand;
|
|
31
|
+
beamwidth;
|
|
29
32
|
constructor(info) {
|
|
30
33
|
super(info);
|
|
31
34
|
switch (info.type) {
|
|
@@ -36,32 +39,77 @@ export class RfSensor extends Sensor {
|
|
|
36
39
|
default:
|
|
37
40
|
throw new Error('Invalid sensor type');
|
|
38
41
|
}
|
|
39
|
-
this.coneHalfAngle = info.coneHalfAngle;
|
|
40
42
|
this.boresightAz = info.boresightAz;
|
|
41
43
|
this.boresightEl = info.boresightEl;
|
|
44
|
+
if (info.boresightAz.length !== info.boresightEl.length) {
|
|
45
|
+
throw new Error('Boresight azimuth and elevation arrays must be the same length');
|
|
46
|
+
}
|
|
47
|
+
this.faces = info.boresightAz.length;
|
|
48
|
+
this.beamwidth = info.beamwidth;
|
|
49
|
+
this.freqBand = info.freqBand;
|
|
42
50
|
}
|
|
43
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Converts azimuth and elevation angles to unit vector coordinates.
|
|
53
|
+
* @param az - The azimuth angle in degrees.
|
|
54
|
+
* @param el - The elevation angle in degrees.
|
|
55
|
+
* @param face - The face number (optional).
|
|
56
|
+
* @returns The unit vector coordinates.
|
|
57
|
+
*/
|
|
58
|
+
uvFromAzEl(az, el, face) {
|
|
44
59
|
const azRad = (az * DEG2RAD);
|
|
45
60
|
const elRad = (el * DEG2RAD);
|
|
46
|
-
const azDiff = (azRad - this.boresightAzRad);
|
|
47
|
-
const elDiff = (elRad - this.boresightElRad);
|
|
48
|
-
return azel2uv(azDiff, elDiff, this.
|
|
61
|
+
const azDiff = (azRad - this.boresightAzRad(face ?? 0));
|
|
62
|
+
const elDiff = (elRad - this.boresightElRad(face ?? 0));
|
|
63
|
+
return azel2uv(azDiff, elDiff, this.beamwidthRad);
|
|
49
64
|
}
|
|
50
|
-
|
|
51
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Converts the given UV coordinates to azimuth and elevation angles.
|
|
67
|
+
* @param u - The U coordinate.
|
|
68
|
+
* @param v - The V coordinate.
|
|
69
|
+
* @param face - The face number for multi-faced sensors. (optional)
|
|
70
|
+
* @returns An object containing the azimuth and elevation angles in degrees.
|
|
71
|
+
* @throws Error if face number is not specified for multi-faced sensors.
|
|
72
|
+
*/
|
|
73
|
+
azElFromUV(u, v, face) {
|
|
74
|
+
if (!face && this.faces > 1) {
|
|
75
|
+
throw new Error('Face number must be specified for multi-faced sensors');
|
|
76
|
+
}
|
|
77
|
+
const { az, el } = uv2azel(u, v, this.beamwidthRad);
|
|
52
78
|
return {
|
|
53
|
-
az: ((az + this.boresightAz) * RAD2DEG),
|
|
54
|
-
el: ((el + this.boresightEl) * RAD2DEG),
|
|
79
|
+
az: ((az + this.boresightAz[face ?? 0]) * RAD2DEG),
|
|
80
|
+
el: ((el + this.boresightEl[face ?? 0]) * RAD2DEG),
|
|
55
81
|
};
|
|
56
82
|
}
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Converts the boresight azimuth angle to radians.
|
|
85
|
+
* @param face - The face number for multi-faced sensors. (Optional)
|
|
86
|
+
* @returns The boresight azimuth angle in radians.
|
|
87
|
+
* @throws An error if the face number is not specified for multi-faced sensors.
|
|
88
|
+
*/
|
|
89
|
+
boresightAzRad(face) {
|
|
90
|
+
if (!face && this.faces > 1) {
|
|
91
|
+
throw new Error('Face number must be specified for multi-faced sensors');
|
|
92
|
+
}
|
|
93
|
+
return (this.boresightAz[face ?? 0] * DEG2RAD);
|
|
59
94
|
}
|
|
60
|
-
|
|
61
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Converts the boresight elevation angle of the sensor to radians.
|
|
97
|
+
* @param face - The face number of the sensor (optional for single-faced sensors).
|
|
98
|
+
* @returns The boresight elevation angle in radians.
|
|
99
|
+
* @throws Error if the face number is not specified for multi-faced sensors.
|
|
100
|
+
*/
|
|
101
|
+
boresightElRad(face) {
|
|
102
|
+
if (!face && this.faces > 1) {
|
|
103
|
+
throw new Error('Face number must be specified for multi-faced sensors');
|
|
104
|
+
}
|
|
105
|
+
return (this.boresightEl[face ?? 0] * DEG2RAD);
|
|
62
106
|
}
|
|
63
|
-
|
|
64
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Gets the beamwidth in radians.
|
|
109
|
+
* @returns The beamwidth in radians.
|
|
110
|
+
*/
|
|
111
|
+
get beamwidthRad() {
|
|
112
|
+
return (this.beamwidth * DEG2RAD);
|
|
65
113
|
}
|
|
66
114
|
}
|
|
67
115
|
//# sourceMappingURL=RfSensor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RfSensor.js","sourceRoot":"","sources":["../../src/objects/RfSensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,OAAO,EAAW,OAAO,EAAW,
|
|
1
|
+
{"version":3,"file":"RfSensor.js","sourceRoot":"","sources":["../../src/objects/RfSensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,OAAO,EAAW,OAAO,EAAW,eAAe,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,QAAS,SAAQ,cAAc;IAC1C,WAAW,CAAY;IACvB,WAAW,CAAY;IACvB,KAAK,CAAS;IACd,QAAQ,CAAU;IAClB,SAAS,CAAU;IAEnB,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,eAAe,CAAC,wBAAwB,CAAC;YAC9C,KAAK,eAAe,CAAC,UAAU,CAAC;YAChC,KAAK,eAAe,CAAC,kBAAkB;gBACrC,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SAC1C;QAED,IAAI,CAAC,WAAW,GAAG,IA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AAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAY;YAC7D,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAY;SAC9D,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,IAAa;QAC1B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SAC1E;QAED,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,OAAO,CAAY,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,IAAa;QAC1B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SAC1E;QAED,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,OAAO,CAAY,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACH,IAAI,YAAY;QACd,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAY,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -28,9 +28,13 @@ export declare class BatchLeastSquaresOD {
|
|
|
28
28
|
private posStep_;
|
|
29
29
|
private velStep_;
|
|
30
30
|
private fastDerivatives_;
|
|
31
|
+
/** Propagator pair cache, for generating observation Jacobians. */
|
|
31
32
|
private propPairs_;
|
|
33
|
+
/** Nominal state propagator. */
|
|
32
34
|
private propagator_;
|
|
35
|
+
/** State estimate during solve. */
|
|
33
36
|
private nominal_;
|
|
37
|
+
/** Solve start epoch. */
|
|
34
38
|
private start_;
|
|
35
39
|
/**
|
|
36
40
|
* Create a new [BatchLeastSquaresOD] object from a list of [Observation]
|
|
@@ -31,13 +31,13 @@ export class BatchLeastSquaresOD {
|
|
|
31
31
|
posStep_;
|
|
32
32
|
velStep_;
|
|
33
33
|
fastDerivatives_;
|
|
34
|
-
|
|
34
|
+
/** Propagator pair cache, for generating observation Jacobians. */
|
|
35
35
|
propPairs_;
|
|
36
|
-
|
|
36
|
+
/** Nominal state propagator. */
|
|
37
37
|
propagator_;
|
|
38
|
-
|
|
38
|
+
/** State estimate during solve. */
|
|
39
39
|
nominal_;
|
|
40
|
-
|
|
40
|
+
/** Solve start epoch. */
|
|
41
41
|
start_;
|
|
42
42
|
/**
|
|
43
43
|
* Create a new [BatchLeastSquaresOD] object from a list of [Observation]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BatchLeastSquaresOD.js","sourceRoot":"","sources":["../../src/orbit_determination/BatchLeastSquaresOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAY,KAAK,EAAmC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAuBpB;IACA;IACA;IACA;IACA;IACA;IA3BV,
|
|
1
|
+
{"version":3,"file":"BatchLeastSquaresOD.js","sourceRoot":"","sources":["../../src/orbit_determination/BatchLeastSquaresOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,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CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC1B,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9B;YACD,IAAI,SAAS,EAAE;gBACb,MAAM;aACP;SACF;QACD,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;QAE/D,OAAO,IAAI,uBAAuB,CAChC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EACzD,UAAU,EACV,WAAW,CACZ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -18,17 +18,59 @@ import { EpochUTC, J2000, Tle } from 'ootk-core';
|
|
|
18
18
|
import { Thrust } from '../force/Thrust';
|
|
19
19
|
import { VerletBlendInterpolator } from '../interpolator/VerletBlendInterpolator';
|
|
20
20
|
import { Propagator } from './Propagator';
|
|
21
|
+
/**
|
|
22
|
+
* Sgp4Propagator is a propagator that uses the SGP4 model to propagate the state of an object.
|
|
23
|
+
* This class is useful for propagating multiple states with the same TLE, since it caches the
|
|
24
|
+
* state of the TLE at different epochs.
|
|
25
|
+
*/
|
|
21
26
|
export declare class Sgp4Propagator extends Propagator {
|
|
22
27
|
private tle;
|
|
23
28
|
constructor(tle: Tle);
|
|
24
29
|
private _cacheState;
|
|
25
30
|
private _checkpoints;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the state of the propagator in the J2000 coordinate system.
|
|
33
|
+
* @returns The J2000 state of the propagator.
|
|
34
|
+
*/
|
|
26
35
|
get state(): J2000;
|
|
36
|
+
/**
|
|
37
|
+
* Calculates the ephemeris maneuver using the SGP4 propagator.
|
|
38
|
+
* @param start The start epoch in UTC.
|
|
39
|
+
* @param finish The finish epoch in UTC.
|
|
40
|
+
* @param maneuvers The array of thrust maneuvers.
|
|
41
|
+
* @param interval The time interval in seconds.
|
|
42
|
+
*/
|
|
27
43
|
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: number): VerletBlendInterpolator;
|
|
44
|
+
/**
|
|
45
|
+
* Performs a maneuver with the given thrust.
|
|
46
|
+
* @param maneuver - The thrust maneuver to perform.
|
|
47
|
+
* @param interval - The time interval for the maneuver (default: 60.0 seconds).
|
|
48
|
+
* @throws Error if maneuvers cannot be modeled with SGP4.
|
|
49
|
+
*/
|
|
28
50
|
maneuver(maneuver: Thrust, interval?: number): J2000[];
|
|
51
|
+
/**
|
|
52
|
+
* Propagates the state of the Sgp4Propagator to a specified epoch in J2000 coordinates.
|
|
53
|
+
* @param epoch - The epoch in UTC format.
|
|
54
|
+
* @returns The propagated state in J2000 coordinates.
|
|
55
|
+
*/
|
|
29
56
|
propagate(epoch: EpochUTC): J2000;
|
|
57
|
+
/**
|
|
58
|
+
* Resets the state of the Sgp4Propagator by updating the cache state
|
|
59
|
+
* to the current J2000 state of the TLE.
|
|
60
|
+
*/
|
|
30
61
|
reset(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Saves the current state of the propagator and returns the index of the checkpoint.
|
|
64
|
+
* @returns The index of the checkpoint.
|
|
65
|
+
*/
|
|
31
66
|
checkpoint(): number;
|
|
67
|
+
/**
|
|
68
|
+
* Clears all the checkpoints in the propagator.
|
|
69
|
+
*/
|
|
32
70
|
clearCheckpoints(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Restores the state of the propagator to a previously saved checkpoint.
|
|
73
|
+
* @param index - The index of the checkpoint to restore.
|
|
74
|
+
*/
|
|
33
75
|
restore(index: number): void;
|
|
34
76
|
}
|
|
@@ -15,10 +15,13 @@
|
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
17
|
import { Propagator } from './Propagator';
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Sgp4Propagator is a propagator that uses the SGP4 model to propagate the state of an object.
|
|
20
|
+
* This class is useful for propagating multiple states with the same TLE, since it caches the
|
|
21
|
+
* state of the TLE at different epochs.
|
|
22
|
+
*/
|
|
19
23
|
export class Sgp4Propagator extends Propagator {
|
|
20
24
|
tle;
|
|
21
|
-
// / Create a new [Sgp4Propagator] object from a [TLE].
|
|
22
25
|
constructor(tle) {
|
|
23
26
|
super();
|
|
24
27
|
this.tle = tle;
|
|
@@ -26,29 +29,66 @@ export class Sgp4Propagator extends Propagator {
|
|
|
26
29
|
}
|
|
27
30
|
_cacheState;
|
|
28
31
|
_checkpoints = [];
|
|
32
|
+
/**
|
|
33
|
+
* Gets the state of the propagator in the J2000 coordinate system.
|
|
34
|
+
* @returns The J2000 state of the propagator.
|
|
35
|
+
*/
|
|
29
36
|
get state() {
|
|
30
37
|
return this._cacheState;
|
|
31
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Calculates the ephemeris maneuver using the SGP4 propagator.
|
|
41
|
+
* @param start The start epoch in UTC.
|
|
42
|
+
* @param finish The finish epoch in UTC.
|
|
43
|
+
* @param maneuvers The array of thrust maneuvers.
|
|
44
|
+
* @param interval The time interval in seconds.
|
|
45
|
+
*/
|
|
32
46
|
ephemerisManeuver(start, finish, maneuvers, interval = 60.0) {
|
|
33
47
|
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
34
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Performs a maneuver with the given thrust.
|
|
51
|
+
* @param maneuver - The thrust maneuver to perform.
|
|
52
|
+
* @param interval - The time interval for the maneuver (default: 60.0 seconds).
|
|
53
|
+
* @throws Error if maneuvers cannot be modeled with SGP4.
|
|
54
|
+
*/
|
|
35
55
|
maneuver(maneuver, interval = 60.0) {
|
|
36
56
|
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
37
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Propagates the state of the Sgp4Propagator to a specified epoch in J2000 coordinates.
|
|
60
|
+
* @param epoch - The epoch in UTC format.
|
|
61
|
+
* @returns The propagated state in J2000 coordinates.
|
|
62
|
+
*/
|
|
38
63
|
propagate(epoch) {
|
|
39
64
|
this._cacheState = this.tle.propagate(epoch).toJ2000();
|
|
40
65
|
return this._cacheState;
|
|
41
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Resets the state of the Sgp4Propagator by updating the cache state
|
|
69
|
+
* to the current J2000 state of the TLE.
|
|
70
|
+
*/
|
|
42
71
|
reset() {
|
|
43
72
|
this._cacheState = this.tle.state.toJ2000();
|
|
44
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Saves the current state of the propagator and returns the index of the checkpoint.
|
|
76
|
+
* @returns The index of the checkpoint.
|
|
77
|
+
*/
|
|
45
78
|
checkpoint() {
|
|
46
79
|
this._checkpoints.push(this._cacheState);
|
|
47
80
|
return this._checkpoints.length - 1;
|
|
48
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Clears all the checkpoints in the propagator.
|
|
84
|
+
*/
|
|
49
85
|
clearCheckpoints() {
|
|
50
86
|
this._checkpoints = [];
|
|
51
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Restores the state of the propagator to a previously saved checkpoint.
|
|
90
|
+
* @param index - The index of the checkpoint to restore.
|
|
91
|
+
*/
|
|
52
92
|
restore(index) {
|
|
53
93
|
this._cacheState = this._checkpoints[index];
|
|
54
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sgp4Propagator.js","sourceRoot":"","sources":["../../src/propagator/Sgp4Propagator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"Sgp4Propagator.js","sourceRoot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C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/propagator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Degrees, EnuVec3, Radians, RaeVec3 } from 'ootk-core';
|
|
2
|
-
import { RfSensor } from '
|
|
3
|
-
import { RfVec3, RuvVec3 } from 'src/types/types';
|
|
2
|
+
import { RfVec3, RuvVec3, RfSensor } from '../main';
|
|
4
3
|
/**
|
|
5
4
|
* Converts Azimuth and Elevation to U and V.
|
|
6
5
|
* Azimuth is the angle off of boresight in the horizontal plane.
|
|
@@ -19,10 +18,11 @@ export declare function azel2uv(az: Radians, el: Radians, coneHalfAngle: Radians
|
|
|
19
18
|
* Determine azimuth and elevation off of boresight based on sensor orientation and RAE.
|
|
20
19
|
* @param rae Range, Azimuth, Elevation
|
|
21
20
|
* @param sensor Radar sensor object
|
|
21
|
+
* @param face Face number of the sensor
|
|
22
22
|
* @param maxSensorAz Maximum sensor azimuth
|
|
23
23
|
* @returns Azimuth and Elevation off of boresight
|
|
24
24
|
*/
|
|
25
|
-
export declare function rae2raeOffBoresight(rae: RaeVec3, sensor: RfSensor, maxSensorAz: Degrees): {
|
|
25
|
+
export declare function rae2raeOffBoresight(rae: RaeVec3, sensor: RfSensor, face: number, maxSensorAz: Degrees): {
|
|
26
26
|
az: Radians;
|
|
27
27
|
el: Radians;
|
|
28
28
|
};
|
|
@@ -30,10 +30,11 @@ export declare function rae2raeOffBoresight(rae: RaeVec3, sensor: RfSensor, maxS
|
|
|
30
30
|
* Converts Range Az El to Range U V.
|
|
31
31
|
* @param rae Range, Azimuth, Elevation
|
|
32
32
|
* @param sensor Radar sensor object
|
|
33
|
+
* @param face Face number of the sensor
|
|
33
34
|
* @param maxSensorAz Maximum sensor azimuth
|
|
34
35
|
* @returns Range, U, V
|
|
35
36
|
*/
|
|
36
|
-
export declare function rae2ruv(rae: RaeVec3, sensor: RfSensor, maxSensorAz: Degrees): RuvVec3;
|
|
37
|
+
export declare function rae2ruv(rae: RaeVec3, sensor: RfSensor, face: number, maxSensorAz: Degrees): RuvVec3;
|
|
37
38
|
/**
|
|
38
39
|
* Converts U and V to Azimuth and Elevation off of boresight.
|
|
39
40
|
* @param u The U coordinate.
|
|
@@ -27,28 +27,30 @@ export function azel2uv(az, el, coneHalfAngle) {
|
|
|
27
27
|
* Determine azimuth and elevation off of boresight based on sensor orientation and RAE.
|
|
28
28
|
* @param rae Range, Azimuth, Elevation
|
|
29
29
|
* @param sensor Radar sensor object
|
|
30
|
+
* @param face Face number of the sensor
|
|
30
31
|
* @param maxSensorAz Maximum sensor azimuth
|
|
31
32
|
* @returns Azimuth and Elevation off of boresight
|
|
32
33
|
*/
|
|
33
|
-
export function rae2raeOffBoresight(rae, sensor, maxSensorAz) {
|
|
34
|
+
export function rae2raeOffBoresight(rae, sensor, face, maxSensorAz) {
|
|
34
35
|
let az = (rae.az * DEG2RAD);
|
|
35
36
|
let el = (rae.el * DEG2RAD);
|
|
36
37
|
// Correct azimuth for sensor orientation.
|
|
37
38
|
az = az > maxSensorAz * DEG2RAD ? (az - TAU) : az;
|
|
38
|
-
az = (az - sensor.boresightAz);
|
|
39
|
-
el = (el - sensor.boresightEl);
|
|
39
|
+
az = (az - sensor.boresightAz[face]);
|
|
40
|
+
el = (el - sensor.boresightEl[face]);
|
|
40
41
|
return { az, el };
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* Converts Range Az El to Range U V.
|
|
44
45
|
* @param rae Range, Azimuth, Elevation
|
|
45
46
|
* @param sensor Radar sensor object
|
|
47
|
+
* @param face Face number of the sensor
|
|
46
48
|
* @param maxSensorAz Maximum sensor azimuth
|
|
47
49
|
* @returns Range, U, V
|
|
48
50
|
*/
|
|
49
|
-
export function rae2ruv(rae, sensor, maxSensorAz) {
|
|
50
|
-
const { az, el } = rae2raeOffBoresight(rae, sensor, maxSensorAz);
|
|
51
|
-
const { u, v } = azel2uv(az, el, sensor.
|
|
51
|
+
export function rae2ruv(rae, sensor, face, maxSensorAz) {
|
|
52
|
+
const { az, el } = rae2raeOffBoresight(rae, sensor, face, maxSensorAz);
|
|
53
|
+
const { u, v } = azel2uv(az, el, sensor.beamwidthRad);
|
|
52
54
|
return { rng: rae.rng, u, v };
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../src/transforms/transforms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoB,OAAO,EAAoB,GAAG,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../src/transforms/transforms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoB,OAAO,EAAoB,GAAG,EAAE,MAAM,WAAW,CAAC;AAGtF;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,EAAW,EAAE,EAAW,EAAE,aAAsB;IACtE,IAAI,EAAE,GAAG,aAAa,IAAI,EAAE,GAAG,aAAa,EAAE;QAC5C,MAAM,IAAI,UAAU,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;KACzD;IAED,IAAI,EAAE,GAAG,aAAa,IAAI,EAAE,GAAG,aAAa,EAAE;QAC5C,MAAM,IAAI,UAAU,CAAC,+BAA+B,EA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GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjG,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjG,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAEjD,OAAO;QACL,CAAC,EAAE,GAAQ;QACX,CAAC,EAAE,GAAQ;QACX,CAAC,EAAE,GAAQ;KACZ,CAAC;AACJ,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { Kilometers, Milliseconds, SatelliteParams, SensorParams, Vec3 } from 'ootk-core';
|
|
18
|
+
import { CommLink } from '../main';
|
|
18
19
|
export declare enum ZoomValue {
|
|
19
20
|
LEO = 0.45,
|
|
20
21
|
GEO = 0.82,
|
|
@@ -46,25 +47,19 @@ export interface DetailedSatelliteParams extends SatelliteParams {
|
|
|
46
47
|
shape?: string;
|
|
47
48
|
span?: string;
|
|
48
49
|
user?: string;
|
|
49
|
-
vmag?: number;
|
|
50
|
-
rcs?: number;
|
|
50
|
+
vmag?: number | null;
|
|
51
|
+
rcs?: number | null;
|
|
51
52
|
source?: string;
|
|
52
53
|
altId?: string;
|
|
53
54
|
altName?: string;
|
|
54
55
|
}
|
|
55
|
-
export interface DetailedSensorParams {
|
|
56
|
+
export interface DetailedSensorParams extends SensorParams {
|
|
56
57
|
/** The country that owns the sensor */
|
|
57
58
|
country?: string;
|
|
58
59
|
/** 3 Letter Designation */
|
|
59
60
|
shortName?: string;
|
|
60
|
-
/** For radars, this is the width of the beam */
|
|
61
|
-
beamwidth?: Degrees;
|
|
62
61
|
changeObjectInterval?: Milliseconds;
|
|
63
|
-
|
|
64
|
-
linkGalileo?: boolean;
|
|
65
|
-
linkIridium?: boolean;
|
|
66
|
-
linkStarlink?: boolean;
|
|
67
|
-
linkWgs?: boolean;
|
|
62
|
+
commLinks?: CommLink[];
|
|
68
63
|
static?: boolean;
|
|
69
64
|
sensorId?: number;
|
|
70
65
|
url?: string;
|
|
@@ -72,8 +67,6 @@ export interface DetailedSensorParams {
|
|
|
72
67
|
volume?: boolean;
|
|
73
68
|
/** How far away should we zoom when selecting this sensor? */
|
|
74
69
|
zoom: ZoomValue;
|
|
75
|
-
/** For radar sensors, what frequency does this sensor operate in? */
|
|
76
|
-
band?: string;
|
|
77
70
|
/** This is the name of the object in the array */
|
|
78
71
|
objName?: string;
|
|
79
72
|
/** This is the name of the object in the UI */
|
package/dist/types/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0CAAU,CAAA;IACV,0CAAU,CAAA;IACV,uCAAO,CAAA;AACT,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DifferentiableFunction } from '../main';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the derivative of a differentiable function.
|
|
4
|
+
* @param f The differentiable function.
|
|
5
|
+
* @param h The step size for numerical differentiation. Default value is 1e-3.
|
|
6
|
+
* @returns The derivative function.
|
|
7
|
+
*/
|
|
8
|
+
export declare function derivative(f: DifferentiableFunction, h?: number): DifferentiableFunction;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the derivative of a differentiable function.
|
|
3
|
+
* @param f The differentiable function.
|
|
4
|
+
* @param h The step size for numerical differentiation. Default value is 1e-3.
|
|
5
|
+
* @returns The derivative function.
|
|
6
|
+
*/
|
|
7
|
+
export function derivative(f, h = 1e-3) {
|
|
8
|
+
/**
|
|
9
|
+
* @param x The value at which to calculate the derivative.
|
|
10
|
+
* @returns The derivative of the function at the given value.
|
|
11
|
+
*/
|
|
12
|
+
function df(x) {
|
|
13
|
+
const hh = h * 0.5;
|
|
14
|
+
return (f(x + hh) - f(x - hh)) / h;
|
|
15
|
+
}
|
|
16
|
+
return df;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/utils/functions.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,CAAyB,EAAE,CAAC,GAAG,IAAI;IAC5D;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAS;QACnB,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;QAEnB,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/dist/utils/jacobian.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ import { JacobianFunction } from '../types/types';
|
|
|
8
8
|
* @param step The step size for numerical differentiation (default: 1e-5).
|
|
9
9
|
* @returns The Jacobian matrix.
|
|
10
10
|
*/
|
|
11
|
-
export declare
|
|
11
|
+
export declare const jacobian: (f: JacobianFunction, m: number, x0: Float64Array, step?: number) => Matrix;
|