ootk 4.0.9 → 5.0.0
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/README.md +0 -15
- package/dist/body/Celestial.d.ts +96 -0
- package/dist/body/Celestial.js +124 -0
- package/dist/body/Celestial.js.map +1 -0
- package/dist/body/Earth.d.ts +68 -0
- package/dist/body/Earth.js +198 -0
- package/dist/body/Earth.js.map +1 -0
- package/dist/body/Moon.d.ts +137 -0
- package/dist/body/Moon.js +464 -0
- package/dist/body/Moon.js.map +1 -0
- package/dist/body/NutationAngles.d.ts +38 -0
- package/dist/body/NutationAngles.js +24 -0
- package/dist/body/NutationAngles.js.map +1 -0
- package/dist/body/PrecessionAngles.d.ts +29 -0
- package/dist/body/PrecessionAngles.js +24 -0
- package/dist/body/PrecessionAngles.js.map +1 -0
- package/dist/body/Sun.d.ts +305 -0
- package/dist/body/Sun.js +548 -0
- package/dist/body/Sun.js.map +1 -0
- package/dist/body/index.d.ts +26 -0
- package/dist/body/index.js +27 -0
- package/dist/body/index.js.map +1 -0
- package/dist/coordinate/ClassicalElements.d.ts +132 -0
- package/dist/coordinate/ClassicalElements.js +279 -0
- package/dist/coordinate/ClassicalElements.js.map +1 -0
- package/dist/coordinate/EquinoctialElements.d.ts +114 -0
- package/dist/coordinate/EquinoctialElements.js +172 -0
- package/dist/coordinate/EquinoctialElements.js.map +1 -0
- package/dist/coordinate/FormatTle.d.ts +95 -0
- package/dist/coordinate/FormatTle.js +184 -0
- package/dist/coordinate/FormatTle.js.map +1 -0
- package/dist/coordinate/Geodetic.d.ts +110 -0
- package/dist/coordinate/Geodetic.js +163 -0
- package/dist/coordinate/Geodetic.js.map +1 -0
- package/dist/coordinate/Hill.d.ts +1 -1
- package/dist/coordinate/Hill.js +1 -1
- package/dist/coordinate/Hill.js.map +1 -1
- package/dist/coordinate/ITRF.d.ts +75 -0
- package/dist/coordinate/ITRF.js +135 -0
- package/dist/coordinate/ITRF.js.map +1 -0
- package/dist/coordinate/J2000.d.ts +65 -0
- package/dist/coordinate/J2000.js +120 -0
- package/dist/coordinate/J2000.js.map +1 -0
- package/dist/coordinate/RIC.d.ts +64 -0
- package/dist/coordinate/RIC.js +79 -0
- package/dist/coordinate/RIC.js.map +1 -0
- package/dist/coordinate/RelativeState.d.ts +70 -0
- package/dist/coordinate/RelativeState.js +79 -0
- package/dist/coordinate/RelativeState.js.map +1 -0
- package/dist/coordinate/StateVector.d.ts +76 -0
- package/dist/coordinate/StateVector.js +97 -0
- package/dist/coordinate/StateVector.js.map +1 -0
- package/dist/coordinate/TEME.d.ts +57 -0
- package/dist/coordinate/TEME.js +89 -0
- package/dist/coordinate/TEME.js.map +1 -0
- package/dist/coordinate/Tle.d.ts +430 -0
- package/dist/coordinate/Tle.js +865 -0
- package/dist/coordinate/Tle.js.map +1 -0
- package/dist/coordinate/index.d.ts +11 -0
- package/dist/coordinate/index.js +12 -0
- package/dist/coordinate/index.js.map +1 -1
- package/dist/coordinate/tle-format-data.d.ts +41 -0
- package/dist/coordinate/tle-format-data.js +46 -0
- package/dist/coordinate/tle-format-data.js.map +1 -0
- package/dist/covariance/CovarianceSample.d.ts +1 -1
- package/dist/covariance/CovarianceSample.js +1 -1
- package/dist/covariance/CovarianceSample.js.map +1 -1
- package/dist/covariance/StateCovariance.d.ts +1 -1
- package/dist/covariance/StateCovariance.js +1 -1
- package/dist/covariance/StateCovariance.js.map +1 -1
- package/dist/data/DataHandler.d.ts +66 -0
- package/dist/data/DataHandler.js +80 -0
- package/dist/data/DataHandler.js.map +1 -0
- package/dist/data/values/Egm96Data.d.ts +37 -0
- package/dist/data/values/Egm96Data.js +63 -0
- package/dist/data/values/Egm96Data.js.map +1 -0
- package/dist/data/values/HpAtmosphereData.d.ts +33 -0
- package/dist/data/values/HpAtmosphereData.js +58 -0
- package/dist/data/values/HpAtmosphereData.js.map +1 -0
- package/dist/data/values/HpAtmosphereResult.d.ts +29 -0
- package/dist/data/values/HpAtmosphereResult.js +38 -0
- package/dist/data/values/HpAtmosphereResult.js.map +1 -0
- package/dist/data/values/Iau1980Data.d.ts +36 -0
- package/dist/data/values/Iau1980Data.js +52 -0
- package/dist/data/values/Iau1980Data.js.map +1 -0
- package/dist/data/values/LeapSecond.d.ts +27 -0
- package/dist/data/values/LeapSecond.js +35 -0
- package/dist/data/values/LeapSecond.js.map +1 -0
- package/dist/data/values/LeapSecondData.d.ts +41 -0
- package/dist/data/values/LeapSecondData.js +103 -0
- package/dist/data/values/LeapSecondData.js.map +1 -0
- package/dist/data/values/egm96.d.ts +24 -0
- package/dist/data/values/egm96.js +726 -0
- package/dist/data/values/egm96.js.map +1 -0
- package/dist/data/values/hpAtmosphere.d.ts +24 -0
- package/dist/data/values/hpAtmosphere.js +76 -0
- package/dist/data/values/hpAtmosphere.js.map +1 -0
- package/dist/data/values/iau1980.d.ts +24 -0
- package/dist/data/values/iau1980.js +30 -0
- package/dist/data/values/iau1980.js.map +1 -0
- package/dist/enums/AngularDiameterMethod.d.ts +27 -0
- package/dist/enums/AngularDiameterMethod.js +29 -0
- package/dist/enums/AngularDiameterMethod.js.map +1 -0
- package/dist/enums/AngularDistanceMethod.d.ts +27 -0
- package/dist/enums/AngularDistanceMethod.js +29 -0
- package/dist/enums/AngularDistanceMethod.js.map +1 -0
- package/dist/enums/OrbitRegime.d.ts +30 -0
- package/dist/enums/OrbitRegime.js +32 -0
- package/dist/enums/OrbitRegime.js.map +1 -0
- package/dist/enums/PassType.d.ts +28 -0
- package/dist/enums/PassType.js +30 -0
- package/dist/enums/PassType.js.map +1 -0
- package/dist/enums/Sgp4OpsMode.d.ts +26 -0
- package/dist/enums/Sgp4OpsMode.js +28 -0
- package/dist/enums/Sgp4OpsMode.js.map +1 -0
- package/dist/enums/index.d.ts +5 -0
- package/dist/enums/index.js +5 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/force/AtmosphericDrag.d.ts +1 -1
- package/dist/force/AtmosphericDrag.js +1 -1
- package/dist/force/AtmosphericDrag.js.map +1 -1
- package/dist/force/EarthGravity.d.ts +1 -1
- package/dist/force/EarthGravity.js +1 -1
- package/dist/force/EarthGravity.js.map +1 -1
- package/dist/force/Force.d.ts +1 -1
- package/dist/force/ForceModel.d.ts +1 -1
- package/dist/force/ForceModel.js +1 -1
- package/dist/force/ForceModel.js.map +1 -1
- package/dist/force/Gravity.d.ts +1 -1
- package/dist/force/Gravity.js +1 -1
- package/dist/force/Gravity.js.map +1 -1
- package/dist/force/SolarRadiationPressure.d.ts +1 -1
- package/dist/force/SolarRadiationPressure.js +1 -1
- package/dist/force/SolarRadiationPressure.js.map +1 -1
- package/dist/force/ThirdBodyGravity.d.ts +1 -1
- package/dist/force/ThirdBodyGravity.js +1 -1
- package/dist/force/ThirdBodyGravity.js.map +1 -1
- package/dist/force/Thrust.d.ts +1 -1
- package/dist/force/Thrust.js +1 -1
- package/dist/force/Thrust.js.map +1 -1
- package/dist/interfaces/BaseObjectParams.d.ts +31 -0
- package/dist/interfaces/BaseObjectParams.js +24 -0
- package/dist/interfaces/BaseObjectParams.js.map +1 -0
- package/dist/interfaces/ClassicalElementsParams.d.ts +33 -0
- package/dist/interfaces/ClassicalElementsParams.js +24 -0
- package/dist/interfaces/ClassicalElementsParams.js.map +1 -0
- package/dist/interfaces/EquinoctialElementsParams.d.ts +35 -0
- package/dist/interfaces/EquinoctialElementsParams.js +24 -0
- package/dist/interfaces/EquinoctialElementsParams.js.map +1 -0
- package/dist/interfaces/GroundPositionParams.d.ts +28 -0
- package/dist/interfaces/GroundPositionParams.js +24 -0
- package/dist/interfaces/GroundPositionParams.js.map +1 -0
- package/dist/interfaces/OmmFormat.d.ts +62 -0
- package/dist/interfaces/OmmFormat.js +2 -0
- package/dist/interfaces/OmmFormat.js.map +1 -0
- package/dist/interfaces/OptionsParams.d.ts +3 -0
- package/dist/interfaces/OptionsParams.js +2 -0
- package/dist/interfaces/OptionsParams.js.map +1 -0
- package/dist/interfaces/RfSensorParams.d.ts +1 -1
- package/dist/interfaces/SatelliteParams.d.ts +18 -0
- package/dist/interfaces/SatelliteParams.js +2 -0
- package/dist/interfaces/SatelliteParams.js.map +1 -0
- package/dist/interfaces/SensorParams.d.ts +38 -0
- package/dist/interfaces/SensorParams.js +2 -0
- package/dist/interfaces/SensorParams.js.map +1 -0
- package/dist/interfaces/StarObjectParams.d.ts +10 -0
- package/dist/interfaces/StarObjectParams.js +2 -0
- package/dist/interfaces/StarObjectParams.js.map +1 -0
- package/dist/interfaces/TimeVariables.d.ts +6 -0
- package/dist/interfaces/TimeVariables.js +2 -0
- package/dist/interfaces/TimeVariables.js.map +1 -0
- package/dist/interfaces/index.d.ts +8 -0
- package/dist/interpolator/ChebyshevCoefficients.d.ts +1 -1
- package/dist/interpolator/ChebyshevCoefficients.js +1 -1
- package/dist/interpolator/ChebyshevCoefficients.js.map +1 -1
- package/dist/interpolator/ChebyshevInterpolator.d.ts +1 -1
- package/dist/interpolator/ChebyshevInterpolator.js +1 -1
- package/dist/interpolator/ChebyshevInterpolator.js.map +1 -1
- package/dist/interpolator/CubicSpline.d.ts +1 -1
- package/dist/interpolator/CubicSplineInterpolator.d.ts +1 -1
- package/dist/interpolator/CubicSplineInterpolator.js +1 -1
- package/dist/interpolator/CubicSplineInterpolator.js.map +1 -1
- package/dist/interpolator/Interpolator.d.ts +1 -1
- package/dist/interpolator/Interpolator.js +1 -1
- package/dist/interpolator/Interpolator.js.map +1 -1
- package/dist/interpolator/LagrangeInterpolator.d.ts +1 -1
- package/dist/interpolator/LagrangeInterpolator.js +1 -1
- package/dist/interpolator/LagrangeInterpolator.js.map +1 -1
- package/dist/interpolator/StateInterpolator.d.ts +1 -1
- package/dist/interpolator/VerletBlendInterpolator.d.ts +1 -1
- package/dist/interpolator/VerletBlendInterpolator.js +1 -1
- package/dist/interpolator/VerletBlendInterpolator.js.map +1 -1
- package/dist/main.d.ts +11 -3
- package/dist/main.js +11 -3
- package/dist/main.js.map +1 -1
- package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +1 -1
- package/dist/maneuver/TwoBurnOrbitTransfer.js +1 -1
- package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -1
- package/dist/maneuver/Waypoint.d.ts +1 -1
- package/dist/maneuver/Waypoint.js +1 -1
- package/dist/maneuver/Waypoint.js.map +1 -1
- package/dist/objects/BaseObject.d.ts +74 -0
- package/dist/objects/BaseObject.js +151 -0
- package/dist/objects/BaseObject.js.map +1 -0
- package/dist/objects/DetailedSatellite.d.ts +2 -1
- package/dist/objects/DetailedSatellite.js +2 -2
- package/dist/objects/DetailedSatellite.js.map +1 -1
- package/dist/objects/DetailedSensor.d.ts +2 -1
- package/dist/objects/DetailedSensor.js +1 -1
- package/dist/objects/DetailedSensor.js.map +1 -1
- package/dist/objects/GroundObject.d.ts +85 -0
- package/dist/objects/GroundObject.js +143 -0
- package/dist/objects/GroundObject.js.map +1 -0
- package/dist/objects/LandObject.d.ts +2 -1
- package/dist/objects/LandObject.js +1 -1
- package/dist/objects/LandObject.js.map +1 -1
- package/dist/objects/Marker.d.ts +1 -1
- package/dist/objects/Marker.js +1 -1
- package/dist/objects/Marker.js.map +1 -1
- package/dist/objects/RfSensor.d.ts +1 -2
- package/dist/objects/RfSensor.js +1 -2
- package/dist/objects/RfSensor.js.map +1 -1
- package/dist/objects/Satellite.d.ts +226 -0
- package/dist/objects/Satellite.js +443 -0
- package/dist/objects/Satellite.js.map +1 -0
- package/dist/objects/Sensor.d.ts +100 -0
- package/dist/objects/Sensor.js +239 -0
- package/dist/objects/Sensor.js.map +1 -0
- package/dist/objects/Star.d.ts +36 -0
- package/dist/objects/Star.js +59 -0
- package/dist/objects/Star.js.map +1 -0
- package/dist/objects/index.d.ts +5 -0
- package/dist/objects/index.js +5 -0
- package/dist/objects/index.js.map +1 -1
- package/dist/observation/Observation.d.ts +1 -1
- package/dist/observation/ObservationOptical.d.ts +1 -1
- package/dist/observation/ObservationOptical.js +1 -1
- package/dist/observation/ObservationOptical.js.map +1 -1
- package/dist/observation/ObservationRadar.d.ts +1 -1
- package/dist/observation/ObservationRadar.js +1 -1
- package/dist/observation/ObservationRadar.js.map +1 -1
- package/dist/observation/ObservationUtils.d.ts +3 -1
- package/dist/observation/ObservationUtils.js +15 -1
- package/dist/observation/ObservationUtils.js.map +1 -1
- package/dist/observation/RAE.d.ts +111 -0
- package/dist/observation/RAE.js +215 -0
- package/dist/observation/RAE.js.map +1 -0
- package/dist/observation/RadecGeocentric.d.ts +111 -0
- package/dist/observation/RadecGeocentric.js +169 -0
- package/dist/observation/RadecGeocentric.js.map +1 -0
- package/dist/observation/RadecTopocentric.d.ts +123 -0
- package/dist/observation/RadecTopocentric.js +196 -0
- package/dist/observation/RadecTopocentric.js.map +1 -0
- package/dist/observation/index.d.ts +26 -0
- package/dist/observation/index.js +27 -0
- package/dist/observation/index.js.map +1 -0
- package/dist/operations/BoxMuller.d.ts +1 -1
- package/dist/operations/BoxMuller.js +1 -1
- package/dist/operations/BoxMuller.js.map +1 -1
- package/dist/operations/EulerAngles.d.ts +1 -1
- package/dist/operations/EulerAngles.js +1 -1
- package/dist/operations/EulerAngles.js.map +1 -1
- package/dist/operations/Matrix.d.ts +170 -0
- package/dist/operations/Matrix.js +405 -0
- package/dist/operations/Matrix.js.map +1 -0
- package/dist/operations/Quaternion.d.ts +1 -1
- package/dist/operations/Quaternion.js +1 -1
- package/dist/operations/Quaternion.js.map +1 -1
- package/dist/operations/Random.d.ts +40 -0
- package/dist/operations/Random.js +50 -0
- package/dist/operations/Random.js.map +1 -0
- package/dist/operations/RandomGaussianSource.d.ts +1 -1
- package/dist/operations/RandomGaussianSource.js +1 -1
- package/dist/operations/RandomGaussianSource.js.map +1 -1
- package/dist/operations/Vector.d.ts +262 -0
- package/dist/operations/Vector.js +415 -0
- package/dist/operations/Vector.js.map +1 -0
- package/dist/operations/Vector3D.d.ts +86 -0
- package/dist/operations/Vector3D.js +241 -0
- package/dist/operations/Vector3D.js.map +1 -0
- package/dist/operations/operations.d.ts +26 -0
- package/dist/operations/operations.js +27 -0
- package/dist/operations/operations.js.map +1 -0
- package/dist/optimize/ChebyshevCompressor.js +1 -1
- package/dist/optimize/ChebyshevCompressor.js.map +1 -1
- package/dist/optimize/PolynomialRegression.js +1 -1
- package/dist/optimize/PolynomialRegression.js.map +1 -1
- package/dist/optimize/SimplexEntry.js +1 -1
- package/dist/optimize/SimplexEntry.js.map +1 -1
- package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +1 -1
- package/dist/orbit_determination/BatchLeastSquaresOD.js +1 -1
- package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -1
- package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +1 -1
- package/dist/orbit_determination/GibbsIOD.d.ts +1 -1
- package/dist/orbit_determination/GibbsIOD.js +1 -1
- package/dist/orbit_determination/GibbsIOD.js.map +1 -1
- package/dist/orbit_determination/GoodingIOD.d.ts +1 -1
- package/dist/orbit_determination/GoodingIOD.js +1 -1
- package/dist/orbit_determination/GoodingIOD.js.map +1 -1
- package/dist/orbit_determination/HerrickGibbsIOD.d.ts +1 -1
- package/dist/orbit_determination/HerrickGibbsIOD.js +1 -1
- package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -1
- package/dist/orbit_determination/LambertIOD.d.ts +1 -1
- package/dist/orbit_determination/LambertIOD.js +1 -1
- package/dist/orbit_determination/LambertIOD.js.map +1 -1
- package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +1 -1
- package/dist/orbit_determination/ModifiedGoodingIOD.js +1 -1
- package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -1
- package/dist/orbit_determination/index.d.ts +7 -0
- package/dist/orbit_determination/index.js +8 -0
- package/dist/orbit_determination/index.js.map +1 -0
- package/dist/propagator/KeplerPropagator.d.ts +1 -1
- package/dist/propagator/KeplerPropagator.js +1 -1
- package/dist/propagator/KeplerPropagator.js.map +1 -1
- package/dist/propagator/Propagator.d.ts +1 -1
- package/dist/propagator/Propagator.js +1 -1
- package/dist/propagator/Propagator.js.map +1 -1
- package/dist/propagator/RkCheckpoint.d.ts +1 -1
- package/dist/propagator/RkResult.d.ts +1 -1
- package/dist/propagator/RungeKutta4Propagator.d.ts +1 -1
- package/dist/propagator/RungeKutta4Propagator.js +1 -1
- package/dist/propagator/RungeKutta4Propagator.js.map +1 -1
- package/dist/propagator/RungeKuttaAdaptive.d.ts +1 -1
- package/dist/propagator/RungeKuttaAdaptive.js +1 -1
- package/dist/propagator/RungeKuttaAdaptive.js.map +1 -1
- package/dist/propagator/Sgp4Propagator.d.ts +1 -1
- package/dist/sgp4/index.d.ts +23 -0
- package/dist/sgp4/index.js +24 -0
- package/dist/sgp4/index.js.map +1 -0
- package/dist/sgp4/sgp4-error.d.ts +22 -0
- package/dist/sgp4/sgp4-error.js +44 -0
- package/dist/sgp4/sgp4-error.js.map +1 -0
- package/dist/sgp4/sgp4.d.ts +102 -0
- package/dist/sgp4/sgp4.js +3167 -0
- package/dist/sgp4/sgp4.js.map +1 -0
- package/dist/smoothing/ExponentialSmoothing.d.ts +1 -1
- package/dist/time/Epoch.d.ts +44 -0
- package/dist/time/Epoch.js +109 -0
- package/dist/time/Epoch.js.map +1 -0
- package/dist/time/EpochGPS.d.ts +42 -0
- package/dist/time/EpochGPS.js +70 -0
- package/dist/time/EpochGPS.js.map +1 -0
- package/dist/time/EpochTAI.d.ts +26 -0
- package/dist/time/EpochTAI.js +27 -0
- package/dist/time/EpochTAI.js.map +1 -0
- package/dist/time/EpochTDB.d.ts +26 -0
- package/dist/time/EpochTDB.js +27 -0
- package/dist/time/EpochTDB.js.map +1 -0
- package/dist/time/EpochTT.d.ts +26 -0
- package/dist/time/EpochTT.js +27 -0
- package/dist/time/EpochTT.js.map +1 -0
- package/dist/time/EpochUTC.d.ts +59 -0
- package/dist/time/EpochUTC.js +137 -0
- package/dist/time/EpochUTC.js.map +1 -0
- package/dist/time/EpochWindow.d.ts +28 -0
- package/dist/time/EpochWindow.js +31 -0
- package/dist/time/EpochWindow.js.map +1 -0
- package/dist/time/TimeStamped.d.ts +43 -0
- package/dist/time/TimeStamped.js +46 -0
- package/dist/time/TimeStamped.js.map +1 -0
- package/dist/time/index.d.ts +30 -0
- package/dist/time/index.js +31 -0
- package/dist/time/index.js.map +1 -0
- package/dist/transforms/TransformCache.d.ts +27 -0
- package/dist/transforms/TransformCache.js +41 -0
- package/dist/transforms/TransformCache.js.map +1 -0
- package/dist/transforms/conversions.d.ts +63 -0
- package/dist/transforms/conversions.js +88 -0
- package/dist/transforms/conversions.js.map +1 -0
- package/dist/transforms/index.d.ts +1 -0
- package/dist/transforms/index.js +1 -0
- package/dist/transforms/index.js.map +1 -1
- package/dist/transforms/transforms.d.ts +166 -2
- package/dist/transforms/transforms.js +372 -1
- package/dist/transforms/transforms.js.map +1 -1
- package/dist/types/types.d.ts +674 -2
- package/dist/types/types.js +36 -0
- package/dist/types/types.js.map +1 -1
- package/dist/utils/constants.d.ts +80 -0
- package/dist/utils/constants.js +87 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/functions.d.ts +228 -0
- package/dist/utils/functions.js +476 -0
- package/dist/utils/functions.js.map +1 -1
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/jacobian.d.ts +1 -1
- package/dist/utils/jacobian.js +1 -1
- package/dist/utils/jacobian.js.map +1 -1
- package/dist/utils/linearDistance.d.ts +8 -0
- package/dist/utils/linearDistance.js +10 -0
- package/dist/utils/linearDistance.js.map +1 -0
- package/package.json +4 -7
- package/src/body/Celestial.ts +134 -0
- package/src/body/Earth.ts +260 -0
- package/src/body/Moon.ts +556 -0
- package/src/body/NutationAngles.ts +40 -0
- package/src/body/PrecessionAngles.ts +31 -0
- package/src/body/Sun.ts +669 -0
- package/src/body/index.ts +27 -0
- package/src/body/suncalc.LICENSE.md +18 -0
- package/src/coordinate/ClassicalElements.ts +326 -0
- package/src/coordinate/EquinoctialElements.ts +189 -0
- package/src/coordinate/FormatTle.ts +214 -0
- package/src/coordinate/Geodetic.ts +186 -0
- package/src/coordinate/Hill.ts +1 -1
- package/src/coordinate/ITRF.ts +146 -0
- package/src/coordinate/J2000.ts +130 -0
- package/src/coordinate/RIC.ts +87 -0
- package/src/coordinate/RelativeState.ts +101 -0
- package/src/coordinate/StateVector.ts +122 -0
- package/src/coordinate/TEME.ts +97 -0
- package/src/coordinate/Tle.ts +1024 -0
- package/src/coordinate/index.ts +12 -0
- package/src/coordinate/tle-format-data.ts +47 -0
- package/src/covariance/CovarianceSample.ts +1 -1
- package/src/covariance/StateCovariance.ts +1 -1
- package/src/data/DataHandler.ts +88 -0
- package/src/data/values/Egm96Data.ts +75 -0
- package/src/data/values/HpAtmosphereData.ts +76 -0
- package/src/data/values/HpAtmosphereResult.ts +41 -0
- package/src/data/values/Iau1980Data.ts +63 -0
- package/src/data/values/LeapSecond.ts +37 -0
- package/src/data/values/LeapSecondData.ts +113 -0
- package/src/data/values/egm96.ts +728 -0
- package/src/data/values/hpAtmosphere.ts +79 -0
- package/src/data/values/iau1980.ts +32 -0
- package/src/enums/AngularDiameterMethod.ts +28 -0
- package/src/enums/AngularDistanceMethod.ts +28 -0
- package/src/enums/OrbitRegime.ts +31 -0
- package/src/enums/PassType.ts +29 -0
- package/src/enums/Sgp4OpsMode.ts +27 -0
- package/src/enums/index.ts +5 -0
- package/src/force/AtmosphericDrag.ts +1 -1
- package/src/force/EarthGravity.ts +1 -1
- package/src/force/Force.ts +1 -1
- package/src/force/ForceModel.ts +1 -1
- package/src/force/Gravity.ts +1 -1
- package/src/force/SolarRadiationPressure.ts +1 -1
- package/src/force/ThirdBodyGravity.ts +1 -1
- package/src/force/Thrust.ts +1 -1
- package/src/interfaces/BaseObjectParams.ts +33 -0
- package/src/interfaces/ClassicalElementsParams.ts +35 -0
- package/src/interfaces/EquinoctialElementsParams.ts +37 -0
- package/src/interfaces/GroundPositionParams.ts +30 -0
- package/src/interfaces/OmmFormat.ts +63 -0
- package/src/interfaces/OptionsParams.ts +3 -0
- package/src/interfaces/RfSensorParams.ts +1 -1
- package/src/interfaces/SatelliteParams.ts +20 -0
- package/src/interfaces/SensorParams.ts +39 -0
- package/src/interfaces/StarObjectParams.ts +11 -0
- package/src/interfaces/TimeVariables.ts +7 -0
- package/src/interfaces/index.ts +8 -0
- package/src/interpolator/ChebyshevCoefficients.ts +1 -1
- package/src/interpolator/ChebyshevInterpolator.ts +1 -1
- package/src/interpolator/CubicSpline.ts +1 -1
- package/src/interpolator/CubicSplineInterpolator.ts +1 -1
- package/src/interpolator/Interpolator.ts +1 -1
- package/src/interpolator/LagrangeInterpolator.ts +1 -1
- package/src/interpolator/StateInterpolator.ts +1 -1
- package/src/interpolator/VerletBlendInterpolator.ts +1 -1
- package/src/main.ts +11 -3
- package/src/maneuver/TwoBurnOrbitTransfer.ts +1 -1
- package/src/maneuver/Waypoint.ts +1 -1
- package/src/objects/BaseObject.ts +171 -0
- package/src/objects/DetailedSatellite.ts +3 -3
- package/src/objects/DetailedSensor.ts +2 -1
- package/src/objects/GroundObject.ts +176 -0
- package/src/objects/LandObject.ts +2 -1
- package/src/objects/Marker.ts +1 -1
- package/src/objects/RfSensor.ts +1 -2
- package/src/objects/Satellite.ts +552 -0
- package/src/objects/Sensor.ts +280 -0
- package/src/objects/Star.ts +96 -0
- package/src/objects/index.ts +5 -0
- package/src/observation/Observation.ts +1 -1
- package/src/observation/ObservationOptical.ts +1 -1
- package/src/observation/ObservationRadar.ts +1 -1
- package/src/observation/ObservationUtils.ts +30 -1
- package/src/observation/RAE.ts +262 -0
- package/src/observation/RadecGeocentric.ts +206 -0
- package/src/observation/RadecTopocentric.ts +241 -0
- package/src/observation/index.ts +27 -0
- package/src/operations/BoxMuller.ts +1 -1
- package/src/operations/EulerAngles.ts +1 -1
- package/src/operations/Matrix.ts +473 -0
- package/src/operations/Quaternion.ts +1 -1
- package/src/operations/Random.ts +54 -0
- package/src/operations/RandomGaussianSource.ts +1 -1
- package/src/operations/Vector.ts +484 -0
- package/src/operations/Vector3D.ts +289 -0
- package/src/operations/operations.ts +27 -0
- package/src/optimize/ChebyshevCompressor.ts +1 -1
- package/src/optimize/PolynomialRegression.ts +1 -1
- package/src/optimize/SimplexEntry.ts +1 -1
- package/src/orbit_determination/BatchLeastSquaresOD.ts +1 -1
- package/src/orbit_determination/BatchLeastSquaresResult.ts +1 -1
- package/src/orbit_determination/GibbsIOD.ts +3 -1
- package/src/orbit_determination/GoodingIOD.ts +1 -1
- package/src/orbit_determination/HerrickGibbsIOD.ts +1 -1
- package/src/orbit_determination/LambertIOD.ts +1 -1
- package/src/orbit_determination/ModifiedGoodingIOD.ts +1 -1
- package/src/orbit_determination/index.ts +7 -0
- package/src/propagator/KeplerPropagator.ts +1 -1
- package/src/propagator/Propagator.ts +1 -1
- package/src/propagator/RkCheckpoint.ts +1 -1
- package/src/propagator/RkResult.ts +1 -1
- package/src/propagator/RungeKutta4Propagator.ts +1 -1
- package/src/propagator/RungeKuttaAdaptive.ts +1 -1
- package/src/propagator/Sgp4Propagator.ts +1 -1
- package/src/sgp4/index.ts +24 -0
- package/src/sgp4/sgp4-error.ts +53 -0
- package/src/sgp4/sgp4.LICENSE.md +28 -0
- package/src/sgp4/sgp4.ts +3986 -0
- package/src/smoothing/ExponentialSmoothing.ts +1 -1
- package/src/time/Epoch.ts +128 -0
- package/src/time/EpochGPS.ts +76 -0
- package/src/time/EpochTAI.ts +27 -0
- package/src/time/EpochTDB.ts +27 -0
- package/src/time/EpochTT.ts +27 -0
- package/src/time/EpochUTC.ts +188 -0
- package/src/time/EpochWindow.ts +33 -0
- package/src/time/TimeStamped.ts +50 -0
- package/src/time/index.ts +31 -0
- package/src/transforms/TransformCache.ts +46 -0
- package/src/transforms/conversions.ts +98 -0
- package/src/transforms/index.ts +1 -0
- package/src/transforms/transforms.ts +478 -2
- package/src/types/types.ts +721 -2
- package/src/utils/constants.ts +113 -0
- package/src/utils/functions.ts +562 -0
- package/src/utils/index.ts +3 -1
- package/src/utils/jacobian.ts +1 -1
- package/src/utils/linearDistance.ts +11 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2025 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
import { Degrees, DegreesPerSecond, Kilometers, KilometersPerSecond, Radians, RadiansPerSecond } from '../main.js';
|
|
24
|
+
import { J2000 } from '../coordinate/J2000.js';
|
|
25
|
+
import { AngularDistanceMethod } from '../enums/AngularDistanceMethod.js';
|
|
26
|
+
import { Vector3D } from '../operations/Vector3D.js';
|
|
27
|
+
import { EpochUTC } from '../time/EpochUTC.js';
|
|
28
|
+
/**
|
|
29
|
+
* Represents a topocentric right ascension and declination observation.
|
|
30
|
+
*
|
|
31
|
+
* Topocentric coordinates take into account the observer's exact location on the Earth's surface. This model is crucial
|
|
32
|
+
* for precise measurements of local astronomical events and nearby celestial objects, where the observer's latitude,
|
|
33
|
+
* longitude, and altitude can significantly affect the observed position due to parallax. Topocentric coordinates are
|
|
34
|
+
* particularly important for observations of the Moon, planets, and artificial satellites.
|
|
35
|
+
*/
|
|
36
|
+
export declare class RadecTopocentric {
|
|
37
|
+
epoch: EpochUTC;
|
|
38
|
+
rightAscension: Radians;
|
|
39
|
+
declination: Radians;
|
|
40
|
+
range?: Kilometers | undefined;
|
|
41
|
+
rightAscensionRate?: (RadiansPerSecond | null) | undefined;
|
|
42
|
+
declinationRate?: (RadiansPerSecond | null) | undefined;
|
|
43
|
+
rangeRate?: (KilometersPerSecond | null) | undefined;
|
|
44
|
+
constructor(epoch: EpochUTC, rightAscension: Radians, declination: Radians, range?: Kilometers | undefined, rightAscensionRate?: (RadiansPerSecond | null) | undefined, declinationRate?: (RadiansPerSecond | null) | undefined, rangeRate?: (KilometersPerSecond | null) | undefined);
|
|
45
|
+
/**
|
|
46
|
+
* Create a new RadecTopocentric object, using degrees for the angular values.
|
|
47
|
+
* @param epoch UTC epoch.
|
|
48
|
+
* @param rightAscensionDegrees Right-ascension in degrees.
|
|
49
|
+
* @param declinationDegrees Declination in degrees.
|
|
50
|
+
* @param range Range in km.
|
|
51
|
+
* @param rightAscensionRateDegrees Right-ascension rate in degrees per second.
|
|
52
|
+
* @param declinationRateDegrees Declination rate in degrees per second.
|
|
53
|
+
* @param rangeRate Range rate in km/s.
|
|
54
|
+
* @returns A new RadecTopocentric object.
|
|
55
|
+
*/
|
|
56
|
+
static fromDegrees(epoch: EpochUTC, rightAscensionDegrees: Degrees, declinationDegrees: Degrees, range?: Kilometers, rightAscensionRateDegrees?: DegreesPerSecond, declinationRateDegrees?: DegreesPerSecond, rangeRate?: KilometersPerSecond): RadecTopocentric;
|
|
57
|
+
/**
|
|
58
|
+
* Create a new RadecTopocentric object from a J2000 state vector.
|
|
59
|
+
* @param state Inertial state vector.
|
|
60
|
+
* @param site Site vector.
|
|
61
|
+
* @returns A new RadecTopocentric object.
|
|
62
|
+
*/
|
|
63
|
+
static fromStateVector(state: J2000, site: J2000): RadecTopocentric;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the right ascension in degrees.
|
|
66
|
+
* @returns The right ascension in degrees.
|
|
67
|
+
*/
|
|
68
|
+
get rightAscensionDegrees(): Degrees;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the declination in degrees.
|
|
71
|
+
* @returns The declination in degrees.
|
|
72
|
+
*/
|
|
73
|
+
get declinationDegrees(): Degrees;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the right ascension rate in degrees per second.
|
|
76
|
+
* @returns The right ascension rate in degrees per second, or null if it is not available.
|
|
77
|
+
*/
|
|
78
|
+
get rightAscensionRateDegrees(): DegreesPerSecond | null;
|
|
79
|
+
/**
|
|
80
|
+
* Gets the rate of change of declination in degrees per second.
|
|
81
|
+
* @returns The rate of change of declination in degrees per second, or null if the declination rate is not defined.
|
|
82
|
+
*/
|
|
83
|
+
get declinationRateDegrees(): DegreesPerSecond | null;
|
|
84
|
+
/**
|
|
85
|
+
* Return the position relative to the observer site.
|
|
86
|
+
*
|
|
87
|
+
* An optional range value can be passed to override the value contained in this observation.
|
|
88
|
+
* @param site Observer site.
|
|
89
|
+
* @param range Range in km.
|
|
90
|
+
* @returns A Vector3D object.
|
|
91
|
+
*/
|
|
92
|
+
position(site: J2000, range?: Kilometers): Vector3D<Kilometers>;
|
|
93
|
+
/**
|
|
94
|
+
* Return the velocity relative to the observer site.
|
|
95
|
+
*
|
|
96
|
+
* An optional range and rangeRate value can be passed to override the values contained in this observation.
|
|
97
|
+
* @param site Observer site.
|
|
98
|
+
* @param range Range in km.
|
|
99
|
+
* @param rangeRate Range rate in km/s.
|
|
100
|
+
* @returns A Vector3D object.
|
|
101
|
+
*/
|
|
102
|
+
velocity(site: J2000, range?: Kilometers, rangeRate?: KilometersPerSecond): Vector3D<KilometersPerSecond>;
|
|
103
|
+
/**
|
|
104
|
+
* Calculates the line of sight vector in the topocentric coordinate system.
|
|
105
|
+
* The line of sight vector points from the observer's location towards the celestial object.
|
|
106
|
+
* @returns The line of sight vector as a Vector3D object.
|
|
107
|
+
*/
|
|
108
|
+
lineOfSight(): Vector3D;
|
|
109
|
+
/**
|
|
110
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
111
|
+
* @param radec - The other RadecTopocentric object.
|
|
112
|
+
* @param method - The angular distance method to use.
|
|
113
|
+
* @returns The angular distance.
|
|
114
|
+
*/
|
|
115
|
+
angle(radec: RadecTopocentric, method?: AngularDistanceMethod): Radians;
|
|
116
|
+
/**
|
|
117
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
118
|
+
* @param radec - The other RadecTopocentric object.
|
|
119
|
+
* @param method - The angular distance method to use.
|
|
120
|
+
* @returns The angular distance
|
|
121
|
+
*/
|
|
122
|
+
angleDegrees(radec: RadecTopocentric, method?: AngularDistanceMethod): Degrees;
|
|
123
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2025 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
import { AngularDistanceMethod } from '../enums/AngularDistanceMethod.js';
|
|
24
|
+
import { Vector3D } from '../operations/Vector3D.js';
|
|
25
|
+
import { DEG2RAD, RAD2DEG, TAU } from '../utils/constants.js';
|
|
26
|
+
import { angularDistance } from '../utils/functions.js';
|
|
27
|
+
import { radecToPosition, radecToVelocity } from './ObservationUtils.js';
|
|
28
|
+
/**
|
|
29
|
+
* Represents a topocentric right ascension and declination observation.
|
|
30
|
+
*
|
|
31
|
+
* Topocentric coordinates take into account the observer's exact location on the Earth's surface. This model is crucial
|
|
32
|
+
* for precise measurements of local astronomical events and nearby celestial objects, where the observer's latitude,
|
|
33
|
+
* longitude, and altitude can significantly affect the observed position due to parallax. Topocentric coordinates are
|
|
34
|
+
* particularly important for observations of the Moon, planets, and artificial satellites.
|
|
35
|
+
*/
|
|
36
|
+
export class RadecTopocentric {
|
|
37
|
+
epoch;
|
|
38
|
+
rightAscension;
|
|
39
|
+
declination;
|
|
40
|
+
range;
|
|
41
|
+
rightAscensionRate;
|
|
42
|
+
declinationRate;
|
|
43
|
+
rangeRate;
|
|
44
|
+
constructor(epoch, rightAscension, declination, range, rightAscensionRate, declinationRate, rangeRate) {
|
|
45
|
+
this.epoch = epoch;
|
|
46
|
+
this.rightAscension = rightAscension;
|
|
47
|
+
this.declination = declination;
|
|
48
|
+
this.range = range;
|
|
49
|
+
this.rightAscensionRate = rightAscensionRate;
|
|
50
|
+
this.declinationRate = declinationRate;
|
|
51
|
+
this.rangeRate = rangeRate;
|
|
52
|
+
// Nothing to do here.
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a new RadecTopocentric object, using degrees for the angular values.
|
|
56
|
+
* @param epoch UTC epoch.
|
|
57
|
+
* @param rightAscensionDegrees Right-ascension in degrees.
|
|
58
|
+
* @param declinationDegrees Declination in degrees.
|
|
59
|
+
* @param range Range in km.
|
|
60
|
+
* @param rightAscensionRateDegrees Right-ascension rate in degrees per second.
|
|
61
|
+
* @param declinationRateDegrees Declination rate in degrees per second.
|
|
62
|
+
* @param rangeRate Range rate in km/s.
|
|
63
|
+
* @returns A new RadecTopocentric object.
|
|
64
|
+
*/
|
|
65
|
+
static fromDegrees(epoch, rightAscensionDegrees, declinationDegrees, range, rightAscensionRateDegrees, declinationRateDegrees, rangeRate) {
|
|
66
|
+
const rightAscensionRate = rightAscensionRateDegrees
|
|
67
|
+
? rightAscensionRateDegrees * DEG2RAD
|
|
68
|
+
: null;
|
|
69
|
+
const declinationRate = declinationRateDegrees
|
|
70
|
+
? declinationRateDegrees * DEG2RAD
|
|
71
|
+
: null;
|
|
72
|
+
return new RadecTopocentric(epoch, rightAscensionDegrees * DEG2RAD, declinationDegrees * DEG2RAD, range, rightAscensionRate, declinationRate, rangeRate);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Create a new RadecTopocentric object from a J2000 state vector.
|
|
76
|
+
* @param state Inertial state vector.
|
|
77
|
+
* @param site Site vector.
|
|
78
|
+
* @returns A new RadecTopocentric object.
|
|
79
|
+
*/
|
|
80
|
+
static fromStateVector(state, site) {
|
|
81
|
+
const p = state.position.subtract(site.position);
|
|
82
|
+
const pI = p.x;
|
|
83
|
+
const pJ = p.y;
|
|
84
|
+
const pK = p.z;
|
|
85
|
+
const pMag = p.magnitude();
|
|
86
|
+
const declination = Math.asin(pK / pMag);
|
|
87
|
+
const pDot = state.velocity.subtract(site.velocity);
|
|
88
|
+
const pIDot = pDot.x;
|
|
89
|
+
const pJDot = pDot.y;
|
|
90
|
+
const pKDot = pDot.z;
|
|
91
|
+
const pIJMag = Math.sqrt(pI * pI + pJ * pJ);
|
|
92
|
+
let rightAscension;
|
|
93
|
+
if (pIJMag !== 0) {
|
|
94
|
+
rightAscension = Math.atan2(pJ, pI);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
rightAscension = Math.atan2(pJDot, pIDot);
|
|
98
|
+
}
|
|
99
|
+
const rangeRate = p.dot(pDot) / pMag;
|
|
100
|
+
const rightAscensionRate = (pIDot * pJ - pJDot * pI) / (-(pJ * pJ) - pI * pI);
|
|
101
|
+
const declinationRate = (pKDot - rangeRate * Math.sin(declination)) / pIJMag;
|
|
102
|
+
return new RadecTopocentric(state.epoch, rightAscension % TAU, declination, pMag, rightAscensionRate, declinationRate, rangeRate);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Gets the right ascension in degrees.
|
|
106
|
+
* @returns The right ascension in degrees.
|
|
107
|
+
*/
|
|
108
|
+
get rightAscensionDegrees() {
|
|
109
|
+
return this.rightAscension * RAD2DEG;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Gets the declination in degrees.
|
|
113
|
+
* @returns The declination in degrees.
|
|
114
|
+
*/
|
|
115
|
+
get declinationDegrees() {
|
|
116
|
+
return this.declination * RAD2DEG;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Gets the right ascension rate in degrees per second.
|
|
120
|
+
* @returns The right ascension rate in degrees per second, or null if it is not available.
|
|
121
|
+
*/
|
|
122
|
+
get rightAscensionRateDegrees() {
|
|
123
|
+
return this.rightAscensionRate
|
|
124
|
+
? this.rightAscensionRate * RAD2DEG
|
|
125
|
+
: null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Gets the rate of change of declination in degrees per second.
|
|
129
|
+
* @returns The rate of change of declination in degrees per second, or null if the declination rate is not defined.
|
|
130
|
+
*/
|
|
131
|
+
get declinationRateDegrees() {
|
|
132
|
+
return this.declinationRate
|
|
133
|
+
? this.declinationRate * RAD2DEG
|
|
134
|
+
: null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Return the position relative to the observer site.
|
|
138
|
+
*
|
|
139
|
+
* An optional range value can be passed to override the value contained in this observation.
|
|
140
|
+
* @param site Observer site.
|
|
141
|
+
* @param range Range in km.
|
|
142
|
+
* @returns A Vector3D object.
|
|
143
|
+
*/
|
|
144
|
+
position(site, range) {
|
|
145
|
+
const r = range ?? this.range ?? 1.0;
|
|
146
|
+
return radecToPosition(this.rightAscension, this.declination, r).add(site.position);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Return the velocity relative to the observer site.
|
|
150
|
+
*
|
|
151
|
+
* An optional range and rangeRate value can be passed to override the values contained in this observation.
|
|
152
|
+
* @param site Observer site.
|
|
153
|
+
* @param range Range in km.
|
|
154
|
+
* @param rangeRate Range rate in km/s.
|
|
155
|
+
* @returns A Vector3D object.
|
|
156
|
+
*/
|
|
157
|
+
velocity(site, range, rangeRate) {
|
|
158
|
+
if (!this.rightAscensionRate || !this.declinationRate) {
|
|
159
|
+
throw new Error('Velocity unsolvable, missing ra/dec rates.');
|
|
160
|
+
}
|
|
161
|
+
const r = range ?? this.range ?? 1.0;
|
|
162
|
+
const rd = rangeRate ?? this.rangeRate ?? 0.0;
|
|
163
|
+
return radecToVelocity(this.rightAscension, this.declination, r, this.rightAscensionRate, this.declinationRate, rd).add(site.velocity);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Calculates the line of sight vector in the topocentric coordinate system.
|
|
167
|
+
* The line of sight vector points from the observer's location towards the celestial object.
|
|
168
|
+
* @returns The line of sight vector as a Vector3D object.
|
|
169
|
+
*/
|
|
170
|
+
lineOfSight() {
|
|
171
|
+
const ca = Math.cos(this.rightAscension);
|
|
172
|
+
const cd = Math.cos(this.declination);
|
|
173
|
+
const sa = Math.sin(this.rightAscension);
|
|
174
|
+
const sd = Math.sin(this.declination);
|
|
175
|
+
return new Vector3D(cd * ca, cd * sa, sd);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
179
|
+
* @param radec - The other RadecTopocentric object.
|
|
180
|
+
* @param method - The angular distance method to use.
|
|
181
|
+
* @returns The angular distance.
|
|
182
|
+
*/
|
|
183
|
+
angle(radec, method = AngularDistanceMethod.Cosine) {
|
|
184
|
+
return angularDistance(this.rightAscension, this.declination, radec.rightAscension, radec.declination, method);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Calculate the angular distance between this and another RadecTopocentric object.
|
|
188
|
+
* @param radec - The other RadecTopocentric object.
|
|
189
|
+
* @param method - The angular distance method to use.
|
|
190
|
+
* @returns The angular distance
|
|
191
|
+
*/
|
|
192
|
+
angleDegrees(radec, method = AngularDistanceMethod.Cosine) {
|
|
193
|
+
return this.angle(radec, method) * RAD2DEG;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=RadecTopocentric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadecTopocentric.js","sourceRoot":"","sources":["../../src/observation/RadecTopocentric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CA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AChB,CAAC,EACD,IAAI,CAAC,kBAAkB,EACvB,IAAI,CAAC,eAAe,EACpB,EAAE,CACH,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEtC,OAAO,IAAI,QAAQ,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAuB,EAAE,SAAgC,qBAAqB,CAAC,MAAM;QACzF,OAAO,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACjH,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,KAAuB,EAAE,SAAgC,qBAAqB,CAAC,MAAM;QAChG,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAkB,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2025 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
export * from './ObservationUtils.js';
|
|
24
|
+
export { RadecGeocentric } from './RadecGeocentric.js';
|
|
25
|
+
export { RadecTopocentric } from './RadecTopocentric.js';
|
|
26
|
+
export { RAE } from './RAE.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2025 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
export * from './ObservationUtils.js';
|
|
24
|
+
export { RadecGeocentric } from './RadecGeocentric.js';
|
|
25
|
+
export { RadecTopocentric } from './RadecTopocentric.js';
|
|
26
|
+
export { RAE } from './RAE.js';
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/observation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
|
-
import { Random, Vector } from '
|
|
17
|
+
import { Random, Vector } from '../main.js';
|
|
18
18
|
export declare class BoxMuller {
|
|
19
19
|
private _index;
|
|
20
20
|
private _cache;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
|
-
import { Random, TAU, Vector } from '
|
|
17
|
+
import { Random, TAU, Vector } from '../main.js';
|
|
18
18
|
// / Box-Muller random Gaussian number generator.
|
|
19
19
|
export class BoxMuller {
|
|
20
20
|
_index = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxMuller.js","sourceRoot":"","sources":["../../src/operations/BoxMuller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BoxMuller.js","sourceRoot":"","sources":["../../src/operations/BoxMuller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjD,iDAAiD;AACjD,MAAM,OAAO,SAAS;IACZ,MAAM,GAAG,CAAC,CAAC;IACX,MAAM,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IACrC,gBAAgB;IAChB,EAAE,CAAS;IACX,wBAAwB;IACxB,KAAK,CAAS;IACd,qCAAqC;IACrC,IAAI,CAAS;IAEb;;;;;;OAMG;IACH,YAAY,EAAU,EAAE,KAAa,EAAE,IAAI,GAAG,CAAC;QAC7C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,SAAS,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AAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
|
-
import { Degrees, Matrix, Radians, Vector3D } from '
|
|
17
|
+
import { Degrees, Matrix, Radians, Vector3D } from '../main.js';
|
|
18
18
|
export declare class EulerAngles {
|
|
19
19
|
roll: number;
|
|
20
20
|
pitch: number;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License along with
|
|
15
15
|
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
|
-
import { DEG2RAD, Matrix, RAD2DEG } from '
|
|
17
|
+
import { DEG2RAD, Matrix, RAD2DEG } from '../main.js';
|
|
18
18
|
// / Class containing Euler angles.
|
|
19
19
|
export class EulerAngles {
|
|
20
20
|
// / Roll component _(rad)_.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EulerAngles.js","sourceRoot":"","sources":["../../src/operations/EulerAngles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAW,MAAM,EAAE,OAAO,EAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"EulerAngles.js","sourceRoot":"","sources":["../../src/operations/EulerAngles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAW,MAAM,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;AAElF,mCAAmC;AACnC,MAAM,OAAO,WAAW;IACtB,4BAA4B;IAC5B,IAAI,CAAS;IAEb,6BAA6B;IAC7B,KAAK,CAAS;IAEd,2BAA2B;IAC3B,GAAG,CAAS;IAEZ;;;;;OAKG;IACH,YAAY,IAAa,EAAE,KAAc,EAAE,GAAY;QACrD,IAAI,CA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AAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEhC,OAAO,IAAI,MAAM,CAAC;YAChB,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC;YACvC,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;YACvF,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;SACxF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,CAAW;QACzB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Theodore Kruczek.
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @copyright (c) 2022-2025 Theodore Kruczek Permission is
|
|
5
|
+
* hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
* software and associated documentation files (the "Software"), to deal in the
|
|
7
|
+
* Software without restriction, including without limitation the rights to use,
|
|
8
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
* so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
import { Vector3D, Vector, Radians } from '../main.js';
|
|
24
|
+
/**
|
|
25
|
+
* A matrix is a rectangular array of numbers or other mathematical objects for
|
|
26
|
+
* which operations such as addition and multiplication are defined.
|
|
27
|
+
*/
|
|
28
|
+
export declare class Matrix {
|
|
29
|
+
elements: number[][];
|
|
30
|
+
readonly rows: number;
|
|
31
|
+
readonly columns: number;
|
|
32
|
+
constructor(elements: number[][]);
|
|
33
|
+
/**
|
|
34
|
+
* Creates a matrix with all elements set to zero.
|
|
35
|
+
* @param rows - The number of rows in the matrix.
|
|
36
|
+
* @param columns - The number of columns in the matrix.
|
|
37
|
+
* @returns A matrix with all elements set to zero.
|
|
38
|
+
*/
|
|
39
|
+
static allZeros(rows: number, columns: number): Matrix;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new Matrix with the specified number of rows and columns, filled
|
|
42
|
+
* with the specified value.
|
|
43
|
+
* @param rows The number of rows in the matrix.
|
|
44
|
+
* @param columns The number of columns in the matrix.
|
|
45
|
+
* @param value The value to fill the matrix with. Default is 0.0.
|
|
46
|
+
* @returns A new Matrix filled with the specified value.
|
|
47
|
+
*/
|
|
48
|
+
static fill(rows: number, columns: number, value?: number): Matrix;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a rotation matrix around the X-axis.
|
|
51
|
+
* @param theta - The angle of rotation in radians.
|
|
52
|
+
* @returns The rotation matrix.
|
|
53
|
+
*/
|
|
54
|
+
static rotX(theta: Radians): Matrix;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a rotation matrix around the y-axis.
|
|
57
|
+
* @param theta - The angle of rotation in radians.
|
|
58
|
+
* @returns The rotation matrix.
|
|
59
|
+
*/
|
|
60
|
+
static rotY(theta: Radians): Matrix;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a rotation matrix around the Z-axis.
|
|
63
|
+
* @param theta The angle of rotation in radians.
|
|
64
|
+
* @returns The rotation matrix.
|
|
65
|
+
*/
|
|
66
|
+
static rotZ(theta: Radians): Matrix;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a zero matrix with the specified number of rows and columns.
|
|
69
|
+
* @param rows The number of rows in the matrix.
|
|
70
|
+
* @param columns The number of columns in the matrix.
|
|
71
|
+
* @returns A new Matrix object representing the zero matrix.
|
|
72
|
+
*/
|
|
73
|
+
static zero(rows: number, columns: number): Matrix;
|
|
74
|
+
/**
|
|
75
|
+
* Creates an identity matrix of the specified dimension.
|
|
76
|
+
* @param dimension The dimension of the identity matrix.
|
|
77
|
+
* @returns The identity matrix.
|
|
78
|
+
*/
|
|
79
|
+
static identity(dimension: number): Matrix;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a diagonal matrix with the given diagonal elements.
|
|
82
|
+
* @param d - An array of diagonal elements.
|
|
83
|
+
* @returns A new Matrix object representing the diagonal matrix.
|
|
84
|
+
*/
|
|
85
|
+
static diagonal(d: number[]): Matrix;
|
|
86
|
+
/**
|
|
87
|
+
* Adds the elements of another matrix to this matrix and returns the result.
|
|
88
|
+
* @param m - The matrix to be added.
|
|
89
|
+
* @returns The resulting matrix after addition.
|
|
90
|
+
*/
|
|
91
|
+
add(m: Matrix): Matrix;
|
|
92
|
+
/**
|
|
93
|
+
* Subtracts the elements of another matrix from this matrix.
|
|
94
|
+
* @param m - The matrix to subtract.
|
|
95
|
+
* @returns A new matrix containing the result of the subtraction.
|
|
96
|
+
*/
|
|
97
|
+
subtract(m: Matrix): Matrix;
|
|
98
|
+
/**
|
|
99
|
+
* Scales the matrix by multiplying each element by a scalar value.
|
|
100
|
+
* @param n - The scalar value to multiply each element by.
|
|
101
|
+
* @returns A new Matrix object representing the scaled matrix.
|
|
102
|
+
*/
|
|
103
|
+
scale(n: number): Matrix;
|
|
104
|
+
/**
|
|
105
|
+
* Negates the matrix by scaling it by -1.
|
|
106
|
+
* @returns The negated matrix.
|
|
107
|
+
*/
|
|
108
|
+
negate(): Matrix;
|
|
109
|
+
/**
|
|
110
|
+
* Multiplies this matrix with another matrix.
|
|
111
|
+
* @param m The matrix to multiply with.
|
|
112
|
+
* @returns The resulting matrix.
|
|
113
|
+
*/
|
|
114
|
+
multiply(m: Matrix): Matrix;
|
|
115
|
+
/**
|
|
116
|
+
* Computes the outer product of this matrix with another matrix.
|
|
117
|
+
* @param m - The matrix to compute the outer product with.
|
|
118
|
+
* @returns The resulting matrix.
|
|
119
|
+
*/
|
|
120
|
+
outerProduct(m: Matrix): Matrix;
|
|
121
|
+
/**
|
|
122
|
+
* Multiplies the matrix by a vector.
|
|
123
|
+
* @param v The vector to multiply by.
|
|
124
|
+
* @returns A new vector representing the result of the multiplication.
|
|
125
|
+
*/
|
|
126
|
+
multiplyVector(v: Vector): Vector;
|
|
127
|
+
/**
|
|
128
|
+
* Multiplies a 3D vector by the matrix.
|
|
129
|
+
* @template T - The type of the vector elements.
|
|
130
|
+
* @param v - The 3D vector to multiply.
|
|
131
|
+
* @returns The resulting 3D vector after multiplication.
|
|
132
|
+
*/
|
|
133
|
+
multiplyVector3D<T extends number>(v: Vector3D<T>): Vector3D<T>;
|
|
134
|
+
/**
|
|
135
|
+
* Returns a new Matrix object where each element is the reciprocal of the
|
|
136
|
+
* corresponding element in the current matrix. If an element in the current
|
|
137
|
+
* matrix is zero, the corresponding element in the output matrix will also be
|
|
138
|
+
* zero.
|
|
139
|
+
* @returns A new Matrix object representing the reciprocal of the current
|
|
140
|
+
* matrix.
|
|
141
|
+
*/
|
|
142
|
+
reciprocal(): Matrix;
|
|
143
|
+
/**
|
|
144
|
+
* Transposes the matrix by swapping rows with columns.
|
|
145
|
+
* @returns A new Matrix object representing the transposed matrix.
|
|
146
|
+
*/
|
|
147
|
+
transpose(): Matrix;
|
|
148
|
+
/**
|
|
149
|
+
* Performs the Cholesky decomposition on the matrix.
|
|
150
|
+
* @returns A new Matrix object representing the Cholesky decomposition of the
|
|
151
|
+
* original matrix.
|
|
152
|
+
*/
|
|
153
|
+
cholesky(): Matrix;
|
|
154
|
+
/**
|
|
155
|
+
* Swaps two rows in the matrix.
|
|
156
|
+
* @param i - The index of the first row.
|
|
157
|
+
* @param j - The index of the second row.
|
|
158
|
+
*/
|
|
159
|
+
private _swapRows;
|
|
160
|
+
/**
|
|
161
|
+
* Converts the matrix to reduced row echelon form using the Gaussian
|
|
162
|
+
* elimination method. This method modifies the matrix in-place.
|
|
163
|
+
*/
|
|
164
|
+
private toReducedRowEchelonForm_;
|
|
165
|
+
/**
|
|
166
|
+
* Calculates the inverse of the matrix.
|
|
167
|
+
* @returns The inverse of the matrix.
|
|
168
|
+
*/
|
|
169
|
+
inverse(): Matrix;
|
|
170
|
+
}
|