ootk 4.0.8 → 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/CHANGELOG.md +9 -2
- 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 +3 -1
- package/dist/objects/DetailedSatellite.js +4 -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 +5 -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,226 @@
|
|
|
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 type { ClassicalElements } from '../coordinate/index.js';
|
|
24
|
+
import { Geodetic } from '../coordinate/Geodetic.js';
|
|
25
|
+
import { ITRF } from '../coordinate/ITRF.js';
|
|
26
|
+
import { J2000 } from '../coordinate/J2000.js';
|
|
27
|
+
import { RIC } from '../coordinate/RIC.js';
|
|
28
|
+
import { Tle } from '../coordinate/Tle.js';
|
|
29
|
+
import { OptionsParams } from '../interfaces/OptionsParams.js';
|
|
30
|
+
import { SatelliteParams } from '../interfaces/SatelliteParams.js';
|
|
31
|
+
import { RAE } from '../observation/RAE.js';
|
|
32
|
+
import { Degrees, EcfVec3, GreenwichMeanSiderealTime, Kilometers, LlaVec3, Minutes, PosVel, RaeVec3, SatelliteRecord, TleLine1, TleLine2 } from '../types/types.js';
|
|
33
|
+
import { BaseObject } from './BaseObject.js';
|
|
34
|
+
import { GroundObject } from './GroundObject.js';
|
|
35
|
+
/**
|
|
36
|
+
* Represents a satellite object with orbital information and methods for
|
|
37
|
+
* calculating its position and other properties.
|
|
38
|
+
*/
|
|
39
|
+
export declare class Satellite extends BaseObject {
|
|
40
|
+
apogee: Kilometers;
|
|
41
|
+
argOfPerigee: Degrees;
|
|
42
|
+
bstar: number;
|
|
43
|
+
eccentricity: number;
|
|
44
|
+
epochDay: number;
|
|
45
|
+
epochYear: number;
|
|
46
|
+
inclination: Degrees;
|
|
47
|
+
intlDes: string;
|
|
48
|
+
meanAnomaly: Degrees;
|
|
49
|
+
meanMoDev1: number;
|
|
50
|
+
meanMoDev2: number;
|
|
51
|
+
meanMotion: number;
|
|
52
|
+
options: OptionsParams;
|
|
53
|
+
perigee: Kilometers;
|
|
54
|
+
period: Minutes;
|
|
55
|
+
rightAscension: Degrees;
|
|
56
|
+
satrec: SatelliteRecord;
|
|
57
|
+
/** The satellite catalog number as listed in the TLE. */
|
|
58
|
+
sccNum: string;
|
|
59
|
+
/** The 5 digit alpha-numeric satellite catalog number. */
|
|
60
|
+
sccNum5: string;
|
|
61
|
+
/** The 6 digit numeric satellite catalog number. */
|
|
62
|
+
sccNum6: string;
|
|
63
|
+
tle1: TleLine1;
|
|
64
|
+
tle2: TleLine2;
|
|
65
|
+
/** The semi-major axis of the satellite's orbit. */
|
|
66
|
+
semiMajorAxis: Kilometers;
|
|
67
|
+
/** The semi-minor axis of the satellite's orbit. */
|
|
68
|
+
semiMinorAxis: Kilometers;
|
|
69
|
+
constructor(info: SatelliteParams, options?: OptionsParams);
|
|
70
|
+
private parseTleAndUpdateOrbit_;
|
|
71
|
+
private parseOmmAndUpdateOrbit_;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if the object is a satellite.
|
|
74
|
+
* @returns True if the object is a satellite, false otherwise.
|
|
75
|
+
*/
|
|
76
|
+
isSatellite(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Returns whether the satellite is static or not.
|
|
79
|
+
* @returns True if the satellite is static, false otherwise.
|
|
80
|
+
*/
|
|
81
|
+
isStatic(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Checks if the given SatelliteRecord object is valid by checking if its properties are all numbers.
|
|
84
|
+
* @param satrec - The SatelliteRecord object to check.
|
|
85
|
+
* @returns True if the SatelliteRecord object is valid, false otherwise.
|
|
86
|
+
*/
|
|
87
|
+
static isValidSatrec(satrec: SatelliteRecord): boolean;
|
|
88
|
+
ageOfElset(nowInput?: Date, outputUnits?: 'days' | 'hours' | 'minutes' | 'seconds'): number;
|
|
89
|
+
editTle(tle1: TleLine1, tle2: TleLine2, sccNum?: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Calculates the azimuth angle of the satellite relative to the given sensor at the specified date. If no date is
|
|
92
|
+
* provided, the current time of the satellite is used.
|
|
93
|
+
* @variation optimized
|
|
94
|
+
* @param observer - The observer's position on the ground.
|
|
95
|
+
* @param date - The date at which to calculate the azimuth angle. Optional, defaults to the current date.
|
|
96
|
+
* @returns The azimuth angle of the satellite relative to the given sensor at the specified date.
|
|
97
|
+
*/
|
|
98
|
+
az(observer: GroundObject, date?: Date): Degrees | null;
|
|
99
|
+
/**
|
|
100
|
+
* Calculates the RAE (Range, Azimuth, Elevation) values for a given sensor and date. If no date is provided, the
|
|
101
|
+
* current time is used.
|
|
102
|
+
* @variation expanded
|
|
103
|
+
* @param observer - The observer's position on the ground.
|
|
104
|
+
* @param date - The date at which to calculate the RAE values. Optional, defaults to the current date.
|
|
105
|
+
* @returns The RAE values for the given sensor and date.
|
|
106
|
+
*/
|
|
107
|
+
toRae(observer: GroundObject, date?: Date): RAE | null;
|
|
108
|
+
/**
|
|
109
|
+
* Calculates ECF position at a given time.
|
|
110
|
+
* @variation optimized
|
|
111
|
+
* @param date - The date at which to calculate the ECF position. Optional, defaults to the current date.
|
|
112
|
+
* @returns The ECF position at the specified date.
|
|
113
|
+
*/
|
|
114
|
+
ecf(date?: Date): EcfVec3<Kilometers> | null;
|
|
115
|
+
/**
|
|
116
|
+
* Calculates ECI position at a given time.
|
|
117
|
+
* @variation optimized
|
|
118
|
+
* @param date - The date at which to calculate the ECI position. Optional, defaults to the current date.
|
|
119
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
120
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
121
|
+
* @returns The ECI position at the specified date.
|
|
122
|
+
*/
|
|
123
|
+
eci(date?: Date, j?: number, gmst?: GreenwichMeanSiderealTime): PosVel | null;
|
|
124
|
+
/**
|
|
125
|
+
* Calculates the J2000 coordinates for a given date. If no date is provided, the current time is used.
|
|
126
|
+
* @variation expanded
|
|
127
|
+
* @param date - The date for which to calculate the J2000 coordinates, defaults to the current date.
|
|
128
|
+
* @returns The J2000 coordinates for the specified date.
|
|
129
|
+
* @throws Error if propagation fails.
|
|
130
|
+
*/
|
|
131
|
+
toJ2000(date?: Date): J2000;
|
|
132
|
+
/**
|
|
133
|
+
* Returns the elevation angle of the satellite as seen by the given sensor at the specified time.
|
|
134
|
+
* @variation optimized
|
|
135
|
+
* @param observer - The observer's position on the ground.
|
|
136
|
+
* @param date - The date at which to calculate the elevation angle. Optional, defaults to the current date.
|
|
137
|
+
* @returns The elevation angle of the satellite as seen by the given sensor at the specified time.
|
|
138
|
+
*/
|
|
139
|
+
el(observer: GroundObject, date?: Date): Degrees | null;
|
|
140
|
+
/**
|
|
141
|
+
* Calculates LLA position at a given time.
|
|
142
|
+
* @variation optimized
|
|
143
|
+
* @param date - The date at which to calculate the LLA position. Optional, defaults to the current date.
|
|
144
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
145
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
146
|
+
* @returns The LLA position at the specified date.
|
|
147
|
+
*/
|
|
148
|
+
lla(date?: Date, j?: number, gmst?: GreenwichMeanSiderealTime): LlaVec3<Degrees, Kilometers> | null;
|
|
149
|
+
/**
|
|
150
|
+
* Converts the satellite's position to geodetic coordinates.
|
|
151
|
+
* @variation expanded
|
|
152
|
+
* @param date The date for which to calculate the geodetic coordinates. Defaults to the current date.
|
|
153
|
+
* @returns The geodetic coordinates of the satellite.
|
|
154
|
+
*/
|
|
155
|
+
toGeodetic(date?: Date): Geodetic;
|
|
156
|
+
/**
|
|
157
|
+
* Converts the satellite's position to the International Terrestrial Reference Frame (ITRF) at the specified date.
|
|
158
|
+
* If no date is provided, the current date is used.
|
|
159
|
+
* @variation expanded
|
|
160
|
+
* @param date The date for which to convert the position. Defaults to the current date.
|
|
161
|
+
* @returns The satellite's position in the ITRF at the specified date.
|
|
162
|
+
*/
|
|
163
|
+
toITRF(date?: Date): ITRF;
|
|
164
|
+
/**
|
|
165
|
+
* Converts the current satellite's position to the Reference-Inertial-Celestial (RIC) frame
|
|
166
|
+
* relative to the specified reference satellite at the given date.
|
|
167
|
+
* @variation expanded
|
|
168
|
+
* @param reference The reference satellite.
|
|
169
|
+
* @param date The date for which to calculate the RIC frame. Defaults to the current date.
|
|
170
|
+
* @returns The RIC frame representing the current satellite's position relative to the reference satellite.
|
|
171
|
+
*/
|
|
172
|
+
toRIC(reference: Satellite, date?: Date): RIC;
|
|
173
|
+
/**
|
|
174
|
+
* Converts the satellite object to a TLE (Two-Line Element) object.
|
|
175
|
+
* @returns The TLE object representing the satellite.
|
|
176
|
+
*/
|
|
177
|
+
toTle(): Tle;
|
|
178
|
+
/**
|
|
179
|
+
* Converts the satellite's position to classical orbital elements.
|
|
180
|
+
* @param date The date for which to calculate the classical elements. Defaults to the current date.
|
|
181
|
+
* @returns The classical orbital elements of the satellite.
|
|
182
|
+
*/
|
|
183
|
+
toClassicalElements(date?: Date): ClassicalElements;
|
|
184
|
+
/**
|
|
185
|
+
* Calculates the RAE (Range, Azimuth, Elevation) vector for a given sensor and time.
|
|
186
|
+
* @variation optimized
|
|
187
|
+
* @param observer - The observer's position on the ground.
|
|
188
|
+
* @param date - The date at which to calculate the RAE vector. Optional, defaults to the current date.
|
|
189
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
190
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
191
|
+
* @returns The RAE vector for the given sensor and time.
|
|
192
|
+
*/
|
|
193
|
+
rae(observer: GroundObject, date?: Date, j?: number, gmst?: GreenwichMeanSiderealTime): RaeVec3<Kilometers, Degrees> | null;
|
|
194
|
+
/**
|
|
195
|
+
* Returns the range of the satellite from the given sensor at the specified time.
|
|
196
|
+
* @variation optimized
|
|
197
|
+
* @param observer - The observer's position on the ground.
|
|
198
|
+
* @param date - The date at which to calculate the range. Optional, defaults to the current date.
|
|
199
|
+
* @returns The range of the satellite from the given sensor at the specified time.
|
|
200
|
+
*/
|
|
201
|
+
rng(observer: GroundObject, date?: Date): Kilometers | null;
|
|
202
|
+
/**
|
|
203
|
+
* Applies the Doppler effect to the given frequency based on the observer's position and the date.
|
|
204
|
+
* @param freq - The frequency to apply the Doppler effect to.
|
|
205
|
+
* @param observer - The observer's position on the ground.
|
|
206
|
+
* @param date - The date at which to calculate the Doppler effect. Optional, defaults to the current date.
|
|
207
|
+
* @returns The frequency after applying the Doppler effect.
|
|
208
|
+
*/
|
|
209
|
+
applyDoppler(freq: number, observer: GroundObject, date?: Date): number | null;
|
|
210
|
+
/**
|
|
211
|
+
* Calculates the Doppler factor for the satellite.
|
|
212
|
+
* @param observer The observer's ground position.
|
|
213
|
+
* @param date The optional date for which to calculate the Doppler factor. If not provided, the current date is used.
|
|
214
|
+
* @returns The calculated Doppler factor.
|
|
215
|
+
*/
|
|
216
|
+
dopplerFactor(observer: GroundObject, date?: Date): number | null;
|
|
217
|
+
/**
|
|
218
|
+
* Calculates the time variables for a given date relative to the TLE epoch.
|
|
219
|
+
* @param date Date to calculate
|
|
220
|
+
* @param satrec Satellite orbital information
|
|
221
|
+
* @param j Julian date
|
|
222
|
+
* @param gmst Greenwich Mean Sidereal Time
|
|
223
|
+
* @returns Time variables
|
|
224
|
+
*/
|
|
225
|
+
private static calculateTimeVariables;
|
|
226
|
+
}
|
|
@@ -0,0 +1,443 @@
|
|
|
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 { J2000 } from '../coordinate/J2000.js';
|
|
24
|
+
import { RIC } from '../coordinate/RIC.js';
|
|
25
|
+
import { Tle } from '../coordinate/Tle.js';
|
|
26
|
+
import { RAE } from '../observation/RAE.js';
|
|
27
|
+
import { Vector3D } from '../operations/Vector3D.js';
|
|
28
|
+
import { EpochUTC } from '../time/EpochUTC.js';
|
|
29
|
+
import { ecf2rae, eci2ecf, eci2lla, jday } from '../transforms/index.js';
|
|
30
|
+
import { DEG2RAD, MILLISECONDS_TO_DAYS, MINUTES_PER_DAY, RAD2DEG } from '../utils/constants.js';
|
|
31
|
+
import { dopplerFactor } from './../utils/functions.js';
|
|
32
|
+
import { BaseObject } from './BaseObject.js';
|
|
33
|
+
import { Sgp4 } from '../main.js';
|
|
34
|
+
/**
|
|
35
|
+
* Represents a satellite object with orbital information and methods for
|
|
36
|
+
* calculating its position and other properties.
|
|
37
|
+
*/
|
|
38
|
+
export class Satellite extends BaseObject {
|
|
39
|
+
apogee;
|
|
40
|
+
argOfPerigee;
|
|
41
|
+
bstar;
|
|
42
|
+
eccentricity;
|
|
43
|
+
epochDay;
|
|
44
|
+
epochYear;
|
|
45
|
+
inclination;
|
|
46
|
+
intlDes;
|
|
47
|
+
meanAnomaly;
|
|
48
|
+
meanMoDev1;
|
|
49
|
+
meanMoDev2;
|
|
50
|
+
meanMotion;
|
|
51
|
+
options;
|
|
52
|
+
perigee;
|
|
53
|
+
period;
|
|
54
|
+
rightAscension;
|
|
55
|
+
satrec;
|
|
56
|
+
/** The satellite catalog number as listed in the TLE. */
|
|
57
|
+
sccNum;
|
|
58
|
+
/** The 5 digit alpha-numeric satellite catalog number. */
|
|
59
|
+
sccNum5;
|
|
60
|
+
/** The 6 digit numeric satellite catalog number. */
|
|
61
|
+
sccNum6;
|
|
62
|
+
tle1;
|
|
63
|
+
tle2;
|
|
64
|
+
/** The semi-major axis of the satellite's orbit. */
|
|
65
|
+
semiMajorAxis;
|
|
66
|
+
/** The semi-minor axis of the satellite's orbit. */
|
|
67
|
+
semiMinorAxis;
|
|
68
|
+
constructor(info, options) {
|
|
69
|
+
super(info);
|
|
70
|
+
if (info.tle1 && info.tle2) {
|
|
71
|
+
this.parseTleAndUpdateOrbit_(info.tle1, info.tle2, info.sccNum);
|
|
72
|
+
}
|
|
73
|
+
else if (info.omm) {
|
|
74
|
+
this.parseOmmAndUpdateOrbit_(info.omm);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error('tle1 and tle2 or omm must be provided to create a Satellite object.');
|
|
78
|
+
}
|
|
79
|
+
this.options = options ?? {
|
|
80
|
+
notes: '',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
parseTleAndUpdateOrbit_(tle1, tle2, sccNum) {
|
|
84
|
+
const tleData = Tle.parse(tle1, tle2);
|
|
85
|
+
this.tle1 = tle1;
|
|
86
|
+
this.tle2 = tle2;
|
|
87
|
+
this.sccNum = sccNum ?? tleData.satNum.toString();
|
|
88
|
+
this.sccNum5 = Tle.convert6DigitToA5(this.sccNum);
|
|
89
|
+
this.sccNum6 = Tle.convertA5to6Digit(this.sccNum5);
|
|
90
|
+
this.intlDes = tleData.intlDes;
|
|
91
|
+
this.epochYear = tleData.epochYear;
|
|
92
|
+
this.epochDay = tleData.epochDay;
|
|
93
|
+
this.meanMoDev1 = tleData.meanMoDev1;
|
|
94
|
+
this.meanMoDev2 = tleData.meanMoDev2;
|
|
95
|
+
this.bstar = tleData.bstar;
|
|
96
|
+
this.inclination = tleData.inclination;
|
|
97
|
+
this.rightAscension = tleData.rightAscension;
|
|
98
|
+
this.eccentricity = tleData.eccentricity;
|
|
99
|
+
this.argOfPerigee = tleData.argOfPerigee;
|
|
100
|
+
this.meanAnomaly = tleData.meanAnomaly;
|
|
101
|
+
this.meanMotion = tleData.meanMotion;
|
|
102
|
+
this.period = tleData.period;
|
|
103
|
+
this.semiMajorAxis = ((8681663.653 / this.meanMotion) ** (2 / 3));
|
|
104
|
+
this.semiMinorAxis = (this.semiMajorAxis * Math.sqrt(1 - this.eccentricity ** 2));
|
|
105
|
+
this.apogee = (this.semiMajorAxis * (1 + this.eccentricity) - 6371);
|
|
106
|
+
this.perigee = (this.semiMajorAxis * (1 - this.eccentricity) - 6371);
|
|
107
|
+
this.satrec = Sgp4.createSatrec(tle1, tle2);
|
|
108
|
+
}
|
|
109
|
+
parseOmmAndUpdateOrbit_(omm) {
|
|
110
|
+
this.sccNum = omm.NORAD_CAT_ID.padStart(5, '0');
|
|
111
|
+
this.sccNum5 = Tle.convert6DigitToA5(omm.NORAD_CAT_ID);
|
|
112
|
+
this.sccNum6 = Tle.convertA5to6Digit(this.sccNum5);
|
|
113
|
+
this.intlDes = omm.OBJECT_ID;
|
|
114
|
+
const YYYY = omm.EPOCH.slice(0, 4);
|
|
115
|
+
const MM = omm.EPOCH.slice(5, 7);
|
|
116
|
+
const DD = omm.EPOCH.slice(8, 10);
|
|
117
|
+
const hh = omm.EPOCH.slice(11, 13);
|
|
118
|
+
const mm = omm.EPOCH.slice(14, 16);
|
|
119
|
+
const ss = omm.EPOCH.slice(17, 23);
|
|
120
|
+
const epochDateObj = Date.UTC(Number(YYYY), Number(MM) - 1, Number(DD), Number(hh), Number(mm), Number(ss));
|
|
121
|
+
const dayOfYear = (epochDateObj - Date.UTC(Number(YYYY), 0, 0)) / 86400000;
|
|
122
|
+
const ommParsed = {
|
|
123
|
+
...omm,
|
|
124
|
+
epoch: {
|
|
125
|
+
year: Number(YYYY),
|
|
126
|
+
month: Number(MM),
|
|
127
|
+
day: Number(DD),
|
|
128
|
+
hour: Number(hh),
|
|
129
|
+
minute: Number(mm),
|
|
130
|
+
second: Number(ss),
|
|
131
|
+
doy: dayOfYear,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
this.epochYear = parseInt(YYYY.slice(2, 4));
|
|
135
|
+
this.epochDay = dayOfYear;
|
|
136
|
+
this.meanMoDev1 = parseFloat(omm.MEAN_MOTION_DOT);
|
|
137
|
+
this.meanMoDev2 = parseFloat(omm.MEAN_MOTION_DDOT);
|
|
138
|
+
this.bstar = parseFloat(omm.BSTAR);
|
|
139
|
+
this.inclination = parseFloat(omm.INCLINATION);
|
|
140
|
+
this.rightAscension = parseFloat(omm.RA_OF_ASC_NODE);
|
|
141
|
+
this.eccentricity = parseFloat(omm.ECCENTRICITY);
|
|
142
|
+
this.argOfPerigee = parseFloat(omm.ARG_OF_PERICENTER);
|
|
143
|
+
this.meanAnomaly = parseFloat(omm.MEAN_ANOMALY);
|
|
144
|
+
this.meanMotion = parseFloat(omm.MEAN_MOTION);
|
|
145
|
+
this.period = 1440 / this.meanMotion;
|
|
146
|
+
this.semiMajorAxis = ((8681663.653 / this.meanMotion) ** (2 / 3));
|
|
147
|
+
this.semiMinorAxis = (this.semiMajorAxis * Math.sqrt(1 - this.eccentricity ** 2));
|
|
148
|
+
this.apogee = (this.semiMajorAxis * (1 + this.eccentricity) - 6371);
|
|
149
|
+
this.perigee = (this.semiMajorAxis * (1 - this.eccentricity) - 6371);
|
|
150
|
+
this.satrec = Sgp4.createSatrecFromOmm(ommParsed);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Checks if the object is a satellite.
|
|
154
|
+
* @returns True if the object is a satellite, false otherwise.
|
|
155
|
+
*/
|
|
156
|
+
isSatellite() {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Returns whether the satellite is static or not.
|
|
161
|
+
* @returns True if the satellite is static, false otherwise.
|
|
162
|
+
*/
|
|
163
|
+
isStatic() {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Checks if the given SatelliteRecord object is valid by checking if its properties are all numbers.
|
|
168
|
+
* @param satrec - The SatelliteRecord object to check.
|
|
169
|
+
* @returns True if the SatelliteRecord object is valid, false otherwise.
|
|
170
|
+
*/
|
|
171
|
+
static isValidSatrec(satrec) {
|
|
172
|
+
if (isNaN(satrec.a) ||
|
|
173
|
+
isNaN(satrec.am) ||
|
|
174
|
+
isNaN(satrec.alta) ||
|
|
175
|
+
isNaN(satrec.em) ||
|
|
176
|
+
isNaN(satrec.mo) ||
|
|
177
|
+
isNaN(satrec.ecco) ||
|
|
178
|
+
isNaN(satrec.no)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
ageOfElset(nowInput, outputUnits = 'days') {
|
|
184
|
+
return Tle.calcElsetAge(this, nowInput, outputUnits);
|
|
185
|
+
}
|
|
186
|
+
editTle(tle1, tle2, sccNum) {
|
|
187
|
+
this.parseTleAndUpdateOrbit_(tle1, tle2, sccNum);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Calculates the azimuth angle of the satellite relative to the given sensor at the specified date. If no date is
|
|
191
|
+
* provided, the current time of the satellite is used.
|
|
192
|
+
* @variation optimized
|
|
193
|
+
* @param observer - The observer's position on the ground.
|
|
194
|
+
* @param date - The date at which to calculate the azimuth angle. Optional, defaults to the current date.
|
|
195
|
+
* @returns The azimuth angle of the satellite relative to the given sensor at the specified date.
|
|
196
|
+
*/
|
|
197
|
+
az(observer, date = new Date()) {
|
|
198
|
+
const rae = this.rae(observer, date);
|
|
199
|
+
if (!rae) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
return (rae.az * RAD2DEG);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Calculates the RAE (Range, Azimuth, Elevation) values for a given sensor and date. If no date is provided, the
|
|
206
|
+
* current time is used.
|
|
207
|
+
* @variation expanded
|
|
208
|
+
* @param observer - The observer's position on the ground.
|
|
209
|
+
* @param date - The date at which to calculate the RAE values. Optional, defaults to the current date.
|
|
210
|
+
* @returns The RAE values for the given sensor and date.
|
|
211
|
+
*/
|
|
212
|
+
toRae(observer, date = new Date()) {
|
|
213
|
+
const rae = this.rae(observer, date);
|
|
214
|
+
if (!rae) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
const rae2 = this.rae(observer, new Date(date.getTime() + 1000));
|
|
218
|
+
if (!rae2) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
const epoch = new EpochUTC(date.getTime() / 1000);
|
|
222
|
+
const rangeRate = rae2.rng - rae.rng;
|
|
223
|
+
const azimuthRate = rae2.az - rae.az;
|
|
224
|
+
const elevationRate = rae2.el - rae.el;
|
|
225
|
+
return new RAE(epoch, rae.rng, (rae.az * DEG2RAD), (rae.el * DEG2RAD), rangeRate, azimuthRate, elevationRate);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Calculates ECF position at a given time.
|
|
229
|
+
* @variation optimized
|
|
230
|
+
* @param date - The date at which to calculate the ECF position. Optional, defaults to the current date.
|
|
231
|
+
* @returns The ECF position at the specified date.
|
|
232
|
+
*/
|
|
233
|
+
ecf(date = new Date()) {
|
|
234
|
+
const { gmst } = Satellite.calculateTimeVariables(date);
|
|
235
|
+
const eci = this.eci(date);
|
|
236
|
+
if (!eci) {
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
return eci2ecf(eci.position, gmst);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Calculates ECI position at a given time.
|
|
243
|
+
* @variation optimized
|
|
244
|
+
* @param date - The date at which to calculate the ECI position. Optional, defaults to the current date.
|
|
245
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
246
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
247
|
+
* @returns The ECI position at the specified date.
|
|
248
|
+
*/
|
|
249
|
+
eci(date, j, gmst) {
|
|
250
|
+
date ??= new Date();
|
|
251
|
+
const { m } = Satellite.calculateTimeVariables(date, this.satrec, j, gmst);
|
|
252
|
+
if (!m) {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
const pv = Sgp4.propagate(this.satrec, m);
|
|
256
|
+
if (!pv.position || !pv.velocity) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
return pv;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Calculates the J2000 coordinates for a given date. If no date is provided, the current time is used.
|
|
263
|
+
* @variation expanded
|
|
264
|
+
* @param date - The date for which to calculate the J2000 coordinates, defaults to the current date.
|
|
265
|
+
* @returns The J2000 coordinates for the specified date.
|
|
266
|
+
* @throws Error if propagation fails.
|
|
267
|
+
*/
|
|
268
|
+
toJ2000(date = new Date()) {
|
|
269
|
+
const { m } = Satellite.calculateTimeVariables(date, this.satrec);
|
|
270
|
+
if (!m) {
|
|
271
|
+
throw new Error('Propagation failed!');
|
|
272
|
+
}
|
|
273
|
+
const pv = Sgp4.propagate(this.satrec, m);
|
|
274
|
+
if (!pv.position) {
|
|
275
|
+
throw new Error('Propagation failed!');
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
const p = pv.position;
|
|
279
|
+
const v = pv.velocity;
|
|
280
|
+
const epoch = new EpochUTC(date.getTime() / 1000);
|
|
281
|
+
const pos = new Vector3D(p.x, p.y, p.z);
|
|
282
|
+
const vel = new Vector3D(v.x, v.y, v.z);
|
|
283
|
+
return new J2000(epoch, pos, vel);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Returns the elevation angle of the satellite as seen by the given sensor at the specified time.
|
|
288
|
+
* @variation optimized
|
|
289
|
+
* @param observer - The observer's position on the ground.
|
|
290
|
+
* @param date - The date at which to calculate the elevation angle. Optional, defaults to the current date.
|
|
291
|
+
* @returns The elevation angle of the satellite as seen by the given sensor at the specified time.
|
|
292
|
+
*/
|
|
293
|
+
el(observer, date = new Date()) {
|
|
294
|
+
const rae = this.rae(observer, date);
|
|
295
|
+
if (!rae) {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
return (rae.el * RAD2DEG);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Calculates LLA position at a given time.
|
|
302
|
+
* @variation optimized
|
|
303
|
+
* @param date - The date at which to calculate the LLA position. Optional, defaults to the current date.
|
|
304
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
305
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
306
|
+
* @returns The LLA position at the specified date.
|
|
307
|
+
*/
|
|
308
|
+
lla(date, j, gmst) {
|
|
309
|
+
date ??= new Date();
|
|
310
|
+
if (!j || !gmst) {
|
|
311
|
+
const timeVar = Satellite.calculateTimeVariables(date, this.satrec);
|
|
312
|
+
j = timeVar.j;
|
|
313
|
+
gmst = timeVar.gmst;
|
|
314
|
+
}
|
|
315
|
+
const eci = this.eci(date, j, gmst);
|
|
316
|
+
if (!eci) {
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
319
|
+
const pos = eci.position;
|
|
320
|
+
const lla = eci2lla(pos, gmst);
|
|
321
|
+
return lla;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Converts the satellite's position to geodetic coordinates.
|
|
325
|
+
* @variation expanded
|
|
326
|
+
* @param date The date for which to calculate the geodetic coordinates. Defaults to the current date.
|
|
327
|
+
* @returns The geodetic coordinates of the satellite.
|
|
328
|
+
*/
|
|
329
|
+
toGeodetic(date = new Date()) {
|
|
330
|
+
return this.toJ2000(date).toITRF().toGeodetic();
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Converts the satellite's position to the International Terrestrial Reference Frame (ITRF) at the specified date.
|
|
334
|
+
* If no date is provided, the current date is used.
|
|
335
|
+
* @variation expanded
|
|
336
|
+
* @param date The date for which to convert the position. Defaults to the current date.
|
|
337
|
+
* @returns The satellite's position in the ITRF at the specified date.
|
|
338
|
+
*/
|
|
339
|
+
toITRF(date = new Date()) {
|
|
340
|
+
return this.toJ2000(date).toITRF();
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Converts the current satellite's position to the Reference-Inertial-Celestial (RIC) frame
|
|
344
|
+
* relative to the specified reference satellite at the given date.
|
|
345
|
+
* @variation expanded
|
|
346
|
+
* @param reference The reference satellite.
|
|
347
|
+
* @param date The date for which to calculate the RIC frame. Defaults to the current date.
|
|
348
|
+
* @returns The RIC frame representing the current satellite's position relative to the reference satellite.
|
|
349
|
+
*/
|
|
350
|
+
toRIC(reference, date = new Date()) {
|
|
351
|
+
return RIC.fromJ2000(this.toJ2000(date), reference.toJ2000(date));
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Converts the satellite object to a TLE (Two-Line Element) object.
|
|
355
|
+
* @returns The TLE object representing the satellite.
|
|
356
|
+
*/
|
|
357
|
+
toTle() {
|
|
358
|
+
return new Tle(this.tle1, this.tle2);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Converts the satellite's position to classical orbital elements.
|
|
362
|
+
* @param date The date for which to calculate the classical elements. Defaults to the current date.
|
|
363
|
+
* @returns The classical orbital elements of the satellite.
|
|
364
|
+
*/
|
|
365
|
+
toClassicalElements(date = new Date()) {
|
|
366
|
+
return this.toJ2000(date).toClassicalElements();
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Calculates the RAE (Range, Azimuth, Elevation) vector for a given sensor and time.
|
|
370
|
+
* @variation optimized
|
|
371
|
+
* @param observer - The observer's position on the ground.
|
|
372
|
+
* @param date - The date at which to calculate the RAE vector. Optional, defaults to the current date.
|
|
373
|
+
* @param j - Julian date. Optional, defaults to null.
|
|
374
|
+
* @param gmst - Greenwich Mean Sidereal Time. Optional, defaults to null.
|
|
375
|
+
* @returns The RAE vector for the given sensor and time.
|
|
376
|
+
*/
|
|
377
|
+
rae(observer, date, j, gmst) {
|
|
378
|
+
date ??= new Date();
|
|
379
|
+
gmst ??= Satellite.calculateTimeVariables(date, this.satrec).gmst;
|
|
380
|
+
const eci = this.eci(date, j, gmst);
|
|
381
|
+
if (!eci) {
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
384
|
+
const ecf = eci2ecf(eci.position, gmst);
|
|
385
|
+
return ecf2rae(observer, ecf);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Returns the range of the satellite from the given sensor at the specified time.
|
|
389
|
+
* @variation optimized
|
|
390
|
+
* @param observer - The observer's position on the ground.
|
|
391
|
+
* @param date - The date at which to calculate the range. Optional, defaults to the current date.
|
|
392
|
+
* @returns The range of the satellite from the given sensor at the specified time.
|
|
393
|
+
*/
|
|
394
|
+
rng(observer, date = new Date()) {
|
|
395
|
+
const rae = this.rae(observer, date);
|
|
396
|
+
if (!rae) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
return rae.rng;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Applies the Doppler effect to the given frequency based on the observer's position and the date.
|
|
403
|
+
* @param freq - The frequency to apply the Doppler effect to.
|
|
404
|
+
* @param observer - The observer's position on the ground.
|
|
405
|
+
* @param date - The date at which to calculate the Doppler effect. Optional, defaults to the current date.
|
|
406
|
+
* @returns The frequency after applying the Doppler effect.
|
|
407
|
+
*/
|
|
408
|
+
applyDoppler(freq, observer, date) {
|
|
409
|
+
const doppler = this.dopplerFactor(observer, date);
|
|
410
|
+
if (!doppler) {
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
return freq * doppler;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Calculates the Doppler factor for the satellite.
|
|
417
|
+
* @param observer The observer's ground position.
|
|
418
|
+
* @param date The optional date for which to calculate the Doppler factor. If not provided, the current date is used.
|
|
419
|
+
* @returns The calculated Doppler factor.
|
|
420
|
+
*/
|
|
421
|
+
dopplerFactor(observer, date) {
|
|
422
|
+
const position = this.eci(date);
|
|
423
|
+
if (!position) {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
return dopplerFactor(observer.eci(date), position.position, position.velocity);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Calculates the time variables for a given date relative to the TLE epoch.
|
|
430
|
+
* @param date Date to calculate
|
|
431
|
+
* @param satrec Satellite orbital information
|
|
432
|
+
* @param j Julian date
|
|
433
|
+
* @param gmst Greenwich Mean Sidereal Time
|
|
434
|
+
* @returns Time variables
|
|
435
|
+
*/
|
|
436
|
+
static calculateTimeVariables(date, satrec, j, gmst) {
|
|
437
|
+
j ??= jday(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) + date.getUTCMilliseconds() * MILLISECONDS_TO_DAYS;
|
|
438
|
+
gmst ??= Sgp4.gstime(j);
|
|
439
|
+
const m = satrec ? (j - satrec.jdsatepoch) * MINUTES_PER_DAY : null;
|
|
440
|
+
return { gmst, m, j };
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
//# sourceMappingURL=Satellite.js.map
|