ootk 3.0.0 → 4.0.0-1
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 +235 -10
- package/README.md +27 -40
- package/dist/coordinate/Hill.d.ts +49 -0
- package/dist/coordinate/Hill.js +222 -0
- package/dist/coordinate/Hill.js.map +1 -0
- package/dist/coordinate/index.d.ts +1 -0
- package/dist/coordinate/index.js +2 -0
- package/dist/coordinate/index.js.map +1 -0
- package/dist/covariance/CovarianceSample.d.ts +43 -0
- package/dist/covariance/CovarianceSample.js +147 -0
- package/dist/covariance/CovarianceSample.js.map +1 -0
- package/dist/covariance/StateCovariance.d.ts +42 -0
- package/dist/covariance/StateCovariance.js +65 -0
- package/dist/covariance/StateCovariance.js.map +1 -0
- package/dist/force/AtmosphericDrag.d.ts +31 -0
- package/dist/force/AtmosphericDrag.js +73 -0
- package/dist/force/AtmosphericDrag.js.map +1 -0
- package/dist/force/EarthGravity.d.ts +27 -0
- package/dist/force/EarthGravity.js +117 -0
- package/dist/force/EarthGravity.js.map +1 -0
- package/{lib/ootk.d.ts → dist/force/Force.d.ts} +12 -11
- package/dist/force/Force.js +31 -0
- package/dist/force/Force.js.map +1 -0
- package/dist/force/ForceModel.d.ts +37 -0
- package/dist/force/ForceModel.js +75 -0
- package/dist/force/ForceModel.js.map +1 -0
- package/dist/force/Gravity.d.ts +38 -0
- package/dist/force/Gravity.js +47 -0
- package/dist/force/Gravity.js.map +1 -0
- package/dist/{ootk.d.ts → force/SolarRadiationPressure.d.ts} +12 -11
- package/dist/force/SolarRadiationPressure.js +44 -0
- package/dist/force/SolarRadiationPressure.js.map +1 -0
- package/dist/force/ThirdBodyGravity.d.ts +26 -0
- package/dist/force/ThirdBodyGravity.js +57 -0
- package/dist/force/ThirdBodyGravity.js.map +1 -0
- package/dist/force/Thrust.d.ts +34 -0
- package/dist/force/Thrust.js +58 -0
- package/dist/force/Thrust.js.map +1 -0
- package/dist/interfaces/RfSensorParams.d.ts +28 -0
- package/dist/interfaces/RfSensorParams.js +24 -0
- package/dist/interfaces/RfSensorParams.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interpolator/ChebyshevCoefficients.d.ts +50 -0
- package/dist/interpolator/ChebyshevCoefficients.js +94 -0
- package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
- package/dist/interpolator/ChebyshevInterpolator.d.ts +38 -0
- package/dist/interpolator/ChebyshevInterpolator.js +71 -0
- package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
- package/dist/interpolator/CubicSpline.d.ts +35 -0
- package/dist/interpolator/CubicSpline.js +69 -0
- package/dist/interpolator/CubicSpline.js.map +1 -0
- package/dist/interpolator/CubicSplineInterpolator.d.ts +36 -0
- package/dist/interpolator/CubicSplineInterpolator.js +80 -0
- package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
- package/dist/interpolator/FieldInterpolator.d.ts +28 -0
- package/dist/interpolator/FieldInterpolator.js +34 -0
- package/dist/interpolator/FieldInterpolator.js.map +1 -0
- package/dist/interpolator/Interpolator.d.ts +22 -0
- package/dist/interpolator/Interpolator.js +47 -0
- package/dist/interpolator/Interpolator.js.map +1 -0
- package/dist/interpolator/LagrangeInterpolator.d.ts +40 -0
- package/dist/interpolator/LagrangeInterpolator.js +159 -0
- package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
- package/dist/interpolator/StateInterpolator.d.ts +27 -0
- package/dist/interpolator/StateInterpolator.js +35 -0
- package/dist/interpolator/StateInterpolator.js.map +1 -0
- package/dist/interpolator/VerletBlendInterpolator.d.ts +43 -0
- package/dist/interpolator/VerletBlendInterpolator.js +118 -0
- package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
- package/{lib/ootk.js → dist/main.d.ts} +13 -10
- package/dist/{objects/space-object.d.ts → main.js} +17 -23
- package/dist/main.js.map +1 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +41 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.js +65 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
- package/dist/maneuver/Waypoint.d.ts +91 -0
- package/dist/maneuver/Waypoint.js +179 -0
- package/dist/maneuver/Waypoint.js.map +1 -0
- package/{lib/objects/detailed-sat.d.ts → dist/objects/DetailedSatellite.d.ts} +40 -36
- package/dist/objects/DetailedSatellite.js +136 -0
- package/dist/objects/DetailedSatellite.js.map +1 -0
- package/dist/objects/DetailedSensor.d.ts +42 -0
- package/dist/objects/DetailedSensor.js +65 -0
- package/dist/objects/DetailedSensor.js.map +1 -0
- package/dist/objects/LandObject.d.ts +33 -0
- package/dist/objects/LandObject.js +34 -0
- package/dist/objects/LandObject.js.map +1 -0
- package/dist/objects/Marker.d.ts +20 -0
- package/dist/objects/Marker.js +24 -0
- package/dist/objects/Marker.js.map +1 -0
- package/dist/objects/RfSensor.d.ts +41 -0
- package/dist/objects/RfSensor.js +67 -0
- package/dist/objects/RfSensor.js.map +1 -0
- package/dist/objects/index.d.ts +5 -4
- package/dist/objects/index.js +6 -0
- package/dist/objects/index.js.map +1 -0
- package/dist/observation/Observation.d.ts +89 -0
- package/dist/observation/Observation.js +102 -0
- package/dist/observation/Observation.js.map +1 -0
- package/dist/observation/ObservationOptical.d.ts +48 -0
- package/dist/observation/ObservationOptical.js +105 -0
- package/dist/observation/ObservationOptical.js.map +1 -0
- package/dist/observation/ObservationRadar.d.ts +46 -0
- package/dist/observation/ObservationRadar.js +96 -0
- package/dist/observation/ObservationRadar.js.map +1 -0
- package/dist/observation/ObservationUtils.d.ts +20 -0
- package/dist/observation/ObservationUtils.js +32 -0
- package/dist/observation/ObservationUtils.js.map +1 -0
- package/dist/observation/PropagatorPairs.d.ts +32 -0
- package/dist/observation/PropagatorPairs.js +43 -0
- package/dist/observation/PropagatorPairs.js.map +1 -0
- package/dist/operations/BoxMuller.d.ts +46 -0
- package/dist/operations/BoxMuller.js +77 -0
- package/dist/operations/BoxMuller.js.map +1 -0
- package/dist/operations/EulerAngles.d.ts +105 -0
- package/dist/operations/EulerAngles.js +161 -0
- package/dist/operations/EulerAngles.js.map +1 -0
- package/dist/operations/Quaternion.d.ts +56 -0
- package/dist/operations/Quaternion.js +167 -0
- package/dist/operations/Quaternion.js.map +1 -0
- package/dist/operations/RandomGaussianSource.d.ts +24 -0
- package/dist/operations/RandomGaussianSource.js +43 -0
- package/dist/operations/RandomGaussianSource.js.map +1 -0
- package/dist/operations/index.d.ts +4 -0
- package/dist/operations/index.js +5 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/optimize/ChebyshevCompressor.d.ts +32 -0
- package/dist/optimize/ChebyshevCompressor.js +83 -0
- package/dist/optimize/ChebyshevCompressor.js.map +1 -0
- package/dist/optimize/DownhillSimplex.d.ts +64 -0
- package/dist/optimize/DownhillSimplex.js +182 -0
- package/dist/optimize/DownhillSimplex.js.map +1 -0
- package/dist/optimize/GoldenSection.d.ts +39 -0
- package/dist/optimize/GoldenSection.js +55 -0
- package/dist/optimize/GoldenSection.js.map +1 -0
- package/dist/optimize/PolynomialRegression.d.ts +49 -0
- package/dist/optimize/PolynomialRegression.js +83 -0
- package/dist/optimize/PolynomialRegression.js.map +1 -0
- package/dist/optimize/PolynomicalRegressionResult.d.ts +31 -0
- package/dist/optimize/PolynomicalRegressionResult.js +38 -0
- package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
- package/dist/optimize/SimpleLinearRegression.d.ts +44 -0
- package/dist/optimize/SimpleLinearRegression.js +112 -0
- package/dist/optimize/SimpleLinearRegression.js.map +1 -0
- package/dist/optimize/SimplexEntry.d.ts +32 -0
- package/dist/optimize/SimplexEntry.js +42 -0
- package/dist/optimize/SimplexEntry.js.map +1 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +65 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.js +143 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
- package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +31 -0
- package/{lib/objects/space-object.d.ts → dist/orbit_determination/BatchLeastSquaresResult.js} +21 -23
- package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
- package/dist/orbit_determination/GibbsIOD.d.ts +38 -0
- package/dist/orbit_determination/GibbsIOD.js +76 -0
- package/dist/orbit_determination/GibbsIOD.js.map +1 -0
- package/dist/orbit_determination/GoodingIOD.d.ts +51 -0
- package/dist/orbit_determination/GoodingIOD.js +247 -0
- package/dist/orbit_determination/GoodingIOD.js.map +1 -0
- package/dist/orbit_determination/HerrickGibbsIOD.d.ts +33 -0
- package/dist/orbit_determination/HerrickGibbsIOD.js +50 -0
- package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
- package/dist/orbit_determination/LambertIOD.d.ts +59 -0
- package/dist/orbit_determination/LambertIOD.js +213 -0
- package/dist/orbit_determination/LambertIOD.js.map +1 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +40 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.js +83 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
- package/dist/propagator/DormandPrince54Propagator.d.ts +28 -0
- package/dist/propagator/DormandPrince54Propagator.js +64 -0
- package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
- package/dist/propagator/KeplerPropagator.d.ts +35 -0
- package/dist/propagator/KeplerPropagator.js +84 -0
- package/dist/propagator/KeplerPropagator.js.map +1 -0
- package/dist/propagator/Propagator.d.ts +34 -0
- package/dist/propagator/Propagator.js +162 -0
- package/dist/propagator/Propagator.js.map +1 -0
- package/dist/propagator/RkCheckpoint.d.ts +22 -0
- package/dist/propagator/RkCheckpoint.js +27 -0
- package/dist/propagator/RkCheckpoint.js.map +1 -0
- package/dist/propagator/RkResult.d.ts +23 -0
- package/dist/propagator/RkResult.js +30 -0
- package/dist/propagator/RkResult.js.map +1 -0
- package/dist/propagator/RungeKutta4Propagator.d.ts +50 -0
- package/dist/propagator/RungeKutta4Propagator.js +141 -0
- package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
- package/dist/propagator/RungeKutta89Propagator.d.ts +28 -0
- package/dist/propagator/RungeKutta89Propagator.js +126 -0
- package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
- package/dist/propagator/RungeKuttaAdaptive.d.ts +54 -0
- package/dist/propagator/RungeKuttaAdaptive.js +159 -0
- package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
- package/dist/propagator/Sgp4Propagator.d.ts +34 -0
- package/dist/propagator/Sgp4Propagator.js +56 -0
- package/dist/propagator/Sgp4Propagator.js.map +1 -0
- package/dist/smoothing/ExponentialSmoothing.d.ts +23 -0
- package/dist/smoothing/ExponentialSmoothing.js +81 -0
- package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
- package/dist/transforms/index.d.ts +1 -0
- package/dist/transforms/index.js +2 -0
- package/dist/transforms/index.js.map +1 -0
- package/dist/transforms/transforms.d.ts +56 -92
- package/dist/transforms/transforms.js +94 -0
- package/dist/transforms/transforms.js.map +1 -0
- package/dist/types/types.d.ts +105 -584
- package/dist/types/types.js +23 -0
- package/dist/types/types.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/jacobian.d.ts +11 -0
- package/dist/utils/jacobian.js +29 -0
- package/dist/utils/jacobian.js.map +1 -0
- package/package.json +34 -42
- package/src/coordinate/Hill.ts +326 -0
- package/src/coordinate/index.ts +1 -0
- package/src/covariance/CovarianceSample.ts +194 -0
- package/src/covariance/StateCovariance.ts +69 -0
- package/src/force/AtmosphericDrag.ts +101 -0
- package/src/force/EarthGravity.ts +157 -0
- package/src/force/Force.ts +33 -0
- package/src/force/ForceModel.ts +91 -0
- package/src/force/Gravity.ts +53 -0
- package/src/force/SolarRadiationPressure.ts +42 -0
- package/src/force/ThirdBodyGravity.ts +62 -0
- package/src/force/Thrust.ts +83 -0
- package/src/interfaces/RfSensorParams.ts +30 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interpolator/ChebyshevCoefficients.ts +109 -0
- package/src/interpolator/ChebyshevInterpolator.ts +87 -0
- package/src/interpolator/CubicSpline.ts +72 -0
- package/src/interpolator/CubicSplineInterpolator.ts +90 -0
- package/src/interpolator/FieldInterpolator.ts +37 -0
- package/src/interpolator/Interpolator.ts +56 -0
- package/src/interpolator/LagrangeInterpolator.ts +192 -0
- package/src/interpolator/StateInterpolator.ts +39 -0
- package/src/interpolator/VerletBlendInterpolator.ts +146 -0
- package/src/main.ts +32 -0
- package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
- package/src/maneuver/Waypoint.ts +267 -0
- package/src/objects/DetailedSatellite.ts +159 -0
- package/src/objects/DetailedSensor.ts +68 -0
- package/src/objects/LandObject.ts +46 -0
- package/src/objects/Marker.ts +25 -0
- package/src/objects/RfSensor.ts +78 -0
- package/src/objects/index.ts +5 -0
- package/src/observation/Observation.ts +125 -0
- package/src/observation/ObservationOptical.ts +146 -0
- package/src/observation/ObservationRadar.ts +131 -0
- package/src/observation/ObservationUtils.ts +40 -0
- package/src/observation/PropagatorPairs.ts +45 -0
- package/src/operations/BoxMuller.ts +87 -0
- package/src/operations/EulerAngles.ts +183 -0
- package/src/operations/Quaternion.ts +222 -0
- package/src/operations/RandomGaussianSource.ts +51 -0
- package/src/operations/index.ts +4 -0
- package/src/optimize/ChebyshevCompressor.ts +96 -0
- package/src/optimize/DownhillSimplex.ts +212 -0
- package/src/optimize/GoldenSection.ts +71 -0
- package/src/optimize/PolynomialRegression.ts +109 -0
- package/src/optimize/PolynomicalRegressionResult.ts +32 -0
- package/src/optimize/SimpleLinearRegression.ts +127 -0
- package/src/optimize/SimplexEntry.ts +50 -0
- package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
- package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
- package/src/orbit_determination/GibbsIOD.ts +95 -0
- package/src/orbit_determination/GoodingIOD.ts +380 -0
- package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
- package/src/orbit_determination/LambertIOD.ts +260 -0
- package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
- package/src/propagator/DormandPrince54Propagator.ts +73 -0
- package/src/propagator/KeplerPropagator.ts +102 -0
- package/src/propagator/Propagator.ts +253 -0
- package/src/propagator/RkCheckpoint.ts +25 -0
- package/src/propagator/RkResult.ts +26 -0
- package/src/propagator/RungeKutta4Propagator.ts +179 -0
- package/src/propagator/RungeKutta89Propagator.ts +132 -0
- package/src/propagator/RungeKuttaAdaptive.ts +232 -0
- package/src/propagator/Sgp4Propagator.ts +71 -0
- package/src/smoothing/ExponentialSmoothing.ts +90 -0
- package/src/transforms/index.ts +1 -0
- package/src/transforms/transforms.ts +117 -0
- package/src/types/types.ts +135 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/jacobian.ts +38 -0
- package/.eslintrc.json +0 -244
- package/.prettierrc +0 -17
- package/babel.config.js +0 -16
- package/codecov.yml +0 -21
- package/dist/objects/base-object.d.ts +0 -40
- package/dist/objects/detailed-sat.d.ts +0 -66
- package/dist/objects/sat.d.ts +0 -92
- package/dist/objects/sensor.d.ts +0 -93
- package/dist/objects/star.d.ts +0 -46
- package/dist/ootk.js +0 -2
- package/dist/ootk.js.LICENSE.txt +0 -77
- package/dist/sgp4/sgp4.d.ts +0 -82
- package/dist/tle/tle-format-data.d.ts +0 -6
- package/dist/tle/tle.d.ts +0 -375
- package/dist/utils/constants.d.ts +0 -34
- package/dist/utils/moon-math.d.ts +0 -113
- package/dist/utils/sun-math.d.ts +0 -230
- package/dist/utils/utils.d.ts +0 -39
- package/jest.config.ts +0 -30
- package/lib/objects/base-object.d.ts +0 -40
- package/lib/objects/base-object.js +0 -79
- package/lib/objects/base-object.js.map +0 -1
- package/lib/objects/detailed-sat.js +0 -149
- package/lib/objects/detailed-sat.js.map +0 -1
- package/lib/objects/index.d.ts +0 -4
- package/lib/objects/index.js +0 -5
- package/lib/objects/index.js.map +0 -1
- package/lib/objects/sat.d.ts +0 -92
- package/lib/objects/sat.js +0 -188
- package/lib/objects/sat.js.map +0 -1
- package/lib/objects/sensor.d.ts +0 -93
- package/lib/objects/sensor.js +0 -273
- package/lib/objects/sensor.js.map +0 -1
- package/lib/objects/space-object.js +0 -60
- package/lib/objects/space-object.js.map +0 -1
- package/lib/objects/star.d.ts +0 -46
- package/lib/objects/star.js +0 -91
- package/lib/objects/star.js.map +0 -1
- package/lib/ootk.js.map +0 -1
- package/lib/sgp4/sgp4.d.ts +0 -82
- package/lib/sgp4/sgp4.js +0 -3262
- package/lib/sgp4/sgp4.js.map +0 -1
- package/lib/tle/tle-format-data.d.ts +0 -6
- package/lib/tle/tle-format-data.js +0 -10
- package/lib/tle/tle-format-data.js.map +0 -1
- package/lib/tle/tle.d.ts +0 -375
- package/lib/tle/tle.js +0 -611
- package/lib/tle/tle.js.map +0 -1
- package/lib/transforms/transforms.d.ts +0 -94
- package/lib/transforms/transforms.js +0 -308
- package/lib/transforms/transforms.js.map +0 -1
- package/lib/types/types.d.ts +0 -605
- package/lib/types/types.js +0 -36
- package/lib/types/types.js.map +0 -1
- package/lib/utils/constants.d.ts +0 -34
- package/lib/utils/constants.js +0 -35
- package/lib/utils/constants.js.map +0 -1
- package/lib/utils/moon-math.d.ts +0 -113
- package/lib/utils/moon-math.js +0 -387
- package/lib/utils/moon-math.js.map +0 -1
- package/lib/utils/sun-math.d.ts +0 -230
- package/lib/utils/sun-math.js +0 -422
- package/lib/utils/sun-math.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -39
- package/lib/utils/utils.js +0 -102
- package/lib/utils/utils.js.map +0 -1
- package/sandbox.html +0 -8
- package/tsconfig.base.json +0 -31
- package/tsconfig.build.json +0 -14
- /package/{LICENSE.MD → LICENSE.md} +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
EpochUTC,
|
|
20
|
+
J2000,
|
|
21
|
+
Kilometers,
|
|
22
|
+
KilometersPerSecond,
|
|
23
|
+
MetersPerSecond,
|
|
24
|
+
RIC,
|
|
25
|
+
SecondsPerMeterPerSecond,
|
|
26
|
+
Vector3D,
|
|
27
|
+
} from 'ootk-core';
|
|
28
|
+
import { Thrust } from '../force/Thrust';
|
|
29
|
+
import { StateInterpolator } from '../interpolator/StateInterpolator';
|
|
30
|
+
import { ForceModel } from './../force/ForceModel';
|
|
31
|
+
import { DownhillSimplex } from './../optimize/DownhillSimplex';
|
|
32
|
+
import { LambertIOD } from './../orbit_determination/LambertIOD';
|
|
33
|
+
import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator';
|
|
34
|
+
|
|
35
|
+
// / Relative waypoint targeting.
|
|
36
|
+
export class Waypoint {
|
|
37
|
+
epoch: EpochUTC;
|
|
38
|
+
relativePosition: Vector3D<Kilometers>;
|
|
39
|
+
|
|
40
|
+
// / Create a new [Waypoint] object.
|
|
41
|
+
constructor(epoch: EpochUTC, relativePosition: Vector3D<Kilometers>) {
|
|
42
|
+
this.epoch = epoch;
|
|
43
|
+
this.relativePosition = relativePosition;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Return the perturbed error in a [maneuver] when compared against the
|
|
48
|
+
* target [waypoint] given an initial [state], [forceModel],
|
|
49
|
+
* [target] interpolator, and speculative relative maneuver
|
|
50
|
+
* [components] _(m/s)_.
|
|
51
|
+
* @param waypoint The waypoint to target.
|
|
52
|
+
* @param maneuver The maneuver to perturb.
|
|
53
|
+
* @param state The initial state of the interceptor.
|
|
54
|
+
* @param forceModel The force model to use for propagation.
|
|
55
|
+
* @param target The target interpolator.
|
|
56
|
+
* @param components The speculative maneuver components.
|
|
57
|
+
* @returns The perturbed error in the maneuver.
|
|
58
|
+
*/
|
|
59
|
+
static _error(
|
|
60
|
+
waypoint: Waypoint,
|
|
61
|
+
maneuver: Thrust,
|
|
62
|
+
state: J2000,
|
|
63
|
+
forceModel: ForceModel,
|
|
64
|
+
target: StateInterpolator,
|
|
65
|
+
components: Float64Array, // MetersPerSecond
|
|
66
|
+
): number {
|
|
67
|
+
const testManeuver = new Thrust(
|
|
68
|
+
maneuver.center,
|
|
69
|
+
components[0] as MetersPerSecond,
|
|
70
|
+
components[1] as MetersPerSecond,
|
|
71
|
+
components[2] as MetersPerSecond,
|
|
72
|
+
maneuver.durationRate,
|
|
73
|
+
);
|
|
74
|
+
const propagator = new RungeKutta89Propagator(state, forceModel);
|
|
75
|
+
const maneuverSteps = propagator.maneuver(testManeuver);
|
|
76
|
+
const postManeuver = maneuverSteps[maneuverSteps.length - 1];
|
|
77
|
+
const interceptor = new RungeKutta89Propagator(postManeuver, forceModel).propagate(waypoint.epoch);
|
|
78
|
+
const targetState = target.interpolate(waypoint.epoch);
|
|
79
|
+
|
|
80
|
+
if (targetState === null) {
|
|
81
|
+
throw new Error('Error calculation failed; epoch is outside the target interpolator ephemeris window.');
|
|
82
|
+
}
|
|
83
|
+
const expected = waypoint.relativePosition;
|
|
84
|
+
const actual = RIC.fromJ2000(interceptor, targetState);
|
|
85
|
+
|
|
86
|
+
return actual.position.distance(expected);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Generate a score function for refining perturbed [waypoint] maneuvers.
|
|
91
|
+
*
|
|
92
|
+
* The score function takes an array of speculative radial, intrack, and
|
|
93
|
+
* crosstrack components _(m/s)_ and returns the propagated error from the
|
|
94
|
+
* desired waypoint target.
|
|
95
|
+
* @param waypoint The waypoint to target.
|
|
96
|
+
* @param maneuver The maneuver to perturb.
|
|
97
|
+
* @param state The initial state of the interceptor.
|
|
98
|
+
* @param forceModel The force model to use for propagation.
|
|
99
|
+
* @param target The target interpolator.
|
|
100
|
+
* @returns A score function for refining maneuvers.
|
|
101
|
+
*/
|
|
102
|
+
static _refineManeuverScore(
|
|
103
|
+
waypoint: Waypoint,
|
|
104
|
+
maneuver: Thrust,
|
|
105
|
+
state: J2000,
|
|
106
|
+
forceModel: ForceModel,
|
|
107
|
+
target: StateInterpolator,
|
|
108
|
+
): (components: Float64Array) => number {
|
|
109
|
+
return (components: Float64Array) => Waypoint._error(waypoint, maneuver, state, forceModel, target, components);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Convert an array of [waypoints] into a maneuver sequence given an
|
|
114
|
+
* [interceptor] state, [pivot] epoch for the first burn to arrive at the
|
|
115
|
+
* first waypoint, and [target] ephemeris interpolator.
|
|
116
|
+
*
|
|
117
|
+
* Optional arguments are as follows:
|
|
118
|
+
* - `preManeuvers`: maneuvers to execute before the pivot burn
|
|
119
|
+
* - `postManeuvers`: maneuvers to execute after the last pivot burn
|
|
120
|
+
* - `durationRate`: thruster duration rate _(s/m/s)_
|
|
121
|
+
* - `forceModel`: interceptor force model, defaults to two-body
|
|
122
|
+
* - `refine`: refine maneuvers to account for perturbations if `true`
|
|
123
|
+
* - `maxIter`: maximum refinement iterations per maneuver
|
|
124
|
+
* - `printIter`: print debug information on each refinement iteration
|
|
125
|
+
* @param interceptor The interceptor state.
|
|
126
|
+
* @param pivot The epoch of the first burn.
|
|
127
|
+
* @param waypoints The waypoints to target.
|
|
128
|
+
* @param target The target interpolator.
|
|
129
|
+
* @param preManeuvers The maneuvers to execute before the pivot burn.
|
|
130
|
+
* @param postManeuvers The maneuvers to execute after the last pivot burn.
|
|
131
|
+
* @param root0 The optional arguments.
|
|
132
|
+
* @param root0.durationRate The thruster duration rate.
|
|
133
|
+
* @param root0.forceModel The interceptor force model.
|
|
134
|
+
* @param root0.refine Whether to refine maneuvers to account for perturbations.
|
|
135
|
+
* @param root0.maxIter The maximum refinement iterations per maneuver.
|
|
136
|
+
* @param root0.printIter Whether to print debug information on each refinement iteration.
|
|
137
|
+
* @returns An array of maneuvers.
|
|
138
|
+
*/
|
|
139
|
+
static toManeuvers(
|
|
140
|
+
interceptor: J2000,
|
|
141
|
+
pivot: EpochUTC,
|
|
142
|
+
waypoints: Waypoint[],
|
|
143
|
+
target: StateInterpolator,
|
|
144
|
+
preManeuvers: Thrust[] | null,
|
|
145
|
+
postManeuvers: Thrust[] | null,
|
|
146
|
+
{
|
|
147
|
+
durationRate = 0.0,
|
|
148
|
+
forceModel,
|
|
149
|
+
refine = false,
|
|
150
|
+
maxIter = 500,
|
|
151
|
+
printIter = false,
|
|
152
|
+
}: {
|
|
153
|
+
durationRate?: number;
|
|
154
|
+
forceModel?: ForceModel;
|
|
155
|
+
refine?: boolean;
|
|
156
|
+
maxIter?: number;
|
|
157
|
+
printIter?: boolean;
|
|
158
|
+
} = {},
|
|
159
|
+
): Thrust[] {
|
|
160
|
+
const preMnv = preManeuvers ?? [];
|
|
161
|
+
const postMnv = postManeuvers ?? [];
|
|
162
|
+
let state = interceptor;
|
|
163
|
+
|
|
164
|
+
if (preMnv.length > 0) {
|
|
165
|
+
for (const maneuver of preMnv) {
|
|
166
|
+
const mvrStep = new RungeKutta89Propagator(state, forceModel).maneuver(maneuver);
|
|
167
|
+
|
|
168
|
+
state = mvrStep[mvrStep.length - 1];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
state = new RungeKutta89Propagator(state, forceModel).propagate(pivot);
|
|
172
|
+
const pivotState = state;
|
|
173
|
+
let waypointManeuvers: Thrust[] = [];
|
|
174
|
+
|
|
175
|
+
for (const wp of waypoints) {
|
|
176
|
+
const targetWp = new RIC(wp.relativePosition, Vector3D.origin as Vector3D<KilometersPerSecond>);
|
|
177
|
+
const targetState = target.interpolate(wp.epoch);
|
|
178
|
+
|
|
179
|
+
if (targetState === null) {
|
|
180
|
+
throw new Error('Waypoint outside target interpolator window.');
|
|
181
|
+
}
|
|
182
|
+
const wpState = targetWp.toJ2000(targetState);
|
|
183
|
+
const tof = wp.epoch.difference(state.epoch);
|
|
184
|
+
const revs = Math.floor(tof / state.period);
|
|
185
|
+
const shortPath = LambertIOD.useShortPath(state, targetState);
|
|
186
|
+
const lambert = new LambertIOD();
|
|
187
|
+
const components = lambert.estimate(state.position, wpState.position, state.epoch, wp.epoch, {
|
|
188
|
+
posigrade: shortPath,
|
|
189
|
+
nRev: revs,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
if (components === null) {
|
|
193
|
+
throw new Error('Lambert solve result is null.');
|
|
194
|
+
}
|
|
195
|
+
const componentsRel = RIC.fromJ2000(components, state).velocity.scale(1e3) as Vector3D<MetersPerSecond>;
|
|
196
|
+
const maneuver = new Thrust(
|
|
197
|
+
state.epoch,
|
|
198
|
+
componentsRel.x,
|
|
199
|
+
componentsRel.y,
|
|
200
|
+
componentsRel.z,
|
|
201
|
+
durationRate as SecondsPerMeterPerSecond,
|
|
202
|
+
);
|
|
203
|
+
const tempProp = new RungeKutta89Propagator(state, forceModel);
|
|
204
|
+
|
|
205
|
+
tempProp.maneuver(maneuver);
|
|
206
|
+
state = tempProp.propagate(wp.epoch);
|
|
207
|
+
waypointManeuvers.push(maneuver);
|
|
208
|
+
}
|
|
209
|
+
if (refine) {
|
|
210
|
+
forceModel ??= new ForceModel().setGravity();
|
|
211
|
+
waypointManeuvers = this._refineManeuvers(waypoints, waypointManeuvers, pivotState, forceModel, target, {
|
|
212
|
+
maxIter,
|
|
213
|
+
printIter,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
const output: Thrust[] = [];
|
|
217
|
+
|
|
218
|
+
output.push(...preMnv);
|
|
219
|
+
output.push(...waypointManeuvers);
|
|
220
|
+
output.push(...postMnv);
|
|
221
|
+
|
|
222
|
+
return output;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static _refineManeuvers(
|
|
226
|
+
waypoints: Waypoint[],
|
|
227
|
+
maneuvers: Thrust[],
|
|
228
|
+
interceptor: J2000,
|
|
229
|
+
forceModel: ForceModel,
|
|
230
|
+
target: StateInterpolator,
|
|
231
|
+
{
|
|
232
|
+
maxIter = 500,
|
|
233
|
+
printIter = false,
|
|
234
|
+
}: {
|
|
235
|
+
maxIter?: number;
|
|
236
|
+
printIter?: boolean;
|
|
237
|
+
} = {},
|
|
238
|
+
): Thrust[] {
|
|
239
|
+
let state = interceptor;
|
|
240
|
+
const output: Thrust[] = [];
|
|
241
|
+
|
|
242
|
+
for (let i = 0; i < maneuvers.length; i++) {
|
|
243
|
+
const maneuver = maneuvers[i];
|
|
244
|
+
const waypoint = waypoints[i];
|
|
245
|
+
const guess = maneuver.deltaV.scale(1e3).toArray();
|
|
246
|
+
const simplex = DownhillSimplex.generateSimplex(guess, 1e-1);
|
|
247
|
+
const scoreFn = this._refineManeuverScore(waypoint, maneuver, state, forceModel, target);
|
|
248
|
+
const results = DownhillSimplex.solveSimplex(scoreFn, simplex, {
|
|
249
|
+
maxIter,
|
|
250
|
+
xTolerance: 1e-6,
|
|
251
|
+
fTolerance: 1e-6,
|
|
252
|
+
printIter,
|
|
253
|
+
});
|
|
254
|
+
const tR = results[0] as MetersPerSecond;
|
|
255
|
+
const tI = results[1] as MetersPerSecond;
|
|
256
|
+
const tC = results[2] as MetersPerSecond;
|
|
257
|
+
const newManeuver = new Thrust(maneuver.center, tR, tI, tC, maneuver.durationRate);
|
|
258
|
+
|
|
259
|
+
output.push(newManeuver);
|
|
260
|
+
const mvrStep = new RungeKutta89Propagator(state, forceModel).maneuver(newManeuver);
|
|
261
|
+
|
|
262
|
+
state = mvrStep[mvrStep.length - 1];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return output;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
LaunchDetails,
|
|
20
|
+
OperationsDetails,
|
|
21
|
+
OptionsParams,
|
|
22
|
+
Satellite,
|
|
23
|
+
SpaceCraftDetails,
|
|
24
|
+
} from 'ootk-core';
|
|
25
|
+
import { DetailedSatelliteParams } from '../types/types';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Represents a detailed satellite object with launch, spacecraft, and operations details.
|
|
29
|
+
*/
|
|
30
|
+
export class DetailedSatellite extends Satellite {
|
|
31
|
+
configuration: string = '';
|
|
32
|
+
country: string = '';
|
|
33
|
+
dryMass: string = '';
|
|
34
|
+
equipment: string = '';
|
|
35
|
+
launchDate: string = '';
|
|
36
|
+
launchMass: string = '';
|
|
37
|
+
launchSite: string = '';
|
|
38
|
+
launchVehicle: string = '';
|
|
39
|
+
lifetime: string | number = '';
|
|
40
|
+
maneuver: string = '';
|
|
41
|
+
manufacturer: string = '';
|
|
42
|
+
mission: string = '';
|
|
43
|
+
bus: string = '';
|
|
44
|
+
motor: string = '';
|
|
45
|
+
owner: string = '';
|
|
46
|
+
payload: string = '';
|
|
47
|
+
power: string = '';
|
|
48
|
+
purpose: string = '';
|
|
49
|
+
length: string = '';
|
|
50
|
+
diameter: string = '';
|
|
51
|
+
shape: string = '';
|
|
52
|
+
span: string = '';
|
|
53
|
+
user: string = '';
|
|
54
|
+
source: string = '';
|
|
55
|
+
vmag: number;
|
|
56
|
+
rcs: number;
|
|
57
|
+
altId: string = '';
|
|
58
|
+
altName: string = '';
|
|
59
|
+
|
|
60
|
+
constructor(
|
|
61
|
+
info: DetailedSatelliteParams & LaunchDetails & OperationsDetails & SpaceCraftDetails,
|
|
62
|
+
options?: OptionsParams,
|
|
63
|
+
) {
|
|
64
|
+
super(info, options);
|
|
65
|
+
|
|
66
|
+
this.active ??= true;
|
|
67
|
+
this.initSpaceCraftDetails_(info);
|
|
68
|
+
this.length = info.length ?? '';
|
|
69
|
+
this.diameter = info.diameter ?? '';
|
|
70
|
+
this.source = info.source ?? '';
|
|
71
|
+
this.vmag = info.vmag ?? 0;
|
|
72
|
+
this.rcs = info.rcs ?? 0;
|
|
73
|
+
this.altId = info.altId ?? '';
|
|
74
|
+
this.altName = info.altName ?? '';
|
|
75
|
+
this.initOperationDetails_(info);
|
|
76
|
+
this.initLaunchDetails_(info);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private initSpaceCraftDetails_(
|
|
80
|
+
info: DetailedSatelliteParams &
|
|
81
|
+
LaunchDetails & OperationsDetails &
|
|
82
|
+
SpaceCraftDetails,
|
|
83
|
+
) {
|
|
84
|
+
this.lifetime = info.lifetime ?? '';
|
|
85
|
+
this.maneuver = info.maneuver ?? '';
|
|
86
|
+
this.manufacturer = info.manufacturer ?? '';
|
|
87
|
+
this.motor = info.motor ?? '';
|
|
88
|
+
this.power = info.power ?? '';
|
|
89
|
+
this.payload = info.payload ?? '';
|
|
90
|
+
this.purpose = info.purpose ?? '';
|
|
91
|
+
this.shape = info.shape ?? '';
|
|
92
|
+
this.span = info.span ?? '';
|
|
93
|
+
this.bus = info.bus ?? '';
|
|
94
|
+
this.configuration = info.configuration ?? '';
|
|
95
|
+
this.equipment = info.equipment ?? '';
|
|
96
|
+
this.dryMass = info.dryMass ?? '';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private initOperationDetails_(info: DetailedSatelliteParams & LaunchDetails & OperationsDetails & SpaceCraftDetails) {
|
|
100
|
+
this.mission = info.mission ?? '';
|
|
101
|
+
this.user = info.user ?? '';
|
|
102
|
+
this.owner = info.owner ?? '';
|
|
103
|
+
this.country = info.country ?? '';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private initLaunchDetails_(info: DetailedSatelliteParams & LaunchDetails & OperationsDetails & SpaceCraftDetails) {
|
|
107
|
+
this.launchDate = info.launchDate ?? '';
|
|
108
|
+
this.launchMass = info.launchMass ?? '';
|
|
109
|
+
this.launchSite = info.launchSite ?? '';
|
|
110
|
+
this.launchVehicle = info.launchVehicle ?? '';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Returns the launch details of the satellite.
|
|
115
|
+
* @returns An object containing the launch date, launch mass, launch site, and launch vehicle of the satellite.
|
|
116
|
+
*/
|
|
117
|
+
getLaunchDetails(): LaunchDetails {
|
|
118
|
+
return {
|
|
119
|
+
launchDate: this.launchDate,
|
|
120
|
+
launchMass: this.launchMass,
|
|
121
|
+
launchSite: this.launchSite,
|
|
122
|
+
launchVehicle: this.launchVehicle,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Returns an object containing the details of the operations.
|
|
128
|
+
* @returns An object containing the user, mission, owner, and country details.
|
|
129
|
+
*/
|
|
130
|
+
getOperationsDetails(): OperationsDetails {
|
|
131
|
+
return {
|
|
132
|
+
user: this.user,
|
|
133
|
+
mission: this.mission,
|
|
134
|
+
owner: this.owner,
|
|
135
|
+
country: this.country,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Returns the space craft details.
|
|
141
|
+
* @returns The space craft details.
|
|
142
|
+
*/
|
|
143
|
+
getSpaceCraftDetails(): SpaceCraftDetails {
|
|
144
|
+
return {
|
|
145
|
+
lifetime: this.lifetime,
|
|
146
|
+
maneuver: this.maneuver,
|
|
147
|
+
manufacturer: this.manufacturer,
|
|
148
|
+
motor: this.motor,
|
|
149
|
+
power: this.power,
|
|
150
|
+
payload: this.payload,
|
|
151
|
+
purpose: this.purpose,
|
|
152
|
+
shape: this.shape,
|
|
153
|
+
span: this.span,
|
|
154
|
+
configuration: this.configuration,
|
|
155
|
+
equipment: this.equipment,
|
|
156
|
+
dryMass: this.dryMass,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { BaseObjectParams, Degrees, Milliseconds, Radians, Sensor, SensorParams } from 'ootk-core';
|
|
19
|
+
import { DetailedSensorParams, ZoomValue } from '../types/types';
|
|
20
|
+
|
|
21
|
+
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
|
+
sensorId?: number;
|
|
35
|
+
url?: string;
|
|
36
|
+
volume?: boolean;
|
|
37
|
+
zoom: ZoomValue;
|
|
38
|
+
band?: string;
|
|
39
|
+
objName?: string;
|
|
40
|
+
uiName?: string;
|
|
41
|
+
system?: string;
|
|
42
|
+
operator?: string;
|
|
43
|
+
|
|
44
|
+
constructor(info: DetailedSensorParams & SensorParams & BaseObjectParams) {
|
|
45
|
+
super(info);
|
|
46
|
+
this.country = info.country;
|
|
47
|
+
this.latRad = (info.lat * (Math.PI / 180)) as Radians;
|
|
48
|
+
this.lonRad = (info.lon * (Math.PI / 180)) as Radians;
|
|
49
|
+
this.shortName = info.shortName;
|
|
50
|
+
this.beamwidth = info.beamwidth;
|
|
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;
|
|
58
|
+
this.sensorId = info.sensorId;
|
|
59
|
+
this.url = info.url;
|
|
60
|
+
this.volume = info.volume;
|
|
61
|
+
this.zoom = info.zoom;
|
|
62
|
+
this.band = info.band;
|
|
63
|
+
this.objName = info.objName;
|
|
64
|
+
this.uiName = info.uiName;
|
|
65
|
+
this.system = info.system;
|
|
66
|
+
this.operator = info.operator;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { BaseObject, BaseObjectParams, Degrees, Kilometers } from 'ootk-core';
|
|
19
|
+
/* eslint-disable class-methods-use-this */
|
|
20
|
+
|
|
21
|
+
export interface LandObjectParams extends BaseObjectParams {
|
|
22
|
+
lat: Degrees;
|
|
23
|
+
lon: Degrees;
|
|
24
|
+
alt: Kilometers;
|
|
25
|
+
country?: string;
|
|
26
|
+
Code?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class LandObject extends BaseObject {
|
|
30
|
+
lat: Degrees;
|
|
31
|
+
lon: Degrees;
|
|
32
|
+
alt: Kilometers;
|
|
33
|
+
country?: string;
|
|
34
|
+
Code?: string;
|
|
35
|
+
|
|
36
|
+
constructor(info: LandObjectParams) {
|
|
37
|
+
super(info);
|
|
38
|
+
this.lat = info.lat;
|
|
39
|
+
this.lon = info.lon;
|
|
40
|
+
this.alt = info.alt;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
isLandObject() {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { BaseObject } from 'ootk-core';
|
|
19
|
+
/* eslint-disable class-methods-use-this */
|
|
20
|
+
|
|
21
|
+
export class Marker extends BaseObject {
|
|
22
|
+
isMarker() {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2024 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { DEG2RAD, Degrees, RAD2DEG, Radians, Sensor, SpaceObjectType } from 'ootk-core';
|
|
25
|
+
import { azel2uv, uv2azel, RfSensorParams } from '../main';
|
|
26
|
+
|
|
27
|
+
export class RfSensor extends Sensor {
|
|
28
|
+
coneHalfAngle: Degrees;
|
|
29
|
+
boresightAz: Degrees;
|
|
30
|
+
boresightEl: Degrees;
|
|
31
|
+
|
|
32
|
+
constructor(info: RfSensorParams) {
|
|
33
|
+
super(info);
|
|
34
|
+
|
|
35
|
+
switch (info.type) {
|
|
36
|
+
case SpaceObjectType.BISTATIC_RADIO_TELESCOPE:
|
|
37
|
+
case SpaceObjectType.MECHANICAL:
|
|
38
|
+
case SpaceObjectType.PHASED_ARRAY_RADAR:
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
throw new Error('Invalid sensor type');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
this.coneHalfAngle = info.coneHalfAngle;
|
|
45
|
+
this.boresightAz = info.boresightAz;
|
|
46
|
+
this.boresightEl = info.boresightEl;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
uvFromAzEl(az: Degrees, el: Degrees) {
|
|
50
|
+
const azRad = (az * DEG2RAD) as Radians;
|
|
51
|
+
const elRad = (el * DEG2RAD) as Radians;
|
|
52
|
+
const azDiff = (azRad - this.boresightAzRad) as Radians;
|
|
53
|
+
const elDiff = (elRad - this.boresightElRad) as Radians;
|
|
54
|
+
|
|
55
|
+
return azel2uv(azDiff, elDiff, this.coneHalfAngleRad);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
azElFromUV(u: number, v: number) {
|
|
59
|
+
const { az, el } = uv2azel(u, v, this.coneHalfAngleRad);
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
az: ((az + this.boresightAz) * RAD2DEG) as Degrees,
|
|
63
|
+
el: ((el + this.boresightEl) * RAD2DEG) as Degrees,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get boresightAzRad() {
|
|
68
|
+
return (this.boresightAz * DEG2RAD) as Radians;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get boresightElRad() {
|
|
72
|
+
return (this.boresightEl * DEG2RAD) as Radians;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get coneHalfAngleRad() {
|
|
76
|
+
return (this.coneHalfAngle * DEG2RAD) as Radians;
|
|
77
|
+
}
|
|
78
|
+
}
|