ootk 4.0.0-0 → 4.0.0-2
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 +142 -31
- package/{lib → dist}/coordinate/Hill.d.ts +17 -18
- package/{lib → dist}/coordinate/Hill.js +44 -36
- package/dist/coordinate/Hill.js.map +1 -0
- package/{lib → dist}/covariance/CovarianceSample.d.ts +6 -7
- package/{lib → dist}/covariance/CovarianceSample.js +29 -28
- package/dist/covariance/CovarianceSample.js.map +1 -0
- package/{lib → dist}/covariance/StateCovariance.d.ts +4 -3
- package/{lib → dist}/covariance/StateCovariance.js +8 -5
- package/dist/covariance/StateCovariance.js.map +1 -0
- package/{lib → dist}/force/AtmosphericDrag.d.ts +1 -2
- package/{lib → dist}/force/AtmosphericDrag.js +13 -6
- package/dist/force/AtmosphericDrag.js.map +1 -0
- package/{lib → dist}/force/EarthGravity.d.ts +1 -2
- package/{lib → dist}/force/EarthGravity.js +4 -2
- package/dist/force/EarthGravity.js.map +1 -0
- package/{lib → dist}/force/Force.d.ts +3 -2
- package/{lib → dist}/force/Force.js +3 -2
- package/dist/force/Force.js.map +1 -0
- package/{lib → dist}/force/ForceModel.d.ts +4 -5
- package/{lib → dist}/force/ForceModel.js +6 -2
- package/dist/force/ForceModel.js.map +1 -0
- package/{lib → dist}/force/Gravity.d.ts +1 -4
- package/{lib → dist}/force/Gravity.js +3 -4
- package/dist/force/Gravity.js.map +1 -0
- package/{lib → dist}/force/SolarRadiationPressure.d.ts +1 -2
- package/{lib → dist}/force/SolarRadiationPressure.js +6 -4
- package/dist/force/SolarRadiationPressure.js.map +1 -0
- package/{lib → dist}/force/ThirdBodyGravity.d.ts +1 -2
- package/{lib → dist}/force/ThirdBodyGravity.js +4 -3
- package/dist/force/ThirdBodyGravity.js.map +1 -0
- package/{lib → dist}/force/Thrust.d.ts +10 -11
- package/{lib → dist}/force/Thrust.js +8 -3
- 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/{lib → dist}/interpolator/ChebyshevCoefficients.d.ts +11 -15
- package/{lib → dist}/interpolator/ChebyshevCoefficients.js +19 -15
- package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
- package/{lib → dist}/interpolator/ChebyshevInterpolator.d.ts +1 -2
- package/{lib → dist}/interpolator/ChebyshevInterpolator.js +2 -2
- package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
- package/{lib → dist}/interpolator/CubicSpline.d.ts +8 -9
- package/{lib → dist}/interpolator/CubicSpline.js +10 -5
- package/dist/interpolator/CubicSpline.js.map +1 -0
- package/{lib → dist}/interpolator/CubicSplineInterpolator.d.ts +2 -3
- package/{lib → dist}/interpolator/CubicSplineInterpolator.js +6 -4
- package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
- package/{lib → dist}/interpolator/FieldInterpolator.d.ts +7 -5
- package/{lib → dist}/interpolator/FieldInterpolator.js +6 -3
- package/dist/interpolator/FieldInterpolator.js.map +1 -0
- package/{lib → dist}/interpolator/Interpolator.d.ts +1 -2
- package/{lib → dist}/interpolator/Interpolator.js +1 -2
- package/dist/interpolator/Interpolator.js.map +1 -0
- package/{lib → dist}/interpolator/LagrangeInterpolator.d.ts +8 -10
- package/{lib → dist}/interpolator/LagrangeInterpolator.js +32 -29
- package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
- package/{lib → dist}/interpolator/StateInterpolator.d.ts +2 -4
- package/{lib → dist}/interpolator/StateInterpolator.js +2 -4
- package/dist/interpolator/StateInterpolator.js.map +1 -0
- package/{lib → dist}/interpolator/VerletBlendInterpolator.d.ts +4 -5
- package/{lib → dist}/interpolator/VerletBlendInterpolator.js +16 -13
- package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
- package/{lib/ootk.d.ts → dist/main.d.ts} +4 -2
- package/dist/main.js +32 -0
- package/dist/main.js.map +1 -0
- package/{lib → dist}/maneuver/TwoBurnOrbitTransfer.d.ts +5 -7
- package/{lib → dist}/maneuver/TwoBurnOrbitTransfer.js +6 -3
- package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
- package/{lib → dist}/maneuver/Waypoint.d.ts +30 -5
- package/{lib → dist}/maneuver/Waypoint.js +31 -4
- package/dist/maneuver/Waypoint.js.map +1 -0
- package/{lib → dist}/objects/DetailedSatellite.d.ts +7 -31
- package/{lib → dist}/objects/DetailedSatellite.js +68 -72
- package/dist/objects/DetailedSatellite.js.map +1 -0
- package/{lib → dist}/objects/DetailedSensor.d.ts +1 -2
- package/{lib → dist}/objects/DetailedSensor.js +22 -2
- package/dist/objects/DetailedSensor.js.map +1 -0
- package/{lib → dist}/objects/LandObject.d.ts +3 -6
- package/{lib → dist}/objects/LandObject.js +9 -3
- package/dist/objects/LandObject.js.map +1 -0
- package/{lib → dist}/objects/Marker.d.ts +1 -2
- package/{lib → dist}/objects/Marker.js +1 -2
- 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/{lib → dist}/objects/index.d.ts +1 -1
- package/{lib → dist}/objects/index.js +1 -1
- package/dist/objects/index.js.map +1 -0
- package/{lib → dist}/observation/Observation.d.ts +42 -4
- package/{lib → dist}/observation/Observation.js +41 -10
- package/dist/observation/Observation.js.map +1 -0
- package/{lib → dist}/observation/ObservationOptical.d.ts +7 -6
- package/{lib → dist}/observation/ObservationOptical.js +19 -15
- package/dist/observation/ObservationOptical.js.map +1 -0
- package/{lib → dist}/observation/ObservationRadar.d.ts +7 -4
- package/{lib → dist}/observation/ObservationRadar.js +25 -19
- package/dist/observation/ObservationRadar.js.map +1 -0
- package/{lib → dist}/observation/ObservationUtils.d.ts +1 -2
- package/{lib → dist}/observation/ObservationUtils.js +1 -2
- package/dist/observation/ObservationUtils.js.map +1 -0
- package/{lib → dist}/observation/PropagatorPairs.d.ts +3 -2
- package/{lib → dist}/observation/PropagatorPairs.js +7 -4
- package/dist/observation/PropagatorPairs.js.map +1 -0
- package/{lib → dist}/operations/BoxMuller.d.ts +7 -2
- package/{lib → dist}/operations/BoxMuller.js +15 -4
- package/dist/operations/BoxMuller.js.map +1 -0
- package/dist/operations/EulerAngles.d.ts +105 -0
- package/{lib → dist}/operations/EulerAngles.js +72 -22
- package/dist/operations/EulerAngles.js.map +1 -0
- package/{lib → dist}/operations/Quaternion.d.ts +5 -6
- package/{lib → dist}/operations/Quaternion.js +12 -9
- package/dist/operations/Quaternion.js.map +1 -0
- package/{lib → dist}/operations/RandomGaussianSource.d.ts +1 -2
- package/{lib → dist}/operations/RandomGaussianSource.js +3 -3
- package/dist/operations/RandomGaussianSource.js.map +1 -0
- package/{lib → dist}/optimize/ChebyshevCompressor.d.ts +3 -2
- package/{lib → dist}/optimize/ChebyshevCompressor.js +7 -4
- package/dist/optimize/ChebyshevCompressor.js.map +1 -0
- package/{lib → dist}/optimize/DownhillSimplex.d.ts +16 -2
- package/{lib → dist}/optimize/DownhillSimplex.js +16 -2
- package/dist/optimize/DownhillSimplex.js.map +1 -0
- package/{lib → dist}/optimize/GoldenSection.d.ts +9 -3
- package/{lib → dist}/optimize/GoldenSection.js +9 -3
- package/dist/optimize/GoldenSection.js.map +1 -0
- package/{lib → dist}/optimize/PolynomialRegression.d.ts +14 -2
- package/{lib → dist}/optimize/PolynomialRegression.js +19 -2
- package/dist/optimize/PolynomialRegression.js.map +1 -0
- package/{lib → dist}/optimize/PolynomicalRegressionResult.d.ts +5 -2
- package/{lib → dist}/optimize/PolynomicalRegressionResult.js +8 -2
- package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
- package/{lib → dist}/optimize/SimpleLinearRegression.d.ts +5 -2
- package/{lib → dist}/optimize/SimpleLinearRegression.js +12 -7
- package/dist/optimize/SimpleLinearRegression.js.map +1 -0
- package/{lib → dist}/optimize/SimplexEntry.d.ts +1 -2
- package/{lib → dist}/optimize/SimplexEntry.js +5 -2
- package/dist/optimize/SimplexEntry.js.map +1 -0
- package/{lib → dist}/orbit_determination/BatchLeastSquaresOD.d.ts +14 -3
- package/{lib → dist}/orbit_determination/BatchLeastSquaresOD.js +29 -4
- package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
- package/{lib → dist}/orbit_determination/BatchLeastSquaresResult.d.ts +4 -2
- package/{lib → dist}/orbit_determination/BatchLeastSquaresResult.js +7 -2
- package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
- package/{lib → dist}/orbit_determination/GibbsIOD.d.ts +9 -4
- package/{lib → dist}/orbit_determination/GibbsIOD.js +11 -5
- package/dist/orbit_determination/GibbsIOD.js.map +1 -0
- package/{lib → dist}/orbit_determination/GoodingIOD.d.ts +21 -22
- package/{lib → dist}/orbit_determination/GoodingIOD.js +74 -71
- package/dist/orbit_determination/GoodingIOD.js.map +1 -0
- package/{lib → dist}/orbit_determination/HerrickGibbsIOD.d.ts +4 -4
- package/{lib → dist}/orbit_determination/HerrickGibbsIOD.js +3 -2
- package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
- package/{lib → dist}/orbit_determination/LambertIOD.d.ts +21 -8
- package/{lib → dist}/orbit_determination/LambertIOD.js +20 -6
- package/dist/orbit_determination/LambertIOD.js.map +1 -0
- package/{lib → dist}/orbit_determination/ModifiedGoodingIOD.d.ts +6 -7
- package/{lib → dist}/orbit_determination/ModifiedGoodingIOD.js +12 -11
- package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
- package/{lib → dist}/propagator/DormandPrince54Propagator.d.ts +1 -2
- package/dist/propagator/DormandPrince54Propagator.js +64 -0
- package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
- package/{lib → dist}/propagator/KeplerPropagator.d.ts +1 -2
- package/{lib → dist}/propagator/KeplerPropagator.js +5 -2
- package/{lib → dist}/propagator/KeplerPropagator.js.map +1 -1
- package/{lib → dist}/propagator/Propagator.d.ts +5 -6
- package/{lib → dist}/propagator/Propagator.js +5 -6
- package/dist/propagator/Propagator.js.map +1 -0
- package/{lib → dist}/propagator/RkCheckpoint.d.ts +1 -2
- package/{lib → dist}/propagator/RkCheckpoint.js +3 -2
- package/dist/propagator/RkCheckpoint.js.map +1 -0
- package/{lib → dist}/propagator/RkResult.d.ts +1 -2
- package/{lib → dist}/propagator/RkResult.js +4 -2
- package/dist/propagator/RkResult.js.map +1 -0
- package/{lib → dist}/propagator/RungeKutta4Propagator.d.ts +14 -10
- package/{lib → dist}/propagator/RungeKutta4Propagator.js +45 -36
- package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
- package/{lib → dist}/propagator/RungeKutta89Propagator.d.ts +1 -2
- package/dist/propagator/RungeKutta89Propagator.js +126 -0
- package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
- package/{lib → dist}/propagator/RungeKuttaAdaptive.d.ts +13 -11
- package/{lib → dist}/propagator/RungeKuttaAdaptive.js +31 -24
- package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
- package/{lib → dist}/propagator/Sgp4Propagator.d.ts +3 -4
- package/{lib → dist}/propagator/Sgp4Propagator.js +4 -3
- package/dist/propagator/Sgp4Propagator.js.map +1 -0
- package/{lib → dist}/smoothing/ExponentialSmoothing.d.ts +1 -2
- package/{lib → dist}/smoothing/ExponentialSmoothing.js +1 -2
- 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 +58 -0
- package/dist/transforms/transforms.js +94 -0
- package/dist/transforms/transforms.js.map +1 -0
- package/{lib → dist}/types/types.d.ts +44 -4
- package/{lib → dist}/types/types.js +1 -2
- package/dist/types/types.js.map +1 -0
- package/dist/utils/functions.d.ts +8 -0
- package/dist/utils/functions.js +18 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -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 +32 -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/{lib/ootk.js → src/main.ts} +7 -3
- 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/functions.ts +21 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/jacobian.ts +38 -0
- package/.eslintrc.json +0 -244
- package/jest.config.ts +0 -30
- package/lib/coordinate/Hill.js.map +0 -1
- package/lib/covariance/CovarianceSample.js.map +0 -1
- package/lib/covariance/StateCovariance.js.map +0 -1
- package/lib/force/AtmosphericDrag.js.map +0 -1
- package/lib/force/EarthGravity.js.map +0 -1
- package/lib/force/Force.js.map +0 -1
- package/lib/force/ForceModel.js.map +0 -1
- package/lib/force/Gravity.js.map +0 -1
- package/lib/force/SolarRadiationPressure.js.map +0 -1
- package/lib/force/ThirdBodyGravity.js.map +0 -1
- package/lib/force/Thrust.js.map +0 -1
- package/lib/interpolator/ChebyshevCoefficients.js.map +0 -1
- package/lib/interpolator/ChebyshevInterpolator.js.map +0 -1
- package/lib/interpolator/CubicSpline.js.map +0 -1
- package/lib/interpolator/CubicSplineInterpolator.js.map +0 -1
- package/lib/interpolator/FieldInterpolator.js.map +0 -1
- package/lib/interpolator/Interpolator.js.map +0 -1
- package/lib/interpolator/LagrangeInterpolator.js.map +0 -1
- package/lib/interpolator/StateInterpolator.js.map +0 -1
- package/lib/interpolator/VerletBlendInterpolator.js.map +0 -1
- package/lib/maneuver/TwoBurnOrbitTransfer.js.map +0 -1
- package/lib/maneuver/Waypoint.js.map +0 -1
- package/lib/objects/DetailedSatellite.js.map +0 -1
- package/lib/objects/DetailedSensor.js.map +0 -1
- package/lib/objects/LandObject.js.map +0 -1
- package/lib/objects/Marker.js.map +0 -1
- package/lib/objects/index.js.map +0 -1
- package/lib/observation/Observation.js.map +0 -1
- package/lib/observation/ObservationOptical.js.map +0 -1
- package/lib/observation/ObservationRadar.js.map +0 -1
- package/lib/observation/ObservationUtils.js.map +0 -1
- package/lib/observation/PropagatorPairs.js.map +0 -1
- package/lib/ootk.js.map +0 -1
- package/lib/operations/BoxMuller.js.map +0 -1
- package/lib/operations/EulerAngles.d.ts +0 -50
- package/lib/operations/EulerAngles.js.map +0 -1
- package/lib/operations/Quaternion.js.map +0 -1
- package/lib/operations/RandomGaussianSource.js.map +0 -1
- package/lib/optimize/ChebyshevCompressor.js.map +0 -1
- package/lib/optimize/DownhillSimplex.js.map +0 -1
- package/lib/optimize/GoldenSection.js.map +0 -1
- package/lib/optimize/PolynomialRegression.js.map +0 -1
- package/lib/optimize/PolynomicalRegressionResult.js.map +0 -1
- package/lib/optimize/SimpleLinearRegression.js.map +0 -1
- package/lib/optimize/SimplexEntry.js.map +0 -1
- package/lib/orbit_determination/BatchLeastSquaresOD.js.map +0 -1
- package/lib/orbit_determination/BatchLeastSquaresResult.js.map +0 -1
- package/lib/orbit_determination/GibbsIOD.js.map +0 -1
- package/lib/orbit_determination/GoodingIOD.js.map +0 -1
- package/lib/orbit_determination/HerrickGibbsIOD.js.map +0 -1
- package/lib/orbit_determination/LambertIOD.js.map +0 -1
- package/lib/orbit_determination/ModifiedGoodingIOD.js.map +0 -1
- package/lib/propagator/DormandPrince54Propagator.js +0 -68
- package/lib/propagator/DormandPrince54Propagator.js.map +0 -1
- package/lib/propagator/Propagator.js.map +0 -1
- package/lib/propagator/RkCheckpoint.js.map +0 -1
- package/lib/propagator/RkResult.js.map +0 -1
- package/lib/propagator/RungeKutta4Propagator.js.map +0 -1
- package/lib/propagator/RungeKutta89Propagator.js +0 -130
- package/lib/propagator/RungeKutta89Propagator.js.map +0 -1
- package/lib/propagator/RungeKuttaAdaptive.js.map +0 -1
- package/lib/propagator/Sgp4Propagator.js.map +0 -1
- package/lib/smoothing/ExponentialSmoothing.js.map +0 -1
- package/lib/types/types.js.map +0 -1
- /package/{lib → dist}/coordinate/index.d.ts +0 -0
- /package/{lib → dist}/coordinate/index.js +0 -0
- /package/{lib → dist}/coordinate/index.js.map +0 -0
- /package/{lib → dist}/operations/index.d.ts +0 -0
- /package/{lib → dist}/operations/index.js +0 -0
- /package/{lib → dist}/operations/index.js.map +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -17,6 +16,7 @@
|
|
|
17
16
|
*/
|
|
18
17
|
// / Golden Section bounded single value optimizer.
|
|
19
18
|
export class GoldenSection {
|
|
19
|
+
static _grInv = 1.0 / (0.5 * (Math.sqrt(5) + 1));
|
|
20
20
|
static _check(fc, fd, solveMax) {
|
|
21
21
|
return solveMax ? fc > fd : fc < fd;
|
|
22
22
|
}
|
|
@@ -26,6 +26,13 @@ export class GoldenSection {
|
|
|
26
26
|
*
|
|
27
27
|
* Takes [lower] and [upper] input search bounds, and an optional
|
|
28
28
|
* search [tolerance].
|
|
29
|
+
* @param f Function to optimize
|
|
30
|
+
* @param lower Lower bound
|
|
31
|
+
* @param upper Upper bound
|
|
32
|
+
* @param root0 Root0
|
|
33
|
+
* @param root0.tolerance Root0.tolerance
|
|
34
|
+
* @param root0.solveMax Root0.solveMax
|
|
35
|
+
* @returns The optimal input value.
|
|
29
36
|
*/
|
|
30
37
|
static search(f, lower, upper, { tolerance = 1e-5, solveMax = false, }) {
|
|
31
38
|
let a = lower;
|
|
@@ -45,5 +52,4 @@ export class GoldenSection {
|
|
|
45
52
|
return 0.5 * (b + a);
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
|
-
GoldenSection._grInv = 1.0 / (0.5 * (Math.sqrt(5) + 1));
|
|
49
55
|
//# sourceMappingURL=GoldenSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoldenSection.js","sourceRoot":"","sources":["../../src/optimize/GoldenSection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,mDAAmD;AACnD,MAAM,OAAO,aAAa;IAChB,MAAM,CAAU,MAAM,GAAW,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAElE,MAAM,CAAC,MAA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
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -22,6 +21,12 @@ export declare class PolynomialRegression {
|
|
|
22
21
|
/**
|
|
23
22
|
* Optimize polynomial coefficients to fit data series [xs] and [ys] for the
|
|
24
23
|
* provided polynomial [order].
|
|
24
|
+
* @param xs x values
|
|
25
|
+
* @param ys y values
|
|
26
|
+
* @param order Polynomial order
|
|
27
|
+
* @param root0 Root0
|
|
28
|
+
* @param root0.printIter Root0.printIter
|
|
29
|
+
* @returns The optimal input value.
|
|
25
30
|
*/
|
|
26
31
|
static solve(xs: Float64Array, ys: Float64Array, order: number, { printIter }?: {
|
|
27
32
|
printIter?: boolean;
|
|
@@ -30,6 +35,13 @@ export declare class PolynomialRegression {
|
|
|
30
35
|
* Optimize polynomial coefficients to fit data series [xs] and [ys], and
|
|
31
36
|
* attempt to find an optimal order within the [minOrder] and
|
|
32
37
|
* [maxOrder] bounds.
|
|
38
|
+
* @param xs x values
|
|
39
|
+
* @param ys y values
|
|
40
|
+
* @param minOrder Minimum polynomial order
|
|
41
|
+
* @param maxOrder Maximum polynomial order
|
|
42
|
+
* @param root0 Root0
|
|
43
|
+
* @param root0.printIter Root0.printIter
|
|
44
|
+
* @returns The optimal input value.
|
|
33
45
|
*/
|
|
34
46
|
static solveOrder(xs: Float64Array, ys: Float64Array, minOrder: number, maxOrder: number, { printIter }?: {
|
|
35
47
|
printIter?: boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -31,9 +30,20 @@ export class PolynomialRegression {
|
|
|
31
30
|
/**
|
|
32
31
|
* Optimize polynomial coefficients to fit data series [xs] and [ys] for the
|
|
33
32
|
* provided polynomial [order].
|
|
33
|
+
* @param xs x values
|
|
34
|
+
* @param ys y values
|
|
35
|
+
* @param order Polynomial order
|
|
36
|
+
* @param root0 Root0
|
|
37
|
+
* @param root0.printIter Root0.printIter
|
|
38
|
+
* @returns The optimal input value.
|
|
34
39
|
*/
|
|
35
40
|
static solve(xs, ys, order, { printIter = false } = {}) {
|
|
36
41
|
const simplex = DownhillSimplex.generateSimplex(Float64Array.from(Array(order + 1).fill(1.0)));
|
|
42
|
+
/**
|
|
43
|
+
* Sum of squared errors.
|
|
44
|
+
* @param coeffs Polynomial coefficients
|
|
45
|
+
* @returns Sum of squared errors
|
|
46
|
+
*/
|
|
37
47
|
function f(coeffs) {
|
|
38
48
|
let sse = 0.0;
|
|
39
49
|
for (let i = 0; i < xs.length; i++) {
|
|
@@ -53,6 +63,13 @@ export class PolynomialRegression {
|
|
|
53
63
|
* Optimize polynomial coefficients to fit data series [xs] and [ys], and
|
|
54
64
|
* attempt to find an optimal order within the [minOrder] and
|
|
55
65
|
* [maxOrder] bounds.
|
|
66
|
+
* @param xs x values
|
|
67
|
+
* @param ys y values
|
|
68
|
+
* @param minOrder Minimum polynomial order
|
|
69
|
+
* @param maxOrder Maximum polynomial order
|
|
70
|
+
* @param root0 Root0
|
|
71
|
+
* @param root0.printIter Root0.printIter
|
|
72
|
+
* @returns The optimal input value.
|
|
56
73
|
*/
|
|
57
74
|
static solveOrder(xs, ys, minOrder, maxOrder, { printIter = false } = {}) {
|
|
58
75
|
const cache = [];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolynomialRegression.js","sourceRoot":"","sources":["../../src/optimize/PolynomialRegression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,kCAA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MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QAEtB,OAAO,IAAI,2BAA2B,CACpC,MAAM,EACN,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EACd,oBAAoB,CAAC,yBAAyB,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CACtE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,UAAU,CACf,EAAgB,EAChB,EAAgB,EAChB,QAAgB,EAChB,QAAgB,EAChB,EAAE,SAAS,GAAG,KAAK,KAA8B,EAAE;QAEnD,MAAM,KAAK,GAAkC,EAAE,CAAC;QAEhD,KAAK,IAAI,KAAK,GAAG,QAAQ,EAAE,KAAK,IAAI,QAAQ,EAAE,KAAK,EAAE,EAAE;YACrD,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;SACtE;QACD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAEpC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -23,6 +22,10 @@ export declare class PolynomicalRegressionResult {
|
|
|
23
22
|
* Create a new [PolynomicalRegressionResult] object, containing the
|
|
24
23
|
* polynomial [coefficients], root-sum-squared error [rss], and Bayes
|
|
25
24
|
* information criterea [bic].
|
|
25
|
+
* @param coefficients The polynomial coefficients.
|
|
26
|
+
* @param rss The root-sum-squared error.
|
|
27
|
+
* @param bic The Bayes information criterea.
|
|
28
|
+
* @returns The optimal input value.
|
|
26
29
|
*/
|
|
27
30
|
constructor(coefficients: Float64Array, rss: number, bic: number);
|
|
28
31
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -17,10 +16,17 @@
|
|
|
17
16
|
*/
|
|
18
17
|
// / Polynomial regression optimization result.
|
|
19
18
|
export class PolynomicalRegressionResult {
|
|
19
|
+
coefficients;
|
|
20
|
+
rss;
|
|
21
|
+
bic;
|
|
20
22
|
/**
|
|
21
23
|
* Create a new [PolynomicalRegressionResult] object, containing the
|
|
22
24
|
* polynomial [coefficients], root-sum-squared error [rss], and Bayes
|
|
23
25
|
* information criterea [bic].
|
|
26
|
+
* @param coefficients The polynomial coefficients.
|
|
27
|
+
* @param rss The root-sum-squared error.
|
|
28
|
+
* @param bic The Bayes information criterea.
|
|
29
|
+
* @returns The optimal input value.
|
|
24
30
|
*/
|
|
25
31
|
constructor(coefficients, rss, bic) {
|
|
26
32
|
this.coefficients = coefficients;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolynomicalRegressionResult.js","sourceRoot":"","sources":["../../src/optimize/PolynomicalRegressionResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,+CAA+C;AAC/C,MAAM,OAAO,2BAA2B;IAUnB;IAAmC;IAAoB;IAT1E;;;;;;;;OAQG;IACH,YAAmB,YAA0B,EAAS,GAAW,EAAS,GAAW;QAAlE,iBAAY,GAAZ,YAAY,CAAc;QAAS,QAAG,GAAH,GAAG,CAAQ;QAAS,QAAG,GAAH,GAAG,CAAQ;QACnF,sBAAsB;IACxB,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -21,6 +20,8 @@ export declare class SimpleLinearRegression {
|
|
|
21
20
|
/**
|
|
22
21
|
* Create a new [SimpleLinearRegression] object from lists of x and y
|
|
23
22
|
* values.
|
|
23
|
+
* @param xs x values
|
|
24
|
+
* @param ys y values
|
|
24
25
|
*/
|
|
25
26
|
constructor(xs: number[], ys: number[]);
|
|
26
27
|
private _slope;
|
|
@@ -36,6 +37,8 @@ export declare class SimpleLinearRegression {
|
|
|
36
37
|
/**
|
|
37
38
|
* Create a new [SimpleLinearRegression] object with outliers above the
|
|
38
39
|
* provided standard deviation [sigma] value removed.
|
|
40
|
+
* @param sigma standard deviation
|
|
41
|
+
* @returns new [SimpleLinearRegression] object
|
|
39
42
|
*/
|
|
40
43
|
filterOutliers(sigma?: number): SimpleLinearRegression;
|
|
41
44
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -17,21 +16,25 @@
|
|
|
17
16
|
*/
|
|
18
17
|
// / Simple linear regression _(y = mx + b)_.
|
|
19
18
|
export class SimpleLinearRegression {
|
|
19
|
+
xs;
|
|
20
|
+
ys;
|
|
20
21
|
/**
|
|
21
22
|
* Create a new [SimpleLinearRegression] object from lists of x and y
|
|
22
23
|
* values.
|
|
24
|
+
* @param xs x values
|
|
25
|
+
* @param ys y values
|
|
23
26
|
*/
|
|
24
27
|
constructor(xs, ys) {
|
|
25
28
|
this.xs = xs;
|
|
26
29
|
this.ys = ys;
|
|
27
|
-
// / Line slope
|
|
28
|
-
this._slope = 0.0;
|
|
29
|
-
// / Y-axis intercept
|
|
30
|
-
this._intercept = 0.0;
|
|
31
|
-
this._error = 0.0;
|
|
32
30
|
this.update();
|
|
33
31
|
}
|
|
34
32
|
// / Line slope
|
|
33
|
+
_slope = 0.0;
|
|
34
|
+
// / Y-axis intercept
|
|
35
|
+
_intercept = 0.0;
|
|
36
|
+
_error = 0.0;
|
|
37
|
+
// / Line slope
|
|
35
38
|
get slope() {
|
|
36
39
|
return this._slope;
|
|
37
40
|
}
|
|
@@ -90,6 +93,8 @@ export class SimpleLinearRegression {
|
|
|
90
93
|
/**
|
|
91
94
|
* Create a new [SimpleLinearRegression] object with outliers above the
|
|
92
95
|
* provided standard deviation [sigma] value removed.
|
|
96
|
+
* @param sigma standard deviation
|
|
97
|
+
* @returns new [SimpleLinearRegression] object
|
|
93
98
|
*/
|
|
94
99
|
filterOutliers(sigma = 1.0) {
|
|
95
100
|
const limit = this.error * sigma;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleLinearRegression.js","sourceRoot":"","sources":["../../src/optimize/SimpleLinearRegression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,6CAA6C;AAC7C,MAAM,OAAO,sBAAsB;IAOd;IAAqB;IANxC;;;;;OAKG;IACH,YAAmB,EA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AAC;QAChC,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,wDAAwD;IACxD,QAAQ,CAAC,CAAS;QAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,KAAK,GAAG,GAAG;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACjC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE;gBAC5D,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aACxB;SACF;QAED,OAAO,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -17,6 +16,10 @@
|
|
|
17
16
|
*/
|
|
18
17
|
import { Vector } from 'ootk-core';
|
|
19
18
|
export class SimplexEntry {
|
|
19
|
+
_f;
|
|
20
|
+
points;
|
|
21
|
+
score;
|
|
22
|
+
_x;
|
|
20
23
|
constructor(_f, points) {
|
|
21
24
|
this._f = _f;
|
|
22
25
|
this.points = points;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimplexEntry.js","sourceRoot":"","sources":["../../src/optimize/SimplexEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAQnC,MAAM,OAAO,YAAY;IAIH;IAAyB;IAH7C,KAAK,CAAS;IACN,EAAE,CAAS;IAEnB,YAAoB,EAAgB,EAAS,MAAoB;QAA7C,OAAE,GAAF,EAAE,CAAc;QAAS,WAAM,GAAN,MAAM,CAAc;QAC/D,IAAI,CAAC,EAAE,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,CAAS,EAAE,EAAgB,EAAE,EAAgB;QAClD,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,QAAQ,CAAC,EAAgB;QACvB,OAAO,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -37,14 +36,26 @@ export declare class BatchLeastSquaresOD {
|
|
|
37
36
|
* Create a new [BatchLeastSquaresOD] object from a list of [Observation]
|
|
38
37
|
* objects, an [apriori] state estimate, and an optional
|
|
39
38
|
* spacecraft [forceModel].
|
|
39
|
+
* @param observations_ List of observations.
|
|
40
|
+
* @param apriori_ Apriori state estimate.
|
|
41
|
+
* @param forceModel_ Spacecraft force model.
|
|
42
|
+
* @param posStep_ Position step size.
|
|
43
|
+
* @param velStep_ Velocity step size.
|
|
44
|
+
* @param fastDerivatives_ Use fast derivatives.
|
|
45
|
+
* @returns [BatchLeastSquaresOD] object.
|
|
40
46
|
*/
|
|
41
|
-
constructor(observations_: Observation[], apriori_: J2000, forceModel_?: ForceModel, posStep_?: number, velStep_?: number, fastDerivatives_?: boolean);
|
|
47
|
+
constructor(observations_: Observation[], apriori_: J2000, forceModel_?: ForceModel | undefined, posStep_?: number, velStep_?: number, fastDerivatives_?: boolean);
|
|
42
48
|
private buildPropagator_;
|
|
43
49
|
private static stateToX0_;
|
|
44
50
|
private setPropagatorPairs_;
|
|
45
51
|
/**
|
|
46
52
|
* Attempt to solve a state estimate with the given root-mean-squared delta
|
|
47
53
|
* [tolerance].
|
|
54
|
+
* @param root0 Root initial guess.
|
|
55
|
+
* @param root0.tolerance Root-mean-squared delta tolerance.
|
|
56
|
+
* @param root0.maxIter Maximum number of iterations.
|
|
57
|
+
* @param root0.printIter Print iterations.
|
|
58
|
+
* @returns [BatchLeastSquaresResult] object.
|
|
48
59
|
*/
|
|
49
60
|
solve({ tolerance, maxIter, printIter, }?: {
|
|
50
61
|
tolerance?: number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -26,10 +25,31 @@ import { BatchLeastSquaresResult } from './BatchLeastSquaresResult';
|
|
|
26
25
|
* Batch least squares orbit determination.
|
|
27
26
|
*/
|
|
28
27
|
export class BatchLeastSquaresOD {
|
|
28
|
+
observations_;
|
|
29
|
+
apriori_;
|
|
30
|
+
forceModel_;
|
|
31
|
+
posStep_;
|
|
32
|
+
velStep_;
|
|
33
|
+
fastDerivatives_;
|
|
34
|
+
// / Propagator pair cache, for generating observation Jacobians.
|
|
35
|
+
propPairs_;
|
|
36
|
+
// / Nominal state propagator.
|
|
37
|
+
propagator_;
|
|
38
|
+
// / State estimate during solve.
|
|
39
|
+
nominal_;
|
|
40
|
+
// / Solve start epoch.
|
|
41
|
+
start_;
|
|
29
42
|
/**
|
|
30
43
|
* Create a new [BatchLeastSquaresOD] object from a list of [Observation]
|
|
31
44
|
* objects, an [apriori] state estimate, and an optional
|
|
32
45
|
* spacecraft [forceModel].
|
|
46
|
+
* @param observations_ List of observations.
|
|
47
|
+
* @param apriori_ Apriori state estimate.
|
|
48
|
+
* @param forceModel_ Spacecraft force model.
|
|
49
|
+
* @param posStep_ Position step size.
|
|
50
|
+
* @param velStep_ Velocity step size.
|
|
51
|
+
* @param fastDerivatives_ Use fast derivatives.
|
|
52
|
+
* @returns [BatchLeastSquaresOD] object.
|
|
33
53
|
*/
|
|
34
54
|
constructor(observations_, apriori_, forceModel_, posStep_ = 1e-5, velStep_ = 1e-5, fastDerivatives_ = false) {
|
|
35
55
|
this.observations_ = observations_;
|
|
@@ -68,6 +88,11 @@ export class BatchLeastSquaresOD {
|
|
|
68
88
|
/**
|
|
69
89
|
* Attempt to solve a state estimate with the given root-mean-squared delta
|
|
70
90
|
* [tolerance].
|
|
91
|
+
* @param root0 Root initial guess.
|
|
92
|
+
* @param root0.tolerance Root-mean-squared delta tolerance.
|
|
93
|
+
* @param root0.maxIter Maximum number of iterations.
|
|
94
|
+
* @param root0.printIter Print iterations.
|
|
95
|
+
* @returns [BatchLeastSquaresResult] object.
|
|
71
96
|
*/
|
|
72
97
|
solve({ tolerance = 1e-3, maxIter = 250, printIter = false, } = {}) {
|
|
73
98
|
let breakFlag = false;
|
|
@@ -90,7 +115,7 @@ export class BatchLeastSquaresOD {
|
|
|
90
115
|
const bMat = ob.residual(this.propagator_);
|
|
91
116
|
atwaMat = atwaMat.add(aMatTN.multiply(aMat));
|
|
92
117
|
atwbMat = atwbMat.add(aMatTN.multiply(bMat));
|
|
93
|
-
rmsTotal += bMat.transpose().multiply(noise).multiply(bMat)[0][0];
|
|
118
|
+
rmsTotal += bMat.transpose().multiply(noise).multiply(bMat).elements[0][0];
|
|
94
119
|
measCount += noise.rows;
|
|
95
120
|
}
|
|
96
121
|
const newWeightedRms = Math.sqrt(rmsTotal / measCount);
|
|
@@ -104,7 +129,7 @@ export class BatchLeastSquaresOD {
|
|
|
104
129
|
weightedRms = newWeightedRms;
|
|
105
130
|
const dX = atwaMat.inverse().multiply(atwbMat);
|
|
106
131
|
for (let i = 0; i < 6; i++) {
|
|
107
|
-
xNom[i] += dX[i][0];
|
|
132
|
+
xNom[i] += dX.elements[i][0];
|
|
108
133
|
}
|
|
109
134
|
if (breakFlag) {
|
|
110
135
|
break;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchLeastSquaresOD.js","sourceRoot":"","sources":["../../src/orbit_determination/BatchLeastSquaresOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAY,KAAK,EAAmC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAuBpB;IACA;IACA;IACA;IACA;IACA;IA3BV,iEAAiE;IACzD,UAAU,CAAkB;IACpC,8BAA8B;IACtB,WAAW,CAAa;IAChC,iCAAiC;IACzB,QAAQ,CAAQ;IACxB,uBAAuB;IACf,MAAM,CAAW;IAEzB;;;;;;;;;;;OAWG;IACH,YACU,aAA4B,EAC5B,QAAe,EACf,WAAwB,EACxB,WAAmB,IAAI,EACvB,WAAmB,IAAI,EACvB,mBAA4B,KAAK;QALjC,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAAO;QACf,gBAAW,GAAX,WAAW,CAAa;QACxB,aAAQ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CAAC;YAEvD,IAAI,SAAS,EAAE;gBACb,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,cAAc,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aACzE;YACD,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,GAAG,cAAc,CAAC,GAAG,WAAW,CAAC,IAAI,SAAS,EAAE;gBACvE,SAAS,GAAG,IAAI,CAAC;aAClB;YACD,WAAW,GAAG,cAAc,CAAC;YAC7B,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC1B,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9B;YACD,IAAI,SAAS,EAAE;gBACb,MAAM;aACP;SACF;QACD,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;QAE/D,OAAO,IAAI,uBAAuB,CAChC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EACzD,UAAU,EACV,WAAW,CACZ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -24,6 +23,9 @@ export declare class BatchLeastSquaresResult {
|
|
|
24
23
|
/**
|
|
25
24
|
* Create a new [BatchLeastSquaresResult] object, containing the solved
|
|
26
25
|
* [state], [covariance], and root-mean-squared error [rms].
|
|
26
|
+
* @param state The solved state.
|
|
27
|
+
* @param covariance The solved covariance.
|
|
28
|
+
* @param rms The root-mean-squared error.
|
|
27
29
|
*/
|
|
28
30
|
constructor(state: J2000, covariance: StateCovariance, rms: number);
|
|
29
31
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -17,9 +16,15 @@
|
|
|
17
16
|
*/
|
|
18
17
|
// / Batch least squares orbit determination result.
|
|
19
18
|
export class BatchLeastSquaresResult {
|
|
19
|
+
state;
|
|
20
|
+
covariance;
|
|
21
|
+
rms;
|
|
20
22
|
/**
|
|
21
23
|
* Create a new [BatchLeastSquaresResult] object, containing the solved
|
|
22
24
|
* [state], [covariance], and root-mean-squared error [rms].
|
|
25
|
+
* @param state The solved state.
|
|
26
|
+
* @param covariance The solved covariance.
|
|
27
|
+
* @param rms The root-mean-squared error.
|
|
23
28
|
*/
|
|
24
29
|
constructor(state, covariance, rms) {
|
|
25
30
|
this.state = state;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchLeastSquaresResult.js","sourceRoot":"","sources":["../../src/orbit_determination/BatchLeastSquaresResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,oDAAoD;AACpD,MAAM,OAAO,uBAAuB;IAQf;IAAqB;IAAoC;IAP5E;;;;;;OAMG;IACH,YAAmB,KAAY,EAAS,UAA2B,EAAS,GAAW;QAApE,UAAK,GAAL,KAAK,CAAO;QAAS,eAAU,GAAV,UAAU,CAAiB;QAAS,QAAG,GAAH,GAAG,CAAQ;QACrF,sBAAsB;IACxB,CAAC;CACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
16
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
17
16
|
*/
|
|
18
|
-
import { EpochUTC, J2000, Vector3D } from 'ootk-core';
|
|
17
|
+
import { EpochUTC, J2000, Kilometers, Vector3D } from 'ootk-core';
|
|
19
18
|
/**
|
|
20
19
|
* Gibbs 3-position inital orbit determination.
|
|
21
20
|
*/
|
|
@@ -28,6 +27,12 @@ export declare class GibbsIOD {
|
|
|
28
27
|
* Attempt to create a state estimate from three inertial position vectors.
|
|
29
28
|
*
|
|
30
29
|
* Throws an error if the positions are not coplanar.
|
|
30
|
+
* @param r1 Position vector 1.
|
|
31
|
+
* @param r2 Position vector 2.
|
|
32
|
+
* @param r3 Position vector 3.
|
|
33
|
+
* @param t2 Time of position 2.
|
|
34
|
+
* @param t3 Time of position 3.
|
|
35
|
+
* @returns State estimate at time t2.
|
|
31
36
|
*/
|
|
32
|
-
solve(r1: Vector3D
|
|
37
|
+
solve(r1: Vector3D<Kilometers>, r2: Vector3D<Kilometers>, r3: Vector3D<Kilometers>, t2: EpochUTC, t3: EpochUTC): J2000;
|
|
33
38
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -22,14 +21,23 @@ import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator';
|
|
|
22
21
|
* Gibbs 3-position inital orbit determination.
|
|
23
22
|
*/
|
|
24
23
|
export class GibbsIOD {
|
|
24
|
+
mu;
|
|
25
25
|
constructor(mu = Earth.mu) {
|
|
26
26
|
this.mu = mu;
|
|
27
27
|
// Nothing to do here.
|
|
28
28
|
}
|
|
29
|
+
/** Abort solve if position plane exceeds this value. */
|
|
30
|
+
static coplanarThreshold_ = (5.0 * DEG2RAD);
|
|
29
31
|
/**
|
|
30
32
|
* Attempt to create a state estimate from three inertial position vectors.
|
|
31
33
|
*
|
|
32
34
|
* Throws an error if the positions are not coplanar.
|
|
35
|
+
* @param r1 Position vector 1.
|
|
36
|
+
* @param r2 Position vector 2.
|
|
37
|
+
* @param r3 Position vector 3.
|
|
38
|
+
* @param t2 Time of position 2.
|
|
39
|
+
* @param t3 Time of position 3.
|
|
40
|
+
* @returns State estimate at time t2.
|
|
33
41
|
*/
|
|
34
42
|
solve(r1, r2, r3, t2, t3) {
|
|
35
43
|
const num = r1.normalize().dot(r2.normalize().cross(r3.normalize()));
|
|
@@ -47,7 +55,7 @@ export class GibbsIOD {
|
|
|
47
55
|
const nm = n.magnitude();
|
|
48
56
|
const dm = d.magnitude();
|
|
49
57
|
const vm = Math.sqrt(this.mu / (nm * dm));
|
|
50
|
-
const vlEci = b.scale(vm / r2m).add(s.scale(vm));
|
|
58
|
+
const vlEci = b.scale((vm / r2m)).add(s.scale(vm));
|
|
51
59
|
const pv = new J2000(t2, r2, vlEci);
|
|
52
60
|
const forceModel = new ForceModel().setGravity(this.mu);
|
|
53
61
|
const orbit = new RungeKutta89Propagator(pv, forceModel);
|
|
@@ -65,6 +73,4 @@ export class GibbsIOD {
|
|
|
65
73
|
return orbit2.propagate(t2);
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
|
-
/** Abort solve if position plane exceeds this value. */
|
|
69
|
-
GibbsIOD.coplanarThreshold_ = (5.0 * DEG2RAD);
|
|
70
76
|
//# sourceMappingURL=GibbsIOD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GibbsIOD.js","sourceRoot":"","sources":["../../src/orbit_determination/GibbsIOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,EAAE,KAAK,EAAsD,MAAM,WAAW,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;GAEG;AACH,MAAM,OAAO,QAAQ;IACA;IAAnB,YAAmB,KAAa,KAAK,CAAC,EAAE;QAArB,OAAE,GAAF,EAAE,CAAmB;QACtC,sBAAsB;IACxB,CAAC;IAED,wDAAwD;IAChD,MAAM,CAAU,kBAAkB,GAAY,CAAC,GAAG,GAAG,OAAO,CAAY,CAAC;IAEjF;;;;;;;;;;OAUG;IACH,KAAK,CACH,EAAwB,EACxB,EAAwB,EACxB,EAAwB,EACxB,EAAY,EACZ,EAAY;QAEZ,MAAM,GAAG,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,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}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author @thkruz Theodore Kruczek
|
|
3
|
-
*
|
|
4
3
|
* @license AGPL-3.0-or-later
|
|
5
|
-
* @
|
|
4
|
+
* @copyright (c) 2020-2024 Theodore Kruczek
|
|
6
5
|
*
|
|
7
6
|
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
8
7
|
* terms of the GNU Affero General Public License as published by the Free Software
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
16
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
17
16
|
*/
|
|
18
|
-
import { J2000 } from 'ootk-core';
|
|
17
|
+
import { J2000, Kilometers } from 'ootk-core';
|
|
19
18
|
import { ObservationOptical } from './../observation/ObservationOptical';
|
|
20
19
|
/**
|
|
21
20
|
* Gooding angles-only initial orbit determination.
|
|
@@ -24,29 +23,29 @@ import { ObservationOptical } from './../observation/ObservationOptical';
|
|
|
24
23
|
*/
|
|
25
24
|
export declare class GoodingIOD {
|
|
26
25
|
private readonly _mu;
|
|
27
|
-
private readonly
|
|
28
|
-
private readonly
|
|
29
|
-
private readonly
|
|
30
|
-
private
|
|
31
|
-
private
|
|
32
|
-
private
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
private
|
|
39
|
-
private
|
|
40
|
-
private
|
|
41
|
-
private
|
|
42
|
-
private
|
|
43
|
-
private
|
|
44
|
-
private
|
|
26
|
+
private readonly o1_;
|
|
27
|
+
private readonly o2_;
|
|
28
|
+
private readonly o3_;
|
|
29
|
+
private vObserverPosition1_;
|
|
30
|
+
private vObserverPosition2_;
|
|
31
|
+
private vObserverPosition3_;
|
|
32
|
+
private r_;
|
|
33
|
+
private v_;
|
|
34
|
+
private t_;
|
|
35
|
+
private r1_;
|
|
36
|
+
private r2_;
|
|
37
|
+
private r3_;
|
|
38
|
+
private rho1_;
|
|
39
|
+
private rho2_;
|
|
40
|
+
private rho3_;
|
|
41
|
+
private d1_;
|
|
42
|
+
private d3_;
|
|
43
|
+
private facFiniteDiff_;
|
|
45
44
|
private readonly _forceModel;
|
|
46
45
|
constructor(o1: ObservationOptical, o2: ObservationOptical, o3: ObservationOptical, mu?: number);
|
|
47
46
|
private _getPositionOnLoS2;
|
|
48
47
|
private _modifyIterate;
|
|
49
48
|
private _computeDerivatives;
|
|
50
|
-
solve(r1Init:
|
|
49
|
+
solve(r1Init: Kilometers, r3Init: Kilometers, nRev?: number, direction?: boolean): J2000;
|
|
51
50
|
private _solveRangeProblem;
|
|
52
51
|
}
|