ootk 4.0.0-7 → 4.0.0-9
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 +22 -1
- 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 +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/index.js.map +1 -1
- 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 +4 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -1
- package/dist/objects/DetailedSatellite.d.ts +3 -2
- package/dist/objects/DetailedSatellite.js +5 -2
- package/dist/objects/DetailedSatellite.js.map +1 -1
- package/dist/objects/DetailedSensor.d.ts +12 -17
- package/dist/objects/DetailedSensor.js +20 -33
- package/dist/objects/DetailedSensor.js.map +1 -1
- package/dist/objects/RfSensor.d.ts +3 -2
- package/dist/objects/RfSensor.js +8 -6
- 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.js +1 -1
- package/dist/transforms/transforms.js.map +1 -1
- package/dist/types/types.d.ts +5 -12
- package/dist/types/types.js.map +1 -1
- package/package.json +2 -3
- package/src/enums/CommLink.ts +7 -0
- package/src/enums/index.ts +1 -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 +4 -1
- package/src/main.ts +2 -0
- package/src/objects/DetailedSatellite.ts +8 -4
- package/src/objects/DetailedSensor.ts +23 -34
- package/src/objects/RfSensor.ts +8 -6
- 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 +1 -1
- package/src/types/types.ts +5 -12
|
@@ -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":"","sources":["../../src/propagator/Sgp4Propagator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;GAIG;AACH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,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"}
|
|
@@ -48,7 +48,7 @@ export function rae2raeOffBoresight(rae, sensor, maxSensorAz) {
|
|
|
48
48
|
*/
|
|
49
49
|
export function rae2ruv(rae, sensor, maxSensorAz) {
|
|
50
50
|
const { az, el } = rae2raeOffBoresight(rae, sensor, maxSensorAz);
|
|
51
|
-
const { u, v } = azel2uv(az, el, sensor.
|
|
51
|
+
const { u, v } = azel2uv(az, el, sensor.beamwidthRad);
|
|
52
52
|
return { rng: rae.rng, u, v };
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -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;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,EAAE,EAAE,CAAC,CAAC;KAC3D;IAED,MAAM,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,aAAa,GAAG,OAA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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, 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,8 +47,8 @@ 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;
|
|
@@ -57,14 +58,8 @@ export interface DetailedSensorParams {
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ootk",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/main.js",
|
|
6
6
|
"description": "Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
43
43
|
"@typescript-eslint/parser": "^6.18.1",
|
|
44
44
|
"auto-changelog": "^2.4.0",
|
|
45
|
-
"auto-changelog-thkruz": "^1.0.0",
|
|
46
45
|
"babel-eslint": "^10.1.0",
|
|
47
46
|
"babel-jest": "^29.7.0",
|
|
48
47
|
"babel-loader": "^9.1.3",
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
"typescript": "^4.9.5"
|
|
54
53
|
},
|
|
55
54
|
"dependencies": {
|
|
56
|
-
"ootk-core": "^1.1.
|
|
55
|
+
"ootk-core": "^1.1.2"
|
|
57
56
|
},
|
|
58
57
|
"homepage": "https://github.com/thkruz/ootk"
|
|
59
58
|
}
|
package/src/enums/index.ts
CHANGED
|
@@ -21,12 +21,37 @@ import { DataHandler, Earth, ITRF, J2000, Kilometers, KilometersPerSecond, Vecto
|
|
|
21
21
|
|
|
22
22
|
import { Force } from './Force';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* designed to model the Earth's gravitational field, which is not uniformly distributed due to variations in mass
|
|
26
|
+
* distribution within the Earth and the Earth's shape (it's not a perfect sphere). To accurately model this complex
|
|
27
|
+
* field, the gravity model is expanded into a series of spherical harmonics, characterized by their degree and order.
|
|
28
|
+
*
|
|
29
|
+
* This `degree` parameter is related to the spatial resolution of the gravity model. A higher degree corresponds to a
|
|
30
|
+
* finer resolution, capable of representing smaller-scale variations in the gravity field. The degree essentially
|
|
31
|
+
* denotes how many times the gravitational potential function varies over the surface of the Earth.
|
|
32
|
+
*
|
|
33
|
+
* For each degree, there can be multiple orders ranging from 0 up to the degree. The `order` accounts for the
|
|
34
|
+
* longitudinal variation in the gravity field. Each order within a degree captures different characteristics of the
|
|
35
|
+
* gravity anomalies.
|
|
36
|
+
*
|
|
37
|
+
* `Degree 0` corresponds to the overall, mean gravitational force of the Earth (considered as a point mass).
|
|
38
|
+
*
|
|
39
|
+
* `Degree 1` terms are related to the Earth's center of mass but are usually not used because the center of mass is
|
|
40
|
+
* defined as the origin of the coordinate system.
|
|
41
|
+
*
|
|
42
|
+
* `Degree 2` and higher capture the deviations from this spherical symmetry, such as the flattening at the poles and
|
|
43
|
+
* bulging at the equator (degree 2), and other anomalies at finer scales as the degree increases.
|
|
44
|
+
*/
|
|
25
45
|
export class EarthGravity implements Force {
|
|
26
46
|
degree: number;
|
|
27
47
|
order: number;
|
|
28
48
|
_asphericalFlag: boolean;
|
|
29
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new instance of the EarthGravity class.
|
|
52
|
+
* @param degree The degree of the Earth's gravity field. Must be between 0 and 36.
|
|
53
|
+
* @param order The order of the Earth's gravity field. Must be between 0 and 36.
|
|
54
|
+
*/
|
|
30
55
|
constructor(degree: number, order: number) {
|
|
31
56
|
this.degree = Math.min(Math.max(degree, 0), 36);
|
|
32
57
|
this.order = Math.min(Math.max(order, 0), 36);
|
package/src/force/ForceModel.ts
CHANGED
|
@@ -51,6 +51,14 @@ export class ForceModel {
|
|
|
51
51
|
this._solarRadiationPressure = new SolarRadiationPressure(mass, area, coeff);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Sets the atmospheric drag for the force model.
|
|
56
|
+
* @deprecated This is still a work in progress!
|
|
57
|
+
* @param mass - The mass of the object.
|
|
58
|
+
* @param area - The cross-sectional area of the object.
|
|
59
|
+
* @param coeff - The drag coefficient. Default value is 2.2.
|
|
60
|
+
* @param cosine - The cosine of the angle between the object's velocity vector and the drag force vector.
|
|
61
|
+
*/
|
|
54
62
|
setAtmosphericDrag(mass: number, area: number, coeff = 2.2, cosine = 4): void {
|
|
55
63
|
this._atmosphericDrag = new AtmosphericDrag(mass, area, coeff, cosine);
|
|
56
64
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ForceModel } from './ForceModel';
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
import { Degrees, SensorParams } from 'ootk-core';
|
|
25
25
|
|
|
26
26
|
export interface RfSensorParams extends SensorParams {
|
|
27
|
-
coneHalfAngle: Degrees;
|
|
28
27
|
boresightAz: Degrees;
|
|
29
28
|
boresightEl: Degrees;
|
|
29
|
+
/** For radars, this is the width of the beam */
|
|
30
|
+
beamwidth: Degrees;
|
|
31
|
+
/** For radar sensors, what frequency does this sensor operate in? */
|
|
32
|
+
freqBand?: string;
|
|
30
33
|
}
|
package/src/main.ts
CHANGED
|
@@ -56,8 +56,8 @@ export class DetailedSatellite extends Satellite {
|
|
|
56
56
|
span: string = '';
|
|
57
57
|
user: string = '';
|
|
58
58
|
source: string = '';
|
|
59
|
-
vmag: number;
|
|
60
|
-
rcs: number;
|
|
59
|
+
vmag: number|null;
|
|
60
|
+
rcs: number|null;
|
|
61
61
|
altId: string = '';
|
|
62
62
|
altName: string = '';
|
|
63
63
|
|
|
@@ -76,8 +76,8 @@ export class DetailedSatellite extends Satellite {
|
|
|
76
76
|
this.length = info.length ?? '';
|
|
77
77
|
this.diameter = info.diameter ?? '';
|
|
78
78
|
this.source = info.source ?? '';
|
|
79
|
-
this.vmag = info.vmag ??
|
|
80
|
-
this.rcs = info.rcs ??
|
|
79
|
+
this.vmag = info.vmag ?? null;
|
|
80
|
+
this.rcs = info.rcs ?? null;
|
|
81
81
|
this.altId = info.altId ?? '';
|
|
82
82
|
this.altName = info.altName ?? '';
|
|
83
83
|
this.initOperationDetails_(info);
|
|
@@ -179,4 +179,8 @@ export class DetailedSatellite extends Satellite {
|
|
|
179
179
|
dryMass: this.dryMass,
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
+
|
|
183
|
+
clone(): DetailedSatellite {
|
|
184
|
+
return new DetailedSatellite(this);
|
|
185
|
+
}
|
|
182
186
|
}
|
|
@@ -15,54 +15,43 @@
|
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { BaseObjectParams,
|
|
18
|
+
import { BaseObjectParams, Milliseconds, Sensor, SensorParams } from 'ootk-core';
|
|
19
19
|
import { DetailedSensorParams, ZoomValue } from '../types/types';
|
|
20
|
+
import { CommLink } from '../enums/CommLink';
|
|
20
21
|
|
|
21
22
|
export class DetailedSensor extends Sensor {
|
|
22
|
-
country?: string;
|
|
23
|
-
latRad: Radians;
|
|
24
|
-
lonRad: Radians;
|
|
25
|
-
shortName?: string;
|
|
26
|
-
beamwidth?: Degrees;
|
|
27
|
-
changeObjectInterval?: Milliseconds;
|
|
28
|
-
linkAehf?: boolean;
|
|
29
|
-
linkGalileo?: boolean;
|
|
30
|
-
linkIridium?: boolean;
|
|
31
|
-
linkStarlink?: boolean;
|
|
32
|
-
linkWgs?: boolean;
|
|
33
|
-
static?: boolean;
|
|
34
23
|
sensorId?: number;
|
|
35
|
-
url?: string;
|
|
36
|
-
volume?: boolean;
|
|
37
|
-
zoom: ZoomValue;
|
|
38
|
-
band?: string;
|
|
39
24
|
objName?: string;
|
|
25
|
+
shortName?: string;
|
|
40
26
|
uiName?: string;
|
|
27
|
+
country?: string;
|
|
28
|
+
dwellTime?: Milliseconds;
|
|
29
|
+
commLinks: CommLink[];
|
|
30
|
+
/** Is this sensor volumetric? */
|
|
31
|
+
isVolumetric?: boolean;
|
|
32
|
+
/** The ideal zoom to see the sensor's full FOV */
|
|
33
|
+
zoom: ZoomValue | number;
|
|
41
34
|
system?: string;
|
|
42
35
|
operator?: string;
|
|
36
|
+
url?: string;
|
|
43
37
|
|
|
44
38
|
constructor(info: DetailedSensorParams & SensorParams & BaseObjectParams) {
|
|
45
39
|
super(info);
|
|
40
|
+
this.commLinks = info.commLinks ?? [];
|
|
46
41
|
this.country = info.country;
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.changeObjectInterval = info.changeObjectInterval;
|
|
52
|
-
this.linkAehf = info.linkAehf;
|
|
53
|
-
this.linkGalileo = info.linkGalileo;
|
|
54
|
-
this.linkIridium = info.linkIridium;
|
|
55
|
-
this.linkStarlink = info.linkStarlink;
|
|
56
|
-
this.linkWgs = info.linkWgs;
|
|
57
|
-
this.static = info.static;
|
|
42
|
+
this.dwellTime = info.changeObjectInterval;
|
|
43
|
+
this.isVolumetric = info.volume;
|
|
44
|
+
this.objName = info.objName;
|
|
45
|
+
this.operator = info.operator;
|
|
58
46
|
this.sensorId = info.sensorId;
|
|
47
|
+
this.shortName = info.shortName;
|
|
48
|
+
this.system = info.system;
|
|
49
|
+
this.uiName = info.uiName;
|
|
59
50
|
this.url = info.url;
|
|
60
|
-
this.volume = info.volume;
|
|
61
51
|
this.zoom = info.zoom;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
this.operator = info.operator;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
isStatic(): boolean {
|
|
55
|
+
return true;
|
|
67
56
|
}
|
|
68
57
|
}
|
package/src/objects/RfSensor.ts
CHANGED
|
@@ -25,9 +25,10 @@ import { DEG2RAD, Degrees, RAD2DEG, Radians, Sensor, SpaceObjectType } from 'oot
|
|
|
25
25
|
import { azel2uv, uv2azel, RfSensorParams } from '../main';
|
|
26
26
|
|
|
27
27
|
export class RfSensor extends Sensor {
|
|
28
|
-
coneHalfAngle: Degrees;
|
|
29
28
|
boresightAz: Degrees;
|
|
30
29
|
boresightEl: Degrees;
|
|
30
|
+
freqBand?: string;
|
|
31
|
+
beamwidth: Degrees;
|
|
31
32
|
|
|
32
33
|
constructor(info: RfSensorParams) {
|
|
33
34
|
super(info);
|
|
@@ -41,9 +42,10 @@ export class RfSensor extends Sensor {
|
|
|
41
42
|
throw new Error('Invalid sensor type');
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
this.coneHalfAngle = info.coneHalfAngle;
|
|
45
45
|
this.boresightAz = info.boresightAz;
|
|
46
46
|
this.boresightEl = info.boresightEl;
|
|
47
|
+
this.beamwidth = info.beamwidth;
|
|
48
|
+
this.freqBand = info.freqBand;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
uvFromAzEl(az: Degrees, el: Degrees) {
|
|
@@ -52,11 +54,11 @@ export class RfSensor extends Sensor {
|
|
|
52
54
|
const azDiff = (azRad - this.boresightAzRad) as Radians;
|
|
53
55
|
const elDiff = (elRad - this.boresightElRad) as Radians;
|
|
54
56
|
|
|
55
|
-
return azel2uv(azDiff, elDiff, this.
|
|
57
|
+
return azel2uv(azDiff, elDiff, this.beamwidthRad);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
azElFromUV(u: number, v: number) {
|
|
59
|
-
const { az, el } = uv2azel(u, v, this.
|
|
61
|
+
const { az, el } = uv2azel(u, v, this.beamwidthRad);
|
|
60
62
|
|
|
61
63
|
return {
|
|
62
64
|
az: ((az + this.boresightAz) * RAD2DEG) as Degrees,
|
|
@@ -72,7 +74,7 @@ export class RfSensor extends Sensor {
|
|
|
72
74
|
return (this.boresightEl * DEG2RAD) as Radians;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
get
|
|
76
|
-
return (this.
|
|
77
|
+
get beamwidthRad() {
|
|
78
|
+
return (this.beamwidth * DEG2RAD) as Radians;
|
|
77
79
|
}
|
|
78
80
|
}
|
|
@@ -29,13 +29,13 @@ import { BatchLeastSquaresResult } from './BatchLeastSquaresResult';
|
|
|
29
29
|
* Batch least squares orbit determination.
|
|
30
30
|
*/
|
|
31
31
|
export class BatchLeastSquaresOD {
|
|
32
|
-
|
|
32
|
+
/** Propagator pair cache, for generating observation Jacobians. */
|
|
33
33
|
private propPairs_: PropagatorPairs;
|
|
34
|
-
|
|
34
|
+
/** Nominal state propagator. */
|
|
35
35
|
private propagator_: Propagator;
|
|
36
|
-
|
|
36
|
+
/** State estimate during solve. */
|
|
37
37
|
private nominal_: J2000;
|
|
38
|
-
|
|
38
|
+
/** Solve start epoch. */
|
|
39
39
|
private start_: EpochUTC;
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -22,9 +22,12 @@ import { Thrust } from '../force/Thrust';
|
|
|
22
22
|
import { VerletBlendInterpolator } from '../interpolator/VerletBlendInterpolator';
|
|
23
23
|
import { Propagator } from './Propagator';
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Sgp4Propagator is a propagator that uses the SGP4 model to propagate the state of an object.
|
|
27
|
+
* This class is useful for propagating multiple states with the same TLE, since it caches the
|
|
28
|
+
* state of the TLE at different epochs.
|
|
29
|
+
*/
|
|
26
30
|
export class Sgp4Propagator extends Propagator {
|
|
27
|
-
// / Create a new [Sgp4Propagator] object from a [TLE].
|
|
28
31
|
constructor(private tle: Tle) {
|
|
29
32
|
super();
|
|
30
33
|
this._cacheState = tle.state.toJ2000();
|
|
@@ -33,38 +36,75 @@ export class Sgp4Propagator extends Propagator {
|
|
|
33
36
|
private _cacheState: J2000;
|
|
34
37
|
private _checkpoints: J2000[] = [];
|
|
35
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Gets the state of the propagator in the J2000 coordinate system.
|
|
41
|
+
* @returns The J2000 state of the propagator.
|
|
42
|
+
*/
|
|
36
43
|
get state(): J2000 {
|
|
37
44
|
return this._cacheState;
|
|
38
45
|
}
|
|
39
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Calculates the ephemeris maneuver using the SGP4 propagator.
|
|
49
|
+
* @param start The start epoch in UTC.
|
|
50
|
+
* @param finish The finish epoch in UTC.
|
|
51
|
+
* @param maneuvers The array of thrust maneuvers.
|
|
52
|
+
* @param interval The time interval in seconds.
|
|
53
|
+
*/
|
|
40
54
|
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval = 60.0): VerletBlendInterpolator {
|
|
41
55
|
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
42
56
|
}
|
|
43
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Performs a maneuver with the given thrust.
|
|
60
|
+
* @param maneuver - The thrust maneuver to perform.
|
|
61
|
+
* @param interval - The time interval for the maneuver (default: 60.0 seconds).
|
|
62
|
+
* @throws Error if maneuvers cannot be modeled with SGP4.
|
|
63
|
+
*/
|
|
44
64
|
maneuver(maneuver: Thrust, interval = 60.0): J2000[] {
|
|
45
65
|
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
46
66
|
}
|
|
47
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Propagates the state of the Sgp4Propagator to a specified epoch in J2000 coordinates.
|
|
70
|
+
* @param epoch - The epoch in UTC format.
|
|
71
|
+
* @returns The propagated state in J2000 coordinates.
|
|
72
|
+
*/
|
|
48
73
|
propagate(epoch: EpochUTC): J2000 {
|
|
49
74
|
this._cacheState = this.tle.propagate(epoch).toJ2000();
|
|
50
75
|
|
|
51
76
|
return this._cacheState;
|
|
52
77
|
}
|
|
53
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Resets the state of the Sgp4Propagator by updating the cache state
|
|
81
|
+
* to the current J2000 state of the TLE.
|
|
82
|
+
*/
|
|
54
83
|
reset(): void {
|
|
55
84
|
this._cacheState = this.tle.state.toJ2000();
|
|
56
85
|
}
|
|
57
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Saves the current state of the propagator and returns the index of the checkpoint.
|
|
89
|
+
* @returns The index of the checkpoint.
|
|
90
|
+
*/
|
|
58
91
|
checkpoint(): number {
|
|
59
92
|
this._checkpoints.push(this._cacheState);
|
|
60
93
|
|
|
61
94
|
return this._checkpoints.length - 1;
|
|
62
95
|
}
|
|
63
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Clears all the checkpoints in the propagator.
|
|
99
|
+
*/
|
|
64
100
|
clearCheckpoints(): void {
|
|
65
101
|
this._checkpoints = [];
|
|
66
102
|
}
|
|
67
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Restores the state of the propagator to a previously saved checkpoint.
|
|
106
|
+
* @param index - The index of the checkpoint to restore.
|
|
107
|
+
*/
|
|
68
108
|
restore(index: number): void {
|
|
69
109
|
this._cacheState = this._checkpoints[index];
|
|
70
110
|
}
|
|
@@ -64,7 +64,7 @@ export function rae2raeOffBoresight(
|
|
|
64
64
|
*/
|
|
65
65
|
export function rae2ruv(rae: RaeVec3, sensor: RfSensor, maxSensorAz: Degrees): RuvVec3 {
|
|
66
66
|
const { az, el } = rae2raeOffBoresight(rae, sensor, maxSensorAz);
|
|
67
|
-
const { u, v } = azel2uv(az, el, sensor.
|
|
67
|
+
const { u, v } = azel2uv(az, el, sensor.beamwidthRad);
|
|
68
68
|
|
|
69
69
|
return { rng: rae.rng, u, v };
|
|
70
70
|
}
|