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,162 @@
|
|
|
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
|
+
import { VerletBlendInterpolator } from '../interpolator/VerletBlendInterpolator';
|
|
19
|
+
import { GoldenSection } from './../optimize/GoldenSection';
|
|
20
|
+
// Propagator base class.
|
|
21
|
+
export class Propagator {
|
|
22
|
+
/*
|
|
23
|
+
* Generate a [VerletBlendInterpolator] containing ephemeris over the
|
|
24
|
+
* [start] and [stop] propagation period, with an optional
|
|
25
|
+
* ephemeris [interval].
|
|
26
|
+
*/
|
|
27
|
+
ephemeris(start, stop, interval = 60.0) {
|
|
28
|
+
const output = [this.propagate(start)];
|
|
29
|
+
let tempEpoch = start;
|
|
30
|
+
while (tempEpoch <= stop) {
|
|
31
|
+
tempEpoch = tempEpoch.roll(interval);
|
|
32
|
+
output.push(this.propagate(tempEpoch));
|
|
33
|
+
}
|
|
34
|
+
return new VerletBlendInterpolator(output);
|
|
35
|
+
}
|
|
36
|
+
/*
|
|
37
|
+
* Generate a list of [J2000] states integrating over a maneuver.
|
|
38
|
+
*
|
|
39
|
+
* If the maneuver is impulsive, the list will only contain a single state.
|
|
40
|
+
*/
|
|
41
|
+
maneuver(maneuver, interval = 60.0) {
|
|
42
|
+
const output = [];
|
|
43
|
+
const tempEpoch = maneuver.start;
|
|
44
|
+
const stop = maneuver.stop;
|
|
45
|
+
output.push(this.propagate(tempEpoch));
|
|
46
|
+
let current = tempEpoch;
|
|
47
|
+
while (current <= stop) {
|
|
48
|
+
current = current.roll(interval);
|
|
49
|
+
output.push(this.propagate(current));
|
|
50
|
+
}
|
|
51
|
+
return output;
|
|
52
|
+
}
|
|
53
|
+
/*
|
|
54
|
+
* Generate a [VerletBlendInterpolator] containing maneuver ephemeris over
|
|
55
|
+
* the [start] and [finish] interval, with an optional ephemeris [interval].
|
|
56
|
+
*/
|
|
57
|
+
ephemerisManeuver(start, finish, maneuvers, interval = 60.0) {
|
|
58
|
+
const output = [];
|
|
59
|
+
const tempEpoch = start;
|
|
60
|
+
output.push(this.propagate(tempEpoch));
|
|
61
|
+
const stop = finish;
|
|
62
|
+
let current = tempEpoch;
|
|
63
|
+
while (current <= stop) {
|
|
64
|
+
current = current.roll(interval);
|
|
65
|
+
output.push(this.propagate(current));
|
|
66
|
+
}
|
|
67
|
+
return new VerletBlendInterpolator(output);
|
|
68
|
+
}
|
|
69
|
+
// Return the epoch of the ascending node after the [start] epoch.
|
|
70
|
+
ascendingNodeEpoch(start) {
|
|
71
|
+
const period = this.state.period / 60;
|
|
72
|
+
const step = period / 8;
|
|
73
|
+
let current = start;
|
|
74
|
+
const stop = current.roll(period);
|
|
75
|
+
this.propagate(current);
|
|
76
|
+
let previous = this.state.position.z;
|
|
77
|
+
while (current <= stop) {
|
|
78
|
+
current = current.roll(step);
|
|
79
|
+
this.propagate(current);
|
|
80
|
+
if (Math.sign(this.state.position.z) === Math.sign(-previous) && this.state.velocity.z > 0) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
previous = this.state.position.z;
|
|
84
|
+
}
|
|
85
|
+
const t = GoldenSection.search((x) => {
|
|
86
|
+
this.propagate(new EpochUTC(x));
|
|
87
|
+
return Math.abs(this.state.position.z);
|
|
88
|
+
}, current.posix - step, current.posix, { tolerance: 1e-3 });
|
|
89
|
+
return new EpochUTC(t);
|
|
90
|
+
}
|
|
91
|
+
// Return the epoch of the descending node after the [start] epoch.
|
|
92
|
+
descendingNodeEpoch(start) {
|
|
93
|
+
const period = this.state.period / 60;
|
|
94
|
+
const step = period / 8;
|
|
95
|
+
let current = start;
|
|
96
|
+
const stop = current.roll(period);
|
|
97
|
+
this.propagate(current);
|
|
98
|
+
let previous = this.state.position.z;
|
|
99
|
+
while (current <= stop) {
|
|
100
|
+
current = current.roll(step);
|
|
101
|
+
this.propagate(current);
|
|
102
|
+
if (Math.sign(this.state.position.z) === Math.sign(-previous) && this.state.velocity.z < 0) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
previous = this.state.position.z;
|
|
106
|
+
}
|
|
107
|
+
const t = GoldenSection.search((x) => {
|
|
108
|
+
this.propagate(new EpochUTC(x));
|
|
109
|
+
return Math.abs(this.state.position.z);
|
|
110
|
+
}, current.posix - step, current.posix, { tolerance: 1e-3 });
|
|
111
|
+
return new EpochUTC(t);
|
|
112
|
+
}
|
|
113
|
+
// Return the epoch of apogee after the [start] epoch.
|
|
114
|
+
apogeeEpoch(start) {
|
|
115
|
+
const slice = 8;
|
|
116
|
+
const period = this.state.period / 60;
|
|
117
|
+
const step = period / slice;
|
|
118
|
+
let current = start;
|
|
119
|
+
this.propagate(current);
|
|
120
|
+
let tCache = current;
|
|
121
|
+
let rCache = this.state.position.magnitude();
|
|
122
|
+
for (let i = 0; i < slice; i++) {
|
|
123
|
+
current = current.roll(step);
|
|
124
|
+
const t = new EpochUTC(GoldenSection.search((x) => {
|
|
125
|
+
this.propagate(new EpochUTC(x));
|
|
126
|
+
return this.state.position.magnitude();
|
|
127
|
+
}, current.posix - step, current.posix, { tolerance: 1e-3, solveMax: true }));
|
|
128
|
+
this.propagate(t);
|
|
129
|
+
const r = this.state.position.magnitude();
|
|
130
|
+
if (r > rCache) {
|
|
131
|
+
tCache = t;
|
|
132
|
+
rCache = r;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return tCache;
|
|
136
|
+
}
|
|
137
|
+
// Return the epoch of perigee after the [start] epoch.
|
|
138
|
+
perigeeEpoch(start) {
|
|
139
|
+
const slice = 8;
|
|
140
|
+
const period = this.state.period / 60;
|
|
141
|
+
const step = period / slice;
|
|
142
|
+
let current = start;
|
|
143
|
+
this.propagate(current);
|
|
144
|
+
let tCache = current;
|
|
145
|
+
let rCache = this.state.position.magnitude();
|
|
146
|
+
for (let i = 0; i < slice; i++) {
|
|
147
|
+
current = current.roll(step);
|
|
148
|
+
const t = new EpochUTC(GoldenSection.search((x) => {
|
|
149
|
+
this.propagate(new EpochUTC(x));
|
|
150
|
+
return this.state.position.magnitude();
|
|
151
|
+
}, current.posix - step, current.posix, { tolerance: 1e-3, solveMax: false }));
|
|
152
|
+
this.propagate(t);
|
|
153
|
+
const r = this.state.position.magnitude();
|
|
154
|
+
if (r < rCache) {
|
|
155
|
+
tCache = t;
|
|
156
|
+
rCache = r;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return tCache;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=Propagator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Propagator.js","sourceRoot":"","sources":["../../src/propagator/Propagator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAkB,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,yBAAyB;AACzB,MAAM,OAAgB,UAAU;IAI9B;;;;OAIG;IACH,SAAS,CAAC,KAAe,EAAE,IAAc,EAAE,WAAW,IAAe;QACnE,MAAM,MAAM,GAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAChD,IAAI,SAAS,GAA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G,CAAC,CAAC;aACZ;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 } from 'ootk-core';
|
|
18
|
+
export declare class RkCheckpoint {
|
|
19
|
+
cacheState: J2000;
|
|
20
|
+
stepSize: number;
|
|
21
|
+
constructor(cacheState: J2000, stepSize: number);
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
// / Runge-Kutta adaptive state checkpoint.
|
|
18
|
+
export class RkCheckpoint {
|
|
19
|
+
cacheState;
|
|
20
|
+
stepSize;
|
|
21
|
+
constructor(cacheState, stepSize) {
|
|
22
|
+
this.cacheState = cacheState;
|
|
23
|
+
this.stepSize = stepSize;
|
|
24
|
+
// Nothing to do here.
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=RkCheckpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RkCheckpoint.js","sourceRoot":"","sources":["../../src/propagator/RkCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,2CAA2C;AAC3C,MAAM,OAAO,YAAY;IACJ;IAA0B;IAA7C,YAAmB,UAAiB,EAAS,QAAgB;QAA1C,eAAU,GAAV,UAAU,CAAO;QAAS,aAAQ,GAAR,QAAQ,CAAQ;QAC3D,sBAAsB;IACxB,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 { J2000 } from 'ootk-core';
|
|
18
|
+
export declare class RkResult {
|
|
19
|
+
state: J2000;
|
|
20
|
+
error: number;
|
|
21
|
+
newStep: number;
|
|
22
|
+
constructor(state: J2000, error: number, newStep: number);
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
// / Result of adaptive numerical integration.
|
|
18
|
+
export class RkResult {
|
|
19
|
+
state;
|
|
20
|
+
error;
|
|
21
|
+
newStep;
|
|
22
|
+
// / Create a new [RkResult] object.
|
|
23
|
+
constructor(state, error, newStep) {
|
|
24
|
+
this.state = state;
|
|
25
|
+
this.error = error;
|
|
26
|
+
this.newStep = newStep;
|
|
27
|
+
// Nothing to do here.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=RkResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RkResult.js","sourceRoot":"","sources":["../../src/propagator/RkResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,8CAA8C;AAC9C,MAAM,OAAO,QAAQ;IAEA;IAAqB;IAAsB;IAD9D,oCAAoC;IACpC,YAAmB,KAAY,EAAS,KAAa,EAAS,OAAe;QAA1D,UAAK,GAAL,KAAK,CAAO;QAAS,UAAK,GAAL,KAAK,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAQ;QAC3E,sBAAsB;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 class RungeKutta4Propagator extends Propagator {
|
|
23
|
+
private initState_;
|
|
24
|
+
private forceModel_;
|
|
25
|
+
private stepSize_;
|
|
26
|
+
private cacheState_;
|
|
27
|
+
private checkpoints_;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new [RungeKutta4Propagator] object from an initial state vector and
|
|
30
|
+
* along with an optional [ForceModel] and [stepSize] in seconds.
|
|
31
|
+
* @param initState_ Initial state vector.
|
|
32
|
+
* @param forceModel_ Numerical integration force model.
|
|
33
|
+
* @param stepSize_ Integration step size _(seconds)_.
|
|
34
|
+
* @param cacheState_ Cached state vector.
|
|
35
|
+
* @param checkpoints_ Cached state vector checkpoints.
|
|
36
|
+
*/
|
|
37
|
+
constructor(initState_: J2000, forceModel_?: ForceModel, stepSize_?: number, cacheState_?: J2000, checkpoints_?: J2000[]);
|
|
38
|
+
setStepSize(seconds: number): void;
|
|
39
|
+
setForceModel(forceModel: ForceModel): void;
|
|
40
|
+
ephemerisManeuver(start: EpochUTC, finish: EpochUTC, maneuvers: Thrust[], interval?: Seconds): VerletBlendInterpolator;
|
|
41
|
+
maneuver(maneuver: Thrust, interval?: number): J2000[];
|
|
42
|
+
private _kFn;
|
|
43
|
+
private _integrate;
|
|
44
|
+
propagate(epoch: EpochUTC): J2000;
|
|
45
|
+
reset(): void;
|
|
46
|
+
get state(): J2000;
|
|
47
|
+
checkpoint(): number;
|
|
48
|
+
clearCheckpoints(): void;
|
|
49
|
+
restore(index: number): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
// / Runge-Kutta 4 fixed numerical propagator.
|
|
22
|
+
export class RungeKutta4Propagator extends Propagator {
|
|
23
|
+
initState_;
|
|
24
|
+
forceModel_;
|
|
25
|
+
stepSize_;
|
|
26
|
+
cacheState_;
|
|
27
|
+
checkpoints_;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new [RungeKutta4Propagator] object from an initial state vector and
|
|
30
|
+
* along with an optional [ForceModel] and [stepSize] in seconds.
|
|
31
|
+
* @param initState_ Initial state vector.
|
|
32
|
+
* @param forceModel_ Numerical integration force model.
|
|
33
|
+
* @param stepSize_ Integration step size _(seconds)_.
|
|
34
|
+
* @param cacheState_ Cached state vector.
|
|
35
|
+
* @param checkpoints_ Cached state vector checkpoints.
|
|
36
|
+
*/
|
|
37
|
+
constructor(initState_, forceModel_ = new ForceModel().setGravity(), stepSize_ = 15.0, cacheState_ = initState_, checkpoints_ = []) {
|
|
38
|
+
super();
|
|
39
|
+
this.initState_ = initState_;
|
|
40
|
+
this.forceModel_ = forceModel_;
|
|
41
|
+
this.stepSize_ = stepSize_;
|
|
42
|
+
this.cacheState_ = cacheState_;
|
|
43
|
+
this.checkpoints_ = checkpoints_;
|
|
44
|
+
this.stepSize_ = Math.abs(stepSize_);
|
|
45
|
+
}
|
|
46
|
+
// / Set the integrator step size to the provided number of [seconds].
|
|
47
|
+
setStepSize(seconds) {
|
|
48
|
+
this.stepSize_ = Math.abs(seconds);
|
|
49
|
+
}
|
|
50
|
+
// / Set numerical integration force model.
|
|
51
|
+
setForceModel(forceModel) {
|
|
52
|
+
this.forceModel_ = forceModel;
|
|
53
|
+
}
|
|
54
|
+
ephemerisManeuver(start, finish, maneuvers, interval = 60.0) {
|
|
55
|
+
const tMvr = maneuvers.slice(0).filter((mvr) => mvr.start >= start || mvr.stop <= finish);
|
|
56
|
+
const ephemeris = [];
|
|
57
|
+
if (tMvr[0].start > start) {
|
|
58
|
+
ephemeris.push(this.propagate(start));
|
|
59
|
+
}
|
|
60
|
+
for (const mvr of tMvr) {
|
|
61
|
+
while (this.cacheState_.epoch < mvr.start) {
|
|
62
|
+
const step = Math.min(mvr.start.difference(this.cacheState_.epoch), interval);
|
|
63
|
+
this.propagate(this.cacheState_.epoch.roll(step));
|
|
64
|
+
if (this.cacheState_.epoch.posix !== mvr.start.posix) {
|
|
65
|
+
ephemeris.push(this.cacheState_);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
ephemeris.push(...this.maneuver(mvr, interval));
|
|
69
|
+
}
|
|
70
|
+
while (this.cacheState_.epoch.posix < finish.posix) {
|
|
71
|
+
const step = Math.min(finish.difference(this.cacheState_.epoch), interval);
|
|
72
|
+
this.propagate(this.cacheState_.epoch.roll(step));
|
|
73
|
+
ephemeris.push(this.cacheState_);
|
|
74
|
+
}
|
|
75
|
+
return new VerletBlendInterpolator(ephemeris);
|
|
76
|
+
}
|
|
77
|
+
maneuver(maneuver, interval = 60.0) {
|
|
78
|
+
if (maneuver.isImpulsive) {
|
|
79
|
+
this.cacheState_ = maneuver.apply(this.propagate(maneuver.center));
|
|
80
|
+
return [this.cacheState_];
|
|
81
|
+
}
|
|
82
|
+
let tState = this.propagate(maneuver.start);
|
|
83
|
+
this.forceModel_.loadManeuver(maneuver);
|
|
84
|
+
const ephemeris = [tState];
|
|
85
|
+
while (tState.epoch < maneuver.stop) {
|
|
86
|
+
const step = Math.min(maneuver.stop.difference(tState.epoch), interval);
|
|
87
|
+
tState = this.propagate(tState.epoch.roll(step));
|
|
88
|
+
ephemeris.push(tState);
|
|
89
|
+
}
|
|
90
|
+
this.forceModel_.clearManeuver();
|
|
91
|
+
return ephemeris;
|
|
92
|
+
}
|
|
93
|
+
_kFn(state, hArg, kArg) {
|
|
94
|
+
const epoch = state.epoch.roll(hArg);
|
|
95
|
+
const posvel = state.position.join(state.velocity);
|
|
96
|
+
const result = posvel.add(kArg);
|
|
97
|
+
const sample = new J2000(epoch, result.toVector3D(0), result.toVector3D(3));
|
|
98
|
+
return this.forceModel_.derivative(sample);
|
|
99
|
+
}
|
|
100
|
+
_integrate(state, step) {
|
|
101
|
+
const k1 = this._kFn(state, 0, Vector.zero(6)).scale(step);
|
|
102
|
+
const k2 = this._kFn(state, 0.5 * step, k1.scale(0.5)).scale(step);
|
|
103
|
+
const k3 = this._kFn(state, 0.5 * step, k2.scale(0.5)).scale(step);
|
|
104
|
+
const k4 = this._kFn(state, step, k3).scale(step);
|
|
105
|
+
const v1 = k1;
|
|
106
|
+
const v2 = v1.add(k2.scale(2));
|
|
107
|
+
const v3 = v2.add(k3.scale(2));
|
|
108
|
+
const v4 = v3.add(k4);
|
|
109
|
+
const tNext = state.epoch.roll(step);
|
|
110
|
+
const posvel = state.position.join(state.velocity);
|
|
111
|
+
const result = posvel.add(v4.scale(1 / 6));
|
|
112
|
+
return new J2000(tNext, result.toVector3D(0), result.toVector3D(3));
|
|
113
|
+
}
|
|
114
|
+
propagate(epoch) {
|
|
115
|
+
let delta = epoch.difference(this.cacheState_.epoch);
|
|
116
|
+
while (delta !== 0) {
|
|
117
|
+
const direction = delta >= 0 ? 1 : -1;
|
|
118
|
+
const dt = Math.min(Math.abs(delta), this.stepSize_) * direction;
|
|
119
|
+
this.cacheState_ = this._integrate(this.cacheState_, dt);
|
|
120
|
+
delta = epoch.difference(this.cacheState_.epoch);
|
|
121
|
+
}
|
|
122
|
+
return this.cacheState_;
|
|
123
|
+
}
|
|
124
|
+
reset() {
|
|
125
|
+
this.cacheState_ = this.initState_;
|
|
126
|
+
}
|
|
127
|
+
get state() {
|
|
128
|
+
return this.cacheState_;
|
|
129
|
+
}
|
|
130
|
+
checkpoint() {
|
|
131
|
+
this.checkpoints_.push(this.cacheState_);
|
|
132
|
+
return this.checkpoints_.length - 1;
|
|
133
|
+
}
|
|
134
|
+
clearCheckpoints() {
|
|
135
|
+
this.checkpoints_ = [];
|
|
136
|
+
}
|
|
137
|
+
restore(index) {
|
|
138
|
+
this.cacheState_ = this.checkpoints_[index];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=RungeKutta4Propagator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RungeKutta4Propagator.js","sourceRoot":"","sources":["../../src/propagator/RungeKutta4Propagator.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,yCAAyC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,8CAA8C;AAC9C,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IAWzC;IACA;IACA;IACA;IACA;IAdV;;;;;;;;OAQG;IACH,YACU,UAAiB,EACjB,cAA0B,IAAI,UAAU,EAAE,CAAC,UAAU,EAAE,EACvD,YAAoB,IAAI,EACxB,cAAqB,UAAU,EAC/B,eAAwB,EAAE;QAElC,KAAK,EAAE,CAAC;QANA,eAAU,GAAV,UAAU,CAAO;QACjB,gBAAW,GAAX,WAAW,CAA4C;QACvD,cAAS,GAAT,SAAS,CAAe;QACxB,gBAAW,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,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,SAAoB,CAAC;YAE5E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YACzD,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAClD;QAED,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;IACrC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzC,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,EAAE,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,28 @@
|
|
|
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 { RungeKuttaAdaptive } from './RungeKuttaAdaptive';
|
|
18
|
+
export declare class RungeKutta89Propagator extends RungeKuttaAdaptive {
|
|
19
|
+
private a_;
|
|
20
|
+
private b_;
|
|
21
|
+
private ch_;
|
|
22
|
+
private c_;
|
|
23
|
+
get a(): Float64Array;
|
|
24
|
+
get b(): Float64Array[];
|
|
25
|
+
get ch(): Float64Array;
|
|
26
|
+
get c(): Float64Array;
|
|
27
|
+
get order(): number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
/* eslint-disable @typescript-eslint/no-loss-of-precision */
|
|
18
|
+
/* eslint-disable class-methods-use-this */
|
|
19
|
+
import { RungeKuttaAdaptive } from './RungeKuttaAdaptive';
|
|
20
|
+
// / Runge-Kutta 8(9) adaptive numerical propagator.
|
|
21
|
+
export class RungeKutta89Propagator extends RungeKuttaAdaptive {
|
|
22
|
+
a_ = Float64Array.from([
|
|
23
|
+
0.0, 0.3462e-1, 0.9702435063878044594828361677100617517633e-1, 0.1455365259581706689224254251565092627645, 0.561,
|
|
24
|
+
0.2290079115904850126662751771814700052182, 0.5449920884095149873337248228185299947818, 0.645, 0.48375, 0.6757e-1,
|
|
25
|
+
0.25, 0.6590650618730998549405331618649220295334, 0.8206, 0.9012, 1.0, 1.0,
|
|
26
|
+
]);
|
|
27
|
+
b_ = [
|
|
28
|
+
new Float64Array(0),
|
|
29
|
+
Float64Array.from([0.3462e-1]),
|
|
30
|
+
Float64Array.from([-0.389335438857287327017042687229284478532e-1, 0.1359578945245091786499878854939346230295]),
|
|
31
|
+
Float64Array.from([0.3638413148954266723060635628912731569111e-1, 0.0, 0.1091523944686280016918190688673819470733]),
|
|
32
|
+
Float64Array.from([
|
|
33
|
+
2.025763914393969636805657604282571047511, 0.0, -7.638023836496292020387602153091964592952,
|
|
34
|
+
6.173259922102322383581944548809393545442,
|
|
35
|
+
]),
|
|
36
|
+
Float64Array.from([
|
|
37
|
+
0.5112275589406060872792270881648288397197e-1, 0.0, 0.0, 0.1770823794555021537929910813839068684087,
|
|
38
|
+
0.80277624092225014536138698108025283759e-3,
|
|
39
|
+
]),
|
|
40
|
+
Float64Array.from([
|
|
41
|
+
0.1316006357975216279279871693164256985334, 0.0, 0.0, -0.2957276252669636417685183174672273730699,
|
|
42
|
+
0.878137803564295237421124704053886667082e-1, 0.62130529752252747743214350056394300261,
|
|
43
|
+
]),
|
|
44
|
+
Float64Array.from([
|
|
45
|
+
0.7166666666666666666666666666666666666667e-1, 0.0, 0.0, 0.0, 0.0, 0.3305533578915319409260346730051472207728,
|
|
46
|
+
0.2427799754418013924072986603281861125606,
|
|
47
|
+
]),
|
|
48
|
+
Float64Array.from([
|
|
49
|
+
0.71806640625e-1, 0.0, 0.0, 0.0, 0.0, 0.3294380283228177160744825466257672816401,
|
|
50
|
+
0.1165190029271822839255174533742327183599, -0.34013671875e-1,
|
|
51
|
+
]),
|
|
52
|
+
Float64Array.from([
|
|
53
|
+
0.4836757646340646986611287718844085773549e-1, 0.0, 0.0, 0.0, 0.0, 0.3928989925676163974333190042057047002852e-1,
|
|
54
|
+
0.1054740945890344608263649267140088017604, -0.2143865284648312665982642293830533996214e-1,
|
|
55
|
+
-0.1041229174627194437759832813847147895623,
|
|
56
|
+
]),
|
|
57
|
+
Float64Array.from([
|
|
58
|
+
-0.2664561487201478635337289243849737340534e-1, 0.0, 0.0, 0.0, 0.0, 0.3333333333333333333333333333333333333333e-1,
|
|
59
|
+
-0.1631072244872467239162704487554706387141, 0.3396081684127761199487954930015522928244e-1,
|
|
60
|
+
0.1572319413814626097110769806810024118077, 0.215226747803187955230353477879477037696,
|
|
61
|
+
]),
|
|
62
|
+
Float64Array.from([
|
|
63
|
+
0.3689009248708622334786359863227633989718e-1, 0.0, 0.0, 0.0, 0.0, -0.1465181576725542928653609891758501156785,
|
|
64
|
+
0.2242577768172024345345469822625833796001, 0.2294405717066072637090897902753790803034e-1,
|
|
65
|
+
-0.35850052905728761357394424889330334334e-2, 0.8669223316444385506869203619044453906053e-1,
|
|
66
|
+
0.4383840651968337846196219974168630120572,
|
|
67
|
+
]),
|
|
68
|
+
Float64Array.from([
|
|
69
|
+
-0.4866012215113340846662212357570395295088, 0.0, 0.0, 0.0, 0.0, -6.304602650282852990657772792012007122988,
|
|
70
|
+
-0.281245618289472564778284183790118418111, -2.679019236219849057687906597489223155566,
|
|
71
|
+
0.518815663924157511565311164615012522024, 1.365353187603341710683633635235238678626,
|
|
72
|
+
5.885091088503946585721274891680604830712, 2.802808786272062889819965117517532194812,
|
|
73
|
+
]),
|
|
74
|
+
Float64Array.from([
|
|
75
|
+
0.4185367457753471441471025246471931649633, 0.0, 0.0, 0.0, 0.0, 6.724547581906459363100870806514855026676,
|
|
76
|
+
-0.425444280164611790606983409697113064616, 3.343279153001265577811816947557982637749,
|
|
77
|
+
0.617081663117537759528421117507709784737, -0.929966123939932833937749523988800852013,
|
|
78
|
+
-6.099948804751010722472962837945508844846, -3.002206187889399044804158084895173690015,
|
|
79
|
+
0.2553202529443445472336424602988558373637,
|
|
80
|
+
]),
|
|
81
|
+
Float64Array.from([
|
|
82
|
+
-0.779374086122884664644623040843840506343, 0.0, 0.0, 0.0, 0.0, -13.93734253810777678786523664804936051203,
|
|
83
|
+
1.252048853379357320949735183924200895136, -14.69150040801686878191527989293072091588,
|
|
84
|
+
-0.494705058533141685655191992136962873577, 2.242974909146236657906984549543692874755,
|
|
85
|
+
13.36789380382864375813864978592679139881, 14.39665048665068644512236935340272139005,
|
|
86
|
+
-0.7975813331776800379127866056663258667437, 0.4409353709534277758753793068298041158235,
|
|
87
|
+
]),
|
|
88
|
+
Float64Array.from([
|
|
89
|
+
2.058051337466886442151242368989994043993, 0.0, 0.0, 0.0, 0.0, 22.35793772796803295519317565842520212899,
|
|
90
|
+
0.90949810997556332745009198137971890783, 35.89110098240264104710550686568482456493,
|
|
91
|
+
-3.442515027624453437985000403608480262211, -4.865481358036368826566013387928704014496,
|
|
92
|
+
-18.90980381354342625688427480879773032857, -34.26354448030451782929251177395134170515,
|
|
93
|
+
1.264756521695642578827783499806516664686, 0.0, 0.0,
|
|
94
|
+
]),
|
|
95
|
+
];
|
|
96
|
+
ch_ = Float64Array.from([
|
|
97
|
+
0.1996996514886773085518508418098868756464e-1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
|
98
|
+
2.191499304949330054530747099310837524864, 0.8857071848208438030833722031786358862953e-1,
|
|
99
|
+
0.1140560234865965622484956605091432032674, 0.2533163805345107065564577734569651977347,
|
|
100
|
+
-2.056564386240941011158999594595981300493, 0.340809679901311993516009489422454381283, 0.0, 0.0,
|
|
101
|
+
0.4834231373823958314376726739772871714902e-1,
|
|
102
|
+
]);
|
|
103
|
+
c_ = Float64Array.from([
|
|
104
|
+
0.1461197685842315252051541915018784713459e-1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
|
105
|
+
-0.391521186233133908941022826728824203081, 0.2310932500289506415909675644868993669908,
|
|
106
|
+
0.1274766769992852382560589467488989175618, 0.2246434176204157731566981937082069688984,
|
|
107
|
+
0.5684352689748512932705226972873692126743, 0.5825871557215827200814768021863420902155e-1,
|
|
108
|
+
0.1364317403482215641609022744494239843327, 0.3057013983082797397721005067920369646664e-1, 0.0,
|
|
109
|
+
]);
|
|
110
|
+
get a() {
|
|
111
|
+
return this.a_;
|
|
112
|
+
}
|
|
113
|
+
get b() {
|
|
114
|
+
return this.b_;
|
|
115
|
+
}
|
|
116
|
+
get ch() {
|
|
117
|
+
return this.ch_;
|
|
118
|
+
}
|
|
119
|
+
get c() {
|
|
120
|
+
return this.c_;
|
|
121
|
+
}
|
|
122
|
+
get order() {
|
|
123
|
+
return 8;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=RungeKutta89Propagator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RungeKutta89Propagator.js","sourceRoot":"","sources":["../../src/propagator/RungeKutta89Propagator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,4DAA4D;AAC5D,2CAA2C;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,oDAAoD;AACpD,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB;IACpD,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC;QAC7B,GAAG,EAAE,SAAS,EAAE,6CAA6C,EAAE,0CAA0C,EAAE,KAAK;QAChH,0CAA0C,EAAE,0CAA0C,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;QACjH,IAAI,EAAE,0CAA0C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;KAC3E,CAAC,CAAC;IACK,EAAE,GAAG;QACX,IAAI,YAAY,CA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