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,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { EpochUTC, EpochWindow, J2000, Kilometers, KilometersPerSecond, Seconds, Vector3D } from 'ootk-core';
|
|
19
|
+
import { StateInterpolator } from './StateInterpolator';
|
|
20
|
+
|
|
21
|
+
export class LagrangeInterpolator extends StateInterpolator {
|
|
22
|
+
private t_: Float64Array;
|
|
23
|
+
private x_: Float64Array;
|
|
24
|
+
private y_: Float64Array;
|
|
25
|
+
private z_: Float64Array;
|
|
26
|
+
private order: number;
|
|
27
|
+
|
|
28
|
+
constructor(t: Float64Array, x: Float64Array, y: Float64Array, z: Float64Array, order = 10) {
|
|
29
|
+
super();
|
|
30
|
+
this.t_ = t;
|
|
31
|
+
this.x_ = x;
|
|
32
|
+
this.y_ = y;
|
|
33
|
+
this.z_ = z;
|
|
34
|
+
this.order = order;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Creates a LagrangeInterpolator from an array of J2000 ephemeris data.
|
|
39
|
+
* @param ephemeris - The array of J2000 ephemeris data.
|
|
40
|
+
* @param order - The order of the LagrangeInterpolator. Default is 10.
|
|
41
|
+
* @returns A new LagrangeInterpolator instance.
|
|
42
|
+
*/
|
|
43
|
+
static fromEphemeris(ephemeris: J2000[], order = 10): LagrangeInterpolator {
|
|
44
|
+
const k = ephemeris.length;
|
|
45
|
+
const t = new Float64Array(k);
|
|
46
|
+
const x = new Float64Array(k);
|
|
47
|
+
const y = new Float64Array(k);
|
|
48
|
+
const z = new Float64Array(k);
|
|
49
|
+
|
|
50
|
+
for (let i = 0; i < k; i++) {
|
|
51
|
+
const state = ephemeris[i];
|
|
52
|
+
|
|
53
|
+
t[i] = state.epoch.posix;
|
|
54
|
+
x[i] = state.position.x;
|
|
55
|
+
y[i] = state.position.y;
|
|
56
|
+
z[i] = state.position.z;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return new LagrangeInterpolator(t, x, y, z, order);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get sizeBytes(): number {
|
|
63
|
+
return (64 * 4 * this.t_.length) / 8;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interpolate(epoch: EpochUTC): J2000 | null {
|
|
67
|
+
if (!this.inWindow(epoch)) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const posix = epoch.posix;
|
|
71
|
+
const subDex = this.slice_(posix);
|
|
72
|
+
const start = subDex.left;
|
|
73
|
+
const stop = subDex.right;
|
|
74
|
+
const ts = this.t_.subarray(start, stop);
|
|
75
|
+
const xs = this.x_.subarray(start, stop);
|
|
76
|
+
const ys = this.y_.subarray(start, stop);
|
|
77
|
+
const zs = this.z_.subarray(start, stop);
|
|
78
|
+
const position = new Vector3D(
|
|
79
|
+
LagrangeInterpolator.position_(ts, xs, posix) as Kilometers,
|
|
80
|
+
LagrangeInterpolator.position_(ts, ys, posix) as Kilometers,
|
|
81
|
+
LagrangeInterpolator.position_(ts, zs, posix) as Kilometers,
|
|
82
|
+
);
|
|
83
|
+
const velocity = new Vector3D(
|
|
84
|
+
LagrangeInterpolator.velocity_(ts, xs, posix) as KilometersPerSecond,
|
|
85
|
+
LagrangeInterpolator.velocity_(ts, ys, posix) as KilometersPerSecond,
|
|
86
|
+
LagrangeInterpolator.velocity_(ts, zs, posix) as KilometersPerSecond,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return new J2000(epoch, position, velocity);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private static position_(xs: Float64Array, ys: Float64Array, x: number): number {
|
|
93
|
+
const k = xs.length - 1;
|
|
94
|
+
let result = 0.0;
|
|
95
|
+
|
|
96
|
+
for (let j = 0; j < k; j++) {
|
|
97
|
+
let product = ys[j];
|
|
98
|
+
|
|
99
|
+
for (let m = 0; m < k; m++) {
|
|
100
|
+
if (j === m) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
product *= (x - xs[m]) / (xs[j] - xs[m]);
|
|
104
|
+
}
|
|
105
|
+
result += product;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private static velocity_(xs: Float64Array, ys: Float64Array, x: number): number {
|
|
112
|
+
const k = xs.length;
|
|
113
|
+
let result = 0.0;
|
|
114
|
+
|
|
115
|
+
for (let j = 0; j < k; j++) {
|
|
116
|
+
let total = 0.0;
|
|
117
|
+
|
|
118
|
+
for (let i = 0; i < k; i++) {
|
|
119
|
+
if (i === j) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
let product = 1 / (xs[j] - xs[i]);
|
|
123
|
+
|
|
124
|
+
for (let m = 0; m < k; m++) {
|
|
125
|
+
if (m === i || m === j) {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
product *= (x - xs[m]) / (xs[j] - xs[m]);
|
|
129
|
+
}
|
|
130
|
+
total += product;
|
|
131
|
+
}
|
|
132
|
+
result += ys[j] * total;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
private static _getClosest(target: number, t1: number, d1: number, t2: number, d2: number): number {
|
|
139
|
+
return target - t1 >= t2 - target ? d2 : d1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
private slice_(posix: number): { left: number; right: number } {
|
|
143
|
+
const n = this.t_.length;
|
|
144
|
+
|
|
145
|
+
if (posix <= this.t_[0]) {
|
|
146
|
+
return { left: 0, right: this.order };
|
|
147
|
+
}
|
|
148
|
+
if (posix >= this.t_[n - 1]) {
|
|
149
|
+
return { left: n - this.order, right: n };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
let i = 0;
|
|
153
|
+
let j = this.t_.length;
|
|
154
|
+
let mid = 0;
|
|
155
|
+
|
|
156
|
+
while (i < j) {
|
|
157
|
+
mid = (i + j) >> 1;
|
|
158
|
+
if (this.t_[mid] === posix) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (posix < this.t_[mid]) {
|
|
162
|
+
if (mid > 0 && posix > this.t_[mid - 1]) {
|
|
163
|
+
mid = LagrangeInterpolator._getClosest(posix, this.t_[mid - 1], mid - 1, this.t_[mid], mid);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
j = mid;
|
|
167
|
+
} else {
|
|
168
|
+
if (mid < this.t_.length - 1 && posix < this.t_[mid + 1]) {
|
|
169
|
+
mid = LagrangeInterpolator._getClosest(posix, this.t_[mid], mid, this.t_[mid + 1], mid + 1);
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
i = mid + 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const offset = Math.floor(this.order / 2);
|
|
176
|
+
const left = mid - offset;
|
|
177
|
+
const right = mid + offset - (this.order % 2 === 1 ? 1 : 0);
|
|
178
|
+
|
|
179
|
+
if (left < 0) {
|
|
180
|
+
return { left: 0, right: this.order };
|
|
181
|
+
}
|
|
182
|
+
if (right > n) {
|
|
183
|
+
return { left: n - this.order, right: n };
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return { left, right };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
window(): EpochWindow {
|
|
190
|
+
return new EpochWindow(new EpochUTC(this.t_[0] as Seconds), new EpochUTC(this.t_[this.t_.length - 1] as Seconds));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { EpochUTC, J2000 } from 'ootk-core';
|
|
19
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
20
|
+
/* eslint-disable class-methods-use-this */
|
|
21
|
+
|
|
22
|
+
import { Interpolator } from './Interpolator';
|
|
23
|
+
|
|
24
|
+
// / Base class for state vector interpolators.
|
|
25
|
+
export abstract class StateInterpolator extends Interpolator {
|
|
26
|
+
/**
|
|
27
|
+
* Interpolates the state at the given epoch.
|
|
28
|
+
* @param epoch The epoch in UTC format.
|
|
29
|
+
* @throws If the interpolator has not been initialized.
|
|
30
|
+
*/
|
|
31
|
+
interpolate(epoch: EpochUTC): J2000 | null {
|
|
32
|
+
throw new Error('Not implemented.');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// / Return the size _(bytes)_ of this interpolator's cached data.
|
|
36
|
+
get sizeBytes(): number {
|
|
37
|
+
throw new Error('Not implemented.');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
copySign,
|
|
20
|
+
Earth,
|
|
21
|
+
EpochUTC,
|
|
22
|
+
EpochWindow,
|
|
23
|
+
J2000,
|
|
24
|
+
Kilometers,
|
|
25
|
+
KilometersPerSecond,
|
|
26
|
+
Seconds,
|
|
27
|
+
Vector3D,
|
|
28
|
+
} from 'ootk-core';
|
|
29
|
+
import { CubicSplineInterpolator } from './CubicSplineInterpolator';
|
|
30
|
+
import { LagrangeInterpolator } from './LagrangeInterpolator';
|
|
31
|
+
import { StateInterpolator } from './StateInterpolator';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Two-body Velocity Verlet Blend interpolator.
|
|
35
|
+
*
|
|
36
|
+
* The [VerletBlendInterpolator] retains the original ephemerides, so the
|
|
37
|
+
* original _"truth"_ states can be retrieved if needed without imparting any
|
|
38
|
+
* additional error, so this can be used to build other interpolator types.
|
|
39
|
+
* The implementation is simple and very tolerant when working with sparse
|
|
40
|
+
* ephemerides.
|
|
41
|
+
*/
|
|
42
|
+
export class VerletBlendInterpolator extends StateInterpolator {
|
|
43
|
+
constructor(public ephemeris: J2000[]) {
|
|
44
|
+
super();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get sizeBytes(): number {
|
|
48
|
+
return (64 * 7 * this.ephemeris.length) / 8;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
window(): EpochWindow {
|
|
52
|
+
return new EpochWindow(this.ephemeris[0].epoch, this.ephemeris[this.ephemeris.length - 1].epoch);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private static getClosest_(target: number, s1: J2000, s2: J2000): J2000 {
|
|
56
|
+
return target - s1.epoch.posix >= s2.epoch.posix - target ? s2 : s1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private matchState_(epoch: EpochUTC): J2000 {
|
|
60
|
+
const target = epoch.posix;
|
|
61
|
+
|
|
62
|
+
if (target <= this.ephemeris[0].epoch.posix) {
|
|
63
|
+
return this.ephemeris[0];
|
|
64
|
+
}
|
|
65
|
+
if (target >= this.ephemeris[this.ephemeris.length - 1].epoch.posix) {
|
|
66
|
+
return this.ephemeris[this.ephemeris.length - 1];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let i = 0;
|
|
70
|
+
let j = this.ephemeris.length;
|
|
71
|
+
let mid = 0;
|
|
72
|
+
|
|
73
|
+
while (i < j) {
|
|
74
|
+
mid = (i + j) >> 1;
|
|
75
|
+
if (this.ephemeris[mid].epoch.posix === target) {
|
|
76
|
+
return this.ephemeris[mid];
|
|
77
|
+
}
|
|
78
|
+
if (target < this.ephemeris[mid].epoch.posix) {
|
|
79
|
+
if (mid > 0 && target > this.ephemeris[mid - 1].epoch.posix) {
|
|
80
|
+
return VerletBlendInterpolator.getClosest_(target, this.ephemeris[mid - 1], this.ephemeris[mid]);
|
|
81
|
+
}
|
|
82
|
+
j = mid;
|
|
83
|
+
} else {
|
|
84
|
+
if (mid < this.ephemeris.length - 1 && target < this.ephemeris[mid + 1].epoch.posix) {
|
|
85
|
+
return VerletBlendInterpolator.getClosest_(target, this.ephemeris[mid], this.ephemeris[mid + 1]);
|
|
86
|
+
}
|
|
87
|
+
i = mid + 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return this.ephemeris[mid];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private static _gravity(position: Vector3D): Vector3D {
|
|
95
|
+
const r = position.magnitude();
|
|
96
|
+
|
|
97
|
+
return position.scale(-Earth.mu / (r * r * r));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private static integrate_(state: J2000, step: Seconds): J2000 {
|
|
101
|
+
const x0 = state.position;
|
|
102
|
+
const a0 = VerletBlendInterpolator._gravity(x0) as Vector3D<KilometersPerSecond>;
|
|
103
|
+
const v0 = state.velocity;
|
|
104
|
+
const x1 = x0
|
|
105
|
+
.add(v0.scale(step) as unknown as Vector3D<Kilometers>)
|
|
106
|
+
.add(a0.scale(0.5 * step * step) as unknown as Vector3D<Kilometers>);
|
|
107
|
+
const a1 = VerletBlendInterpolator._gravity(x1) as Vector3D<KilometersPerSecond>;
|
|
108
|
+
const v1 = v0
|
|
109
|
+
.add(a0.add(a1).scale(0.5 * step) as Vector3D<KilometersPerSecond>);
|
|
110
|
+
|
|
111
|
+
return new J2000(state.epoch.roll(step), x1, v1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interpolate(epoch: EpochUTC): J2000 | null {
|
|
115
|
+
if (!this.inWindow(epoch)) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
let state = this.matchState_(epoch);
|
|
119
|
+
|
|
120
|
+
while (state.epoch.posix !== epoch.posix) {
|
|
121
|
+
const delta = epoch.posix - state.epoch.posix;
|
|
122
|
+
const stepMag = Math.min(5.0, Math.abs(delta));
|
|
123
|
+
const stepSize = copySign(stepMag, delta) as Seconds;
|
|
124
|
+
|
|
125
|
+
state = VerletBlendInterpolator.integrate_(state, stepSize);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return state;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
getCachedState(epoch: EpochUTC): J2000 | null {
|
|
132
|
+
if (!this.inWindow(epoch)) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return this.matchState_(epoch);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
toCubicSpline(): CubicSplineInterpolator {
|
|
140
|
+
return CubicSplineInterpolator.fromEphemeris(this.ephemeris);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
toLagrange(order = 10): LagrangeInterpolator {
|
|
144
|
+
return LagrangeInterpolator.fromEphemeris(this.ephemeris, order);
|
|
145
|
+
}
|
|
146
|
+
}
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @description Orbital Object ToolKit (ootk) is a collection of tools for working
|
|
4
|
+
* with satellites and other orbital objects.
|
|
5
|
+
* @license AGPL-3.0-or-later
|
|
6
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
7
|
+
*
|
|
8
|
+
* Many of the classes are based off of the work of @david-rc-dayton and his
|
|
9
|
+
* Pious Squid library (https://github.com/david-rc-dayton/pious_squid).
|
|
10
|
+
*
|
|
11
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
12
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
13
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
14
|
+
*
|
|
15
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
16
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
17
|
+
* See the GNU Affero General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
20
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
export * from 'ootk-core';
|
|
24
|
+
export * from './coordinate';
|
|
25
|
+
export * from './objects';
|
|
26
|
+
export * from './operations';
|
|
27
|
+
export * from './transforms';
|
|
28
|
+
export * from './interfaces';
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
export * from './types/types';
|
|
32
|
+
export * from './utils';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @thkruz Theodore Kruczek
|
|
3
|
+
* @license AGPL-3.0-or-later
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
5
|
+
*
|
|
6
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
7
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
8
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
11
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
* See the GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { Earth, EpochUTC, MetersPerSecond, Seconds, SecondsPerMeterPerSecond } from 'ootk-core';
|
|
19
|
+
import { Thrust } from '../force/Thrust';
|
|
20
|
+
|
|
21
|
+
// / Container for a two-burn orbit transfer.
|
|
22
|
+
export class TwoBurnOrbitTransfer {
|
|
23
|
+
// / Create a new [TwoBurnOrbitTransfer] object.
|
|
24
|
+
constructor(
|
|
25
|
+
public vInit: number,
|
|
26
|
+
public vFinal: number,
|
|
27
|
+
public vTransA: number,
|
|
28
|
+
public vTransB: number,
|
|
29
|
+
public tTrans: Seconds,
|
|
30
|
+
) {
|
|
31
|
+
// Nothing to do here.
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the parameters for a Hohmann transfer orbit between two circular orbits.
|
|
36
|
+
* @param rInit The initial radius of the orbit. (km)
|
|
37
|
+
* @param rFinal The final radius of the orbit. (km)
|
|
38
|
+
* @returns An instance of TwoBurnOrbitTransfer containing the calculated parameters.
|
|
39
|
+
*/
|
|
40
|
+
static hohmannTransfer(rInit: number, rFinal: number): TwoBurnOrbitTransfer {
|
|
41
|
+
const vInit = Math.sqrt(Earth.mu / rInit);
|
|
42
|
+
const vFinal = Math.sqrt(Earth.mu / rFinal);
|
|
43
|
+
const vTransA = vInit * (Math.sqrt((2.0 * rFinal) / (rInit + rFinal)) - 1.0);
|
|
44
|
+
const vTransB = vFinal * (1.0 - Math.sqrt((2 * rInit) / (rInit + rFinal)));
|
|
45
|
+
const tTrans = Math.PI * Math.sqrt((rInit + rFinal) ** 3 / (8.0 * Earth.mu)) as Seconds;
|
|
46
|
+
|
|
47
|
+
return new TwoBurnOrbitTransfer(vInit, vFinal, vTransA, vTransB, tTrans);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// / Return the total delta-velocity magnitude for both maneuvers _(km/s)_.
|
|
51
|
+
get deltaV(): number {
|
|
52
|
+
return Math.abs(this.vTransA) + Math.abs(this.vTransB);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Calculates the two maneuver thrusts required for a two-burn orbit transfer.
|
|
57
|
+
* @param epoch The epoch of the maneuver.
|
|
58
|
+
* @param durationRate The duration rate of the maneuver (s/m/s).
|
|
59
|
+
* @returns An array containing the two thrust objects representing the maneuvers.
|
|
60
|
+
*/
|
|
61
|
+
toManeuvers(epoch: EpochUTC, durationRate = 0.0 as SecondsPerMeterPerSecond): [Thrust, Thrust] {
|
|
62
|
+
const mA = new Thrust(
|
|
63
|
+
epoch,
|
|
64
|
+
0.0 as MetersPerSecond,
|
|
65
|
+
this.vTransA * 1000.0 as MetersPerSecond,
|
|
66
|
+
0.0 as MetersPerSecond,
|
|
67
|
+
durationRate,
|
|
68
|
+
);
|
|
69
|
+
const mB = new Thrust(
|
|
70
|
+
epoch.roll(this.tTrans),
|
|
71
|
+
0.0 as MetersPerSecond,
|
|
72
|
+
this.vTransB * 1000.0 as MetersPerSecond,
|
|
73
|
+
0.0 as MetersPerSecond,
|
|
74
|
+
durationRate,
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return [mA, mB];
|
|
78
|
+
}
|
|
79
|
+
}
|