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,54 @@
|
|
|
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
|
+
import { EpochUTC, J2000, Seconds } from 'ootk-core';
|
|
18
|
+
import { ForceModel } from '../force/ForceModel';
|
|
19
|
+
import { Thrust } from '../force/Thrust';
|
|
20
|
+
import { VerletBlendInterpolator } from './../interpolator/VerletBlendInterpolator';
|
|
21
|
+
import { Propagator } from './Propagator';
|
|
22
|
+
export declare abstract class RungeKuttaAdaptive extends Propagator {
|
|
23
|
+
private initState_;
|
|
24
|
+
private forceModel_;
|
|
25
|
+
private tolerance_;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new [RungeKuttaAdaptive] object from an initial state vector
|
|
28
|
+
* along with an optional [ForceModel] and [tolerance].
|
|
29
|
+
* @param initState_ Initial state vector.
|
|
30
|
+
* @param forceModel_ Numerical integration force model.
|
|
31
|
+
* @param tolerance_ Minimum allowable local error tolerance.
|
|
32
|
+
*/
|
|
33
|
+
constructor(initState_: J2000, forceModel_?: ForceModel, tolerance_?: number);
|
|
34
|
+
private _cacheState;
|
|
35
|
+
private readonly _checkpoints;
|
|
36
|
+
private _stepSize;
|
|
37
|
+
private static readonly _minTolerance;
|
|
38
|
+
protected abstract get a(): Float64Array;
|
|
39
|
+
protected abstract get b(): Float64Array[];
|
|
40
|
+
protected abstract get ch(): Float64Array;
|
|
41
|
+
protected abstract get c(): Float64Array;
|
|
42
|
+
protected abstract get order(): number;
|
|
43
|
+
get state(): J2000;
|
|
44
|
+
reset(): void;
|
|
45
|
+
setForceModel(forceModel: ForceModel): void;
|
|
46
|
+
private kfn_;
|
|
47
|
+
private integrate_;
|
|
48
|
+
propagate(epoch: EpochUTC): J2000;
|
|
49
|
+
maneuver(maneuver: Thrust, interval?: Seconds): J2000[];
|
|
50
|
+
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
51
|
+
checkpoint(): number;
|
|
52
|
+
clearCheckpoints(): void;
|
|
53
|
+
restore(index: number): void;
|
|
54
|
+
}
|
|
@@ -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
|
+
import { J2000, Vector } from 'ootk-core';
|
|
18
|
+
import { ForceModel } from '../force/ForceModel';
|
|
19
|
+
import { VerletBlendInterpolator } from './../interpolator/VerletBlendInterpolator';
|
|
20
|
+
import { Propagator } from './Propagator';
|
|
21
|
+
import { RkCheckpoint } from './RkCheckpoint';
|
|
22
|
+
import { RkResult } from './RkResult';
|
|
23
|
+
// / Adaptive Runge-Kutta propagator base class.
|
|
24
|
+
export class RungeKuttaAdaptive extends Propagator {
|
|
25
|
+
initState_;
|
|
26
|
+
forceModel_;
|
|
27
|
+
tolerance_;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new [RungeKuttaAdaptive] object from an initial state vector
|
|
30
|
+
* along with an optional [ForceModel] and [tolerance].
|
|
31
|
+
* @param initState_ Initial state vector.
|
|
32
|
+
* @param forceModel_ Numerical integration force model.
|
|
33
|
+
* @param tolerance_ Minimum allowable local error tolerance.
|
|
34
|
+
*/
|
|
35
|
+
constructor(initState_, forceModel_ = new ForceModel().setGravity(), tolerance_ = 1e-9) {
|
|
36
|
+
super();
|
|
37
|
+
this.initState_ = initState_;
|
|
38
|
+
this.forceModel_ = forceModel_;
|
|
39
|
+
this.tolerance_ = tolerance_;
|
|
40
|
+
this._cacheState = this.initState_;
|
|
41
|
+
this.tolerance_ = Math.max(RungeKuttaAdaptive._minTolerance, Math.abs(tolerance_));
|
|
42
|
+
}
|
|
43
|
+
// / Initial state vector.
|
|
44
|
+
_cacheState;
|
|
45
|
+
_checkpoints = [];
|
|
46
|
+
// / Integration step size _(seconds)_.
|
|
47
|
+
_stepSize = 60.0;
|
|
48
|
+
// / Minimum allowable local error tolerance.
|
|
49
|
+
static _minTolerance = 1e-15;
|
|
50
|
+
get state() {
|
|
51
|
+
return this._cacheState;
|
|
52
|
+
}
|
|
53
|
+
reset() {
|
|
54
|
+
this._cacheState = this.initState_;
|
|
55
|
+
this._stepSize = 60.0;
|
|
56
|
+
}
|
|
57
|
+
// / Set numerical integration force model.
|
|
58
|
+
setForceModel(forceModel) {
|
|
59
|
+
this.forceModel_ = forceModel;
|
|
60
|
+
}
|
|
61
|
+
kfn_(epoch, rv, hArg, kArg, step) {
|
|
62
|
+
const t = epoch.roll(hArg * step);
|
|
63
|
+
const rvNew = rv.add(kArg);
|
|
64
|
+
const sample = new J2000(t, rvNew.toVector3D(0), rvNew.toVector3D(3));
|
|
65
|
+
return this.forceModel_.derivative(sample).scale(step);
|
|
66
|
+
}
|
|
67
|
+
integrate_(state, step) {
|
|
68
|
+
const k = new Array(this.a.length).fill(Vector.origin3);
|
|
69
|
+
const y = state.position.join(state.velocity);
|
|
70
|
+
for (let i = 0; i < this.a.length; i++) {
|
|
71
|
+
let kArg = Vector.origin6;
|
|
72
|
+
if (i !== 0) {
|
|
73
|
+
for (let j = 0; j < i; j++) {
|
|
74
|
+
kArg = kArg.add(k[j].scale(this.b[i][j]));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
k[i] = this.kfn_(state.epoch, y, this.a[i], kArg, step);
|
|
78
|
+
}
|
|
79
|
+
let y1 = y;
|
|
80
|
+
let y2 = y;
|
|
81
|
+
for (let i = 0; i < k.length; i++) {
|
|
82
|
+
y1 = y1.add(k[i].scale(this.ch[i]));
|
|
83
|
+
y2 = y2.add(k[i].scale(this.c[i]));
|
|
84
|
+
}
|
|
85
|
+
const teVal = y1.distance(y2);
|
|
86
|
+
let hNew = 0.9 * step * (this.tolerance_ / teVal) ** (1.0 / this.order);
|
|
87
|
+
const hOld = Math.abs(step);
|
|
88
|
+
hNew = Math.max(0.2 * hOld, Math.min(5.0 * hOld, hNew));
|
|
89
|
+
hNew = Math.max(1e-5, Math.min(1000.0, hNew));
|
|
90
|
+
return new RkResult(new J2000(state.epoch.roll(step), y1.toVector3D(0), y1.toVector3D(3)), teVal, hNew);
|
|
91
|
+
}
|
|
92
|
+
propagate(epoch) {
|
|
93
|
+
let delta = epoch.difference(this._cacheState.epoch);
|
|
94
|
+
while (delta !== 0) {
|
|
95
|
+
const direction = delta >= 0 ? 1 : -1;
|
|
96
|
+
const dt = Math.min(Math.abs(delta), this._stepSize) * direction;
|
|
97
|
+
const result = this.integrate_(this._cacheState, dt);
|
|
98
|
+
this._stepSize = result.newStep;
|
|
99
|
+
if (result.error > this.tolerance_) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
this._cacheState = result.state;
|
|
103
|
+
delta = epoch.difference(this._cacheState.epoch);
|
|
104
|
+
}
|
|
105
|
+
return this._cacheState;
|
|
106
|
+
}
|
|
107
|
+
maneuver(maneuver, interval = 60.0) {
|
|
108
|
+
if (maneuver.isImpulsive) {
|
|
109
|
+
this._cacheState = maneuver.apply(this.propagate(maneuver.center));
|
|
110
|
+
return [this._cacheState];
|
|
111
|
+
}
|
|
112
|
+
let tState = this.propagate(maneuver.start);
|
|
113
|
+
this.forceModel_.loadManeuver(maneuver);
|
|
114
|
+
const ephemeris = [tState];
|
|
115
|
+
while (tState.epoch < maneuver.stop) {
|
|
116
|
+
const step = Math.min(maneuver.stop.difference(tState.epoch), interval);
|
|
117
|
+
tState = this.propagate(tState.epoch.roll(step));
|
|
118
|
+
ephemeris.push(tState);
|
|
119
|
+
}
|
|
120
|
+
this.forceModel_.clearManeuver();
|
|
121
|
+
return ephemeris;
|
|
122
|
+
}
|
|
123
|
+
ephemerisManeuver(start, finish, maneuvers, interval = 60.0) {
|
|
124
|
+
const tMvr = maneuvers.filter((mvr) => mvr.start >= start || mvr.stop <= finish);
|
|
125
|
+
const ephemeris = [];
|
|
126
|
+
if (tMvr[0].start > start) {
|
|
127
|
+
ephemeris.push(this.propagate(start));
|
|
128
|
+
}
|
|
129
|
+
for (const mvr of tMvr) {
|
|
130
|
+
while (this._cacheState.epoch < mvr.start) {
|
|
131
|
+
const step = Math.min(mvr.start.difference(this._cacheState.epoch), interval);
|
|
132
|
+
this.propagate(this._cacheState.epoch.roll(step));
|
|
133
|
+
if (this._cacheState.epoch.posix !== mvr.start.posix) {
|
|
134
|
+
ephemeris.push(this._cacheState);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
ephemeris.push(...this.maneuver(mvr, interval));
|
|
138
|
+
}
|
|
139
|
+
while (this._cacheState.epoch.posix < finish.posix) {
|
|
140
|
+
const step = Math.min(finish.difference(this._cacheState.epoch), interval);
|
|
141
|
+
this.propagate(this._cacheState.epoch.roll(step));
|
|
142
|
+
ephemeris.push(this._cacheState);
|
|
143
|
+
}
|
|
144
|
+
return new VerletBlendInterpolator(ephemeris);
|
|
145
|
+
}
|
|
146
|
+
checkpoint() {
|
|
147
|
+
this._checkpoints.push(new RkCheckpoint(this._cacheState, this._stepSize));
|
|
148
|
+
return this._checkpoints.length - 1;
|
|
149
|
+
}
|
|
150
|
+
clearCheckpoints() {
|
|
151
|
+
this._checkpoints.length = 0;
|
|
152
|
+
}
|
|
153
|
+
restore(index) {
|
|
154
|
+
const checkpoint = this._checkpoints[index];
|
|
155
|
+
this._cacheState = checkpoint.cacheState;
|
|
156
|
+
this._stepSize = checkpoint.stepSize;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=RungeKuttaAdaptive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RungeKuttaAdaptive.js","sourceRoot":"","sources":["../../src/propagator/RungeKuttaAdaptive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,EAA4C,MAAM,EAAY,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,gDAAgD;AAChD,MAAM,OAAgB,kBAAmB,SAAQ,UAAU;IAS/C;IACA;IACA;IAVV;;;;;;OAMG;IACH,YACU,UAAiB,EACjB,cAA0B,IAAI,UAAU,EAAE,CAAC,UAAU,EAAE,EACvD,aAAqB,IAAI;QAEjC,KAAK,EAAE,CAAC;QAJA,eAAU,G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CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAY,CAAC;YAEtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAClD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAClC;QAED,OAAO,IAAI,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAE5C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;IACvC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import { EpochUTC, J2000, Tle } from 'ootk-core';
|
|
18
|
+
import { Thrust } from '../force/Thrust';
|
|
19
|
+
import { VerletBlendInterpolator } from '../interpolator/VerletBlendInterpolator';
|
|
20
|
+
import { Propagator } from './Propagator';
|
|
21
|
+
export declare class Sgp4Propagator extends Propagator {
|
|
22
|
+
private tle;
|
|
23
|
+
constructor(tle: Tle);
|
|
24
|
+
private _cacheState;
|
|
25
|
+
private _checkpoints;
|
|
26
|
+
get state(): J2000;
|
|
27
|
+
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: number): VerletBlendInterpolator;
|
|
28
|
+
maneuver(maneuver: Thrust, interval?: number): J2000[];
|
|
29
|
+
propagate(epoch: EpochUTC): J2000;
|
|
30
|
+
reset(): void;
|
|
31
|
+
checkpoint(): number;
|
|
32
|
+
clearCheckpoints(): void;
|
|
33
|
+
restore(index: number): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { Propagator } from './Propagator';
|
|
18
|
+
// / SGP4 propagator.
|
|
19
|
+
export class Sgp4Propagator extends Propagator {
|
|
20
|
+
tle;
|
|
21
|
+
// / Create a new [Sgp4Propagator] object from a [TLE].
|
|
22
|
+
constructor(tle) {
|
|
23
|
+
super();
|
|
24
|
+
this.tle = tle;
|
|
25
|
+
this._cacheState = tle.state.toJ2000();
|
|
26
|
+
}
|
|
27
|
+
_cacheState;
|
|
28
|
+
_checkpoints = [];
|
|
29
|
+
get state() {
|
|
30
|
+
return this._cacheState;
|
|
31
|
+
}
|
|
32
|
+
ephemerisManeuver(start, finish, maneuvers, interval = 60.0) {
|
|
33
|
+
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
34
|
+
}
|
|
35
|
+
maneuver(maneuver, interval = 60.0) {
|
|
36
|
+
throw new Error('Maneuvers cannot be modelled with SGP4.');
|
|
37
|
+
}
|
|
38
|
+
propagate(epoch) {
|
|
39
|
+
this._cacheState = this.tle.propagate(epoch).toJ2000();
|
|
40
|
+
return this._cacheState;
|
|
41
|
+
}
|
|
42
|
+
reset() {
|
|
43
|
+
this._cacheState = this.tle.state.toJ2000();
|
|
44
|
+
}
|
|
45
|
+
checkpoint() {
|
|
46
|
+
this._checkpoints.push(this._cacheState);
|
|
47
|
+
return this._checkpoints.length - 1;
|
|
48
|
+
}
|
|
49
|
+
clearCheckpoints() {
|
|
50
|
+
this._checkpoints = [];
|
|
51
|
+
}
|
|
52
|
+
restore(index) {
|
|
53
|
+
this._cacheState = this._checkpoints[index];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Sgp4Propagator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sgp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,CAAC;IACzB,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import { EpochUTC } from 'ootk-core';
|
|
18
|
+
export declare class ExponentialSmoothing {
|
|
19
|
+
private constructor();
|
|
20
|
+
static smooth(xs: number[], alpha: number): number[];
|
|
21
|
+
static smoothDouble(xs: number[], alpha: number, beta: number): number[];
|
|
22
|
+
static smoothTime(epochs: EpochUTC[], xs: number[], timeConstant: number): number[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
// / Exponential data smoothing methods.
|
|
18
|
+
export class ExponentialSmoothing {
|
|
19
|
+
constructor() {
|
|
20
|
+
// disable constructor
|
|
21
|
+
}
|
|
22
|
+
/*
|
|
23
|
+
* Perform exponential smoothing on data set [xs] using the provided
|
|
24
|
+
* data smoothing factor [alpha] _(0.0 <= alpha <= 1.0)_.
|
|
25
|
+
*/
|
|
26
|
+
static smooth(xs, alpha) {
|
|
27
|
+
const ss = [];
|
|
28
|
+
for (let i = 0; i < xs.length; i++) {
|
|
29
|
+
if (i === 0) {
|
|
30
|
+
ss.push(xs[0]);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
ss.push(alpha * xs[i] + (1 - alpha) * ss[i - 1]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return ss;
|
|
37
|
+
}
|
|
38
|
+
/*
|
|
39
|
+
* Perform exponential smoothing on data set [xs] using the provided data
|
|
40
|
+
* smoothing factor [alpha] _(0.0 <= alpha <= 1.0)_ and trend smoothing
|
|
41
|
+
* factor [beta] _(0.0 <= beta <= 1.0)_.
|
|
42
|
+
*/
|
|
43
|
+
static smoothDouble(xs, alpha, beta) {
|
|
44
|
+
const bs = [];
|
|
45
|
+
const ss = [];
|
|
46
|
+
for (let i = 0; i < xs.length; i++) {
|
|
47
|
+
if (i === 0) {
|
|
48
|
+
ss.push(xs[0]);
|
|
49
|
+
bs.push(xs[1] - xs[0]);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
ss.push(alpha * xs[i] + (1 - alpha) * (ss[i - 1] + bs[i - 1]));
|
|
53
|
+
bs.push(beta * (ss[i] - ss[i - 1]) + (1 - beta) * bs[i - 1]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return ss;
|
|
57
|
+
}
|
|
58
|
+
/*
|
|
59
|
+
* Perform exponential smoothing on time series data set [xs] correlated
|
|
60
|
+
* with the [epochs] array using the provided [timeConstant]
|
|
61
|
+
* value _(seconds)_.
|
|
62
|
+
*
|
|
63
|
+
* Note: the [timeConstant] is the amount of time for the smoothed response
|
|
64
|
+
* of a unit step function to reach ~63.2% of the original signal.
|
|
65
|
+
*/
|
|
66
|
+
static smoothTime(epochs, xs, timeConstant) {
|
|
67
|
+
const ts = epochs.map((e) => e.posix);
|
|
68
|
+
const ss = [];
|
|
69
|
+
for (let i = 0; i < xs.length; i++) {
|
|
70
|
+
if (i === 0) {
|
|
71
|
+
ss.push(xs[0]);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const a = 1 - Math.exp(-(ts[i] - ts[i - 1]) / timeConstant);
|
|
75
|
+
ss.push(a * xs[i] + (1 - a) * ss[i - 1]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return ss;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ExponentialSmoothing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentialSmoothing.js","sourceRoot":"","sources":["../../src/smoothing/ExponentialSmoothing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,wCAAwC;AACxC,MAAM,OAAO,oBAAoB;IAC/B;QACE,sBAAsB;IACxB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,EAAY,EAAE,KAAa;QACvC,MAAM,EAAE,GAAa,EAAE,CAAC;QAExB,KAAK,IAAI,C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AAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aAC9D;SACF;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,MAAkB,EAAE,EAAY,EAAE,YAAoB;QACtE,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,EAAE,GAAa,EAAE,CAAC;QAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACX,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAChB;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC;gBAE5D,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aAC1C;SACF;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './transforms';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transforms/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1,94 +1,58 @@
|
|
|
1
|
+
import { Degrees, EnuVec3, Radians, RaeVec3 } from 'ootk-core';
|
|
2
|
+
import { RfSensor } from 'src/objects/RfSensor';
|
|
3
|
+
import { RfVec3, RuvVec3 } from 'src/types/types';
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @license AGPL-3.0-or-later
|
|
11
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
12
|
-
*
|
|
13
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
14
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
15
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
16
|
-
*
|
|
17
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
18
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
19
|
-
* See the GNU Affero General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
22
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
5
|
+
* Converts Azimuth and Elevation to U and V.
|
|
6
|
+
* Azimuth is the angle off of boresight in the horizontal plane.
|
|
7
|
+
* Elevation is the angle off of boresight in the vertical plane.
|
|
8
|
+
* Cone half angle is the angle of the cone of the radar max field of view.
|
|
9
|
+
* @param az - Azimuth in radians
|
|
10
|
+
* @param el - Elevation in radians
|
|
11
|
+
* @param coneHalfAngle - Cone half angle in radians
|
|
12
|
+
* @returns U and V in radians
|
|
23
13
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
v: Radians;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Converts U and V to Azimuth and Elevation off of boresight.
|
|
73
|
-
*/
|
|
74
|
-
static uv2azel(u: Radians, v: Radians, coneHalfAngle: Radians): {
|
|
75
|
-
az: Radians;
|
|
76
|
-
el: Radians;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Converts Range Az El to Range U V.
|
|
80
|
-
*/
|
|
81
|
-
static rae2ruv(rae: RaeVec3, sensor: RadarSensor, maxSensorAz: Degrees): RuvVec3;
|
|
82
|
-
/**
|
|
83
|
-
* Determine azimuth and elevation off of boresight based on sensor orientation and RAE.
|
|
84
|
-
*
|
|
85
|
-
* @param {rae} rae Range, Azimuth, Elevation
|
|
86
|
-
* @param {RadarSensor} sensor Radar sensor object
|
|
87
|
-
* @returns {az, el} Azimuth and Elevation off of boresight
|
|
88
|
-
*/
|
|
89
|
-
static rae2raeOffBoresight(rae: RaeVec3, sensor: RadarSensor, maxSensorAz: Degrees): {
|
|
90
|
-
az: Radians;
|
|
91
|
-
el: Radians;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export { Transforms };
|
|
14
|
+
export declare function azel2uv(az: Radians, el: Radians, coneHalfAngle: Radians): {
|
|
15
|
+
u: number;
|
|
16
|
+
v: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Determine azimuth and elevation off of boresight based on sensor orientation and RAE.
|
|
20
|
+
* @param rae Range, Azimuth, Elevation
|
|
21
|
+
* @param sensor Radar sensor object
|
|
22
|
+
* @param maxSensorAz Maximum sensor azimuth
|
|
23
|
+
* @returns Azimuth and Elevation off of boresight
|
|
24
|
+
*/
|
|
25
|
+
export declare function rae2raeOffBoresight(rae: RaeVec3, sensor: RfSensor, maxSensorAz: Degrees): {
|
|
26
|
+
az: Radians;
|
|
27
|
+
el: Radians;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Converts Range Az El to Range U V.
|
|
31
|
+
* @param rae Range, Azimuth, Elevation
|
|
32
|
+
* @param sensor Radar sensor object
|
|
33
|
+
* @param maxSensorAz Maximum sensor azimuth
|
|
34
|
+
* @returns Range, U, V
|
|
35
|
+
*/
|
|
36
|
+
export declare function rae2ruv(rae: RaeVec3, sensor: RfSensor, maxSensorAz: Degrees): RuvVec3;
|
|
37
|
+
/**
|
|
38
|
+
* Converts U and V to Azimuth and Elevation off of boresight.
|
|
39
|
+
* @param u The U coordinate.
|
|
40
|
+
* @param v The V coordinate.
|
|
41
|
+
* @param coneHalfAngle The cone half angle of the radar.
|
|
42
|
+
* @returns Azimuth and Elevation off of boresight.
|
|
43
|
+
*/
|
|
44
|
+
export declare function uv2azel(u: number, v: number, coneHalfAngle: Radians): {
|
|
45
|
+
az: Radians;
|
|
46
|
+
el: Radians;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Converts coordinates from East-North-Up (ENU) to Right-Front-Up (RF) coordinate system.
|
|
50
|
+
* @param enu - The ENU coordinates to be converted.
|
|
51
|
+
* @param enu.x - The east coordinate.
|
|
52
|
+
* @param enu.y - The north coordinate.
|
|
53
|
+
* @param enu.z - The up coordinate.
|
|
54
|
+
* @param az - The azimuth angle in radians.
|
|
55
|
+
* @param el - The elevation angle in radians.
|
|
56
|
+
* @returns The converted RF coordinates.
|
|
57
|
+
*/
|
|
58
|
+
export declare function enu2rf<D extends number, A extends number = Radians>({ x, y, z }: EnuVec3<D>, az: A, el: A): RfVec3<D>;
|