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.
Files changed (536) hide show
  1. package/CHANGELOG.md +9 -2
  2. package/README.md +0 -15
  3. package/dist/body/Celestial.d.ts +96 -0
  4. package/dist/body/Celestial.js +124 -0
  5. package/dist/body/Celestial.js.map +1 -0
  6. package/dist/body/Earth.d.ts +68 -0
  7. package/dist/body/Earth.js +198 -0
  8. package/dist/body/Earth.js.map +1 -0
  9. package/dist/body/Moon.d.ts +137 -0
  10. package/dist/body/Moon.js +464 -0
  11. package/dist/body/Moon.js.map +1 -0
  12. package/dist/body/NutationAngles.d.ts +38 -0
  13. package/dist/body/NutationAngles.js +24 -0
  14. package/dist/body/NutationAngles.js.map +1 -0
  15. package/dist/body/PrecessionAngles.d.ts +29 -0
  16. package/dist/body/PrecessionAngles.js +24 -0
  17. package/dist/body/PrecessionAngles.js.map +1 -0
  18. package/dist/body/Sun.d.ts +305 -0
  19. package/dist/body/Sun.js +548 -0
  20. package/dist/body/Sun.js.map +1 -0
  21. package/dist/body/index.d.ts +26 -0
  22. package/dist/body/index.js +27 -0
  23. package/dist/body/index.js.map +1 -0
  24. package/dist/coordinate/ClassicalElements.d.ts +132 -0
  25. package/dist/coordinate/ClassicalElements.js +279 -0
  26. package/dist/coordinate/ClassicalElements.js.map +1 -0
  27. package/dist/coordinate/EquinoctialElements.d.ts +114 -0
  28. package/dist/coordinate/EquinoctialElements.js +172 -0
  29. package/dist/coordinate/EquinoctialElements.js.map +1 -0
  30. package/dist/coordinate/FormatTle.d.ts +95 -0
  31. package/dist/coordinate/FormatTle.js +184 -0
  32. package/dist/coordinate/FormatTle.js.map +1 -0
  33. package/dist/coordinate/Geodetic.d.ts +110 -0
  34. package/dist/coordinate/Geodetic.js +163 -0
  35. package/dist/coordinate/Geodetic.js.map +1 -0
  36. package/dist/coordinate/Hill.d.ts +1 -1
  37. package/dist/coordinate/Hill.js +1 -1
  38. package/dist/coordinate/Hill.js.map +1 -1
  39. package/dist/coordinate/ITRF.d.ts +75 -0
  40. package/dist/coordinate/ITRF.js +135 -0
  41. package/dist/coordinate/ITRF.js.map +1 -0
  42. package/dist/coordinate/J2000.d.ts +65 -0
  43. package/dist/coordinate/J2000.js +120 -0
  44. package/dist/coordinate/J2000.js.map +1 -0
  45. package/dist/coordinate/RIC.d.ts +64 -0
  46. package/dist/coordinate/RIC.js +79 -0
  47. package/dist/coordinate/RIC.js.map +1 -0
  48. package/dist/coordinate/RelativeState.d.ts +70 -0
  49. package/dist/coordinate/RelativeState.js +79 -0
  50. package/dist/coordinate/RelativeState.js.map +1 -0
  51. package/dist/coordinate/StateVector.d.ts +76 -0
  52. package/dist/coordinate/StateVector.js +97 -0
  53. package/dist/coordinate/StateVector.js.map +1 -0
  54. package/dist/coordinate/TEME.d.ts +57 -0
  55. package/dist/coordinate/TEME.js +89 -0
  56. package/dist/coordinate/TEME.js.map +1 -0
  57. package/dist/coordinate/Tle.d.ts +430 -0
  58. package/dist/coordinate/Tle.js +865 -0
  59. package/dist/coordinate/Tle.js.map +1 -0
  60. package/dist/coordinate/index.d.ts +11 -0
  61. package/dist/coordinate/index.js +12 -0
  62. package/dist/coordinate/index.js.map +1 -1
  63. package/dist/coordinate/tle-format-data.d.ts +41 -0
  64. package/dist/coordinate/tle-format-data.js +46 -0
  65. package/dist/coordinate/tle-format-data.js.map +1 -0
  66. package/dist/covariance/CovarianceSample.d.ts +1 -1
  67. package/dist/covariance/CovarianceSample.js +1 -1
  68. package/dist/covariance/CovarianceSample.js.map +1 -1
  69. package/dist/covariance/StateCovariance.d.ts +1 -1
  70. package/dist/covariance/StateCovariance.js +1 -1
  71. package/dist/covariance/StateCovariance.js.map +1 -1
  72. package/dist/data/DataHandler.d.ts +66 -0
  73. package/dist/data/DataHandler.js +80 -0
  74. package/dist/data/DataHandler.js.map +1 -0
  75. package/dist/data/values/Egm96Data.d.ts +37 -0
  76. package/dist/data/values/Egm96Data.js +63 -0
  77. package/dist/data/values/Egm96Data.js.map +1 -0
  78. package/dist/data/values/HpAtmosphereData.d.ts +33 -0
  79. package/dist/data/values/HpAtmosphereData.js +58 -0
  80. package/dist/data/values/HpAtmosphereData.js.map +1 -0
  81. package/dist/data/values/HpAtmosphereResult.d.ts +29 -0
  82. package/dist/data/values/HpAtmosphereResult.js +38 -0
  83. package/dist/data/values/HpAtmosphereResult.js.map +1 -0
  84. package/dist/data/values/Iau1980Data.d.ts +36 -0
  85. package/dist/data/values/Iau1980Data.js +52 -0
  86. package/dist/data/values/Iau1980Data.js.map +1 -0
  87. package/dist/data/values/LeapSecond.d.ts +27 -0
  88. package/dist/data/values/LeapSecond.js +35 -0
  89. package/dist/data/values/LeapSecond.js.map +1 -0
  90. package/dist/data/values/LeapSecondData.d.ts +41 -0
  91. package/dist/data/values/LeapSecondData.js +103 -0
  92. package/dist/data/values/LeapSecondData.js.map +1 -0
  93. package/dist/data/values/egm96.d.ts +24 -0
  94. package/dist/data/values/egm96.js +726 -0
  95. package/dist/data/values/egm96.js.map +1 -0
  96. package/dist/data/values/hpAtmosphere.d.ts +24 -0
  97. package/dist/data/values/hpAtmosphere.js +76 -0
  98. package/dist/data/values/hpAtmosphere.js.map +1 -0
  99. package/dist/data/values/iau1980.d.ts +24 -0
  100. package/dist/data/values/iau1980.js +30 -0
  101. package/dist/data/values/iau1980.js.map +1 -0
  102. package/dist/enums/AngularDiameterMethod.d.ts +27 -0
  103. package/dist/enums/AngularDiameterMethod.js +29 -0
  104. package/dist/enums/AngularDiameterMethod.js.map +1 -0
  105. package/dist/enums/AngularDistanceMethod.d.ts +27 -0
  106. package/dist/enums/AngularDistanceMethod.js +29 -0
  107. package/dist/enums/AngularDistanceMethod.js.map +1 -0
  108. package/dist/enums/OrbitRegime.d.ts +30 -0
  109. package/dist/enums/OrbitRegime.js +32 -0
  110. package/dist/enums/OrbitRegime.js.map +1 -0
  111. package/dist/enums/PassType.d.ts +28 -0
  112. package/dist/enums/PassType.js +30 -0
  113. package/dist/enums/PassType.js.map +1 -0
  114. package/dist/enums/Sgp4OpsMode.d.ts +26 -0
  115. package/dist/enums/Sgp4OpsMode.js +28 -0
  116. package/dist/enums/Sgp4OpsMode.js.map +1 -0
  117. package/dist/enums/index.d.ts +5 -0
  118. package/dist/enums/index.js +5 -0
  119. package/dist/enums/index.js.map +1 -1
  120. package/dist/force/AtmosphericDrag.d.ts +1 -1
  121. package/dist/force/AtmosphericDrag.js +1 -1
  122. package/dist/force/AtmosphericDrag.js.map +1 -1
  123. package/dist/force/EarthGravity.d.ts +1 -1
  124. package/dist/force/EarthGravity.js +1 -1
  125. package/dist/force/EarthGravity.js.map +1 -1
  126. package/dist/force/Force.d.ts +1 -1
  127. package/dist/force/ForceModel.d.ts +1 -1
  128. package/dist/force/ForceModel.js +1 -1
  129. package/dist/force/ForceModel.js.map +1 -1
  130. package/dist/force/Gravity.d.ts +1 -1
  131. package/dist/force/Gravity.js +1 -1
  132. package/dist/force/Gravity.js.map +1 -1
  133. package/dist/force/SolarRadiationPressure.d.ts +1 -1
  134. package/dist/force/SolarRadiationPressure.js +1 -1
  135. package/dist/force/SolarRadiationPressure.js.map +1 -1
  136. package/dist/force/ThirdBodyGravity.d.ts +1 -1
  137. package/dist/force/ThirdBodyGravity.js +1 -1
  138. package/dist/force/ThirdBodyGravity.js.map +1 -1
  139. package/dist/force/Thrust.d.ts +1 -1
  140. package/dist/force/Thrust.js +1 -1
  141. package/dist/force/Thrust.js.map +1 -1
  142. package/dist/interfaces/BaseObjectParams.d.ts +31 -0
  143. package/dist/interfaces/BaseObjectParams.js +24 -0
  144. package/dist/interfaces/BaseObjectParams.js.map +1 -0
  145. package/dist/interfaces/ClassicalElementsParams.d.ts +33 -0
  146. package/dist/interfaces/ClassicalElementsParams.js +24 -0
  147. package/dist/interfaces/ClassicalElementsParams.js.map +1 -0
  148. package/dist/interfaces/EquinoctialElementsParams.d.ts +35 -0
  149. package/dist/interfaces/EquinoctialElementsParams.js +24 -0
  150. package/dist/interfaces/EquinoctialElementsParams.js.map +1 -0
  151. package/dist/interfaces/GroundPositionParams.d.ts +28 -0
  152. package/dist/interfaces/GroundPositionParams.js +24 -0
  153. package/dist/interfaces/GroundPositionParams.js.map +1 -0
  154. package/dist/interfaces/OmmFormat.d.ts +62 -0
  155. package/dist/interfaces/OmmFormat.js +2 -0
  156. package/dist/interfaces/OmmFormat.js.map +1 -0
  157. package/dist/interfaces/OptionsParams.d.ts +3 -0
  158. package/dist/interfaces/OptionsParams.js +2 -0
  159. package/dist/interfaces/OptionsParams.js.map +1 -0
  160. package/dist/interfaces/RfSensorParams.d.ts +1 -1
  161. package/dist/interfaces/SatelliteParams.d.ts +18 -0
  162. package/dist/interfaces/SatelliteParams.js +2 -0
  163. package/dist/interfaces/SatelliteParams.js.map +1 -0
  164. package/dist/interfaces/SensorParams.d.ts +38 -0
  165. package/dist/interfaces/SensorParams.js +2 -0
  166. package/dist/interfaces/SensorParams.js.map +1 -0
  167. package/dist/interfaces/StarObjectParams.d.ts +10 -0
  168. package/dist/interfaces/StarObjectParams.js +2 -0
  169. package/dist/interfaces/StarObjectParams.js.map +1 -0
  170. package/dist/interfaces/TimeVariables.d.ts +6 -0
  171. package/dist/interfaces/TimeVariables.js +2 -0
  172. package/dist/interfaces/TimeVariables.js.map +1 -0
  173. package/dist/interfaces/index.d.ts +8 -0
  174. package/dist/interpolator/ChebyshevCoefficients.d.ts +1 -1
  175. package/dist/interpolator/ChebyshevCoefficients.js +1 -1
  176. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -1
  177. package/dist/interpolator/ChebyshevInterpolator.d.ts +1 -1
  178. package/dist/interpolator/ChebyshevInterpolator.js +1 -1
  179. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -1
  180. package/dist/interpolator/CubicSpline.d.ts +1 -1
  181. package/dist/interpolator/CubicSplineInterpolator.d.ts +1 -1
  182. package/dist/interpolator/CubicSplineInterpolator.js +1 -1
  183. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -1
  184. package/dist/interpolator/Interpolator.d.ts +1 -1
  185. package/dist/interpolator/Interpolator.js +1 -1
  186. package/dist/interpolator/Interpolator.js.map +1 -1
  187. package/dist/interpolator/LagrangeInterpolator.d.ts +1 -1
  188. package/dist/interpolator/LagrangeInterpolator.js +1 -1
  189. package/dist/interpolator/LagrangeInterpolator.js.map +1 -1
  190. package/dist/interpolator/StateInterpolator.d.ts +1 -1
  191. package/dist/interpolator/VerletBlendInterpolator.d.ts +1 -1
  192. package/dist/interpolator/VerletBlendInterpolator.js +1 -1
  193. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -1
  194. package/dist/main.d.ts +11 -3
  195. package/dist/main.js +11 -3
  196. package/dist/main.js.map +1 -1
  197. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +1 -1
  198. package/dist/maneuver/TwoBurnOrbitTransfer.js +1 -1
  199. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -1
  200. package/dist/maneuver/Waypoint.d.ts +1 -1
  201. package/dist/maneuver/Waypoint.js +1 -1
  202. package/dist/maneuver/Waypoint.js.map +1 -1
  203. package/dist/objects/BaseObject.d.ts +74 -0
  204. package/dist/objects/BaseObject.js +151 -0
  205. package/dist/objects/BaseObject.js.map +1 -0
  206. package/dist/objects/DetailedSatellite.d.ts +3 -1
  207. package/dist/objects/DetailedSatellite.js +4 -2
  208. package/dist/objects/DetailedSatellite.js.map +1 -1
  209. package/dist/objects/DetailedSensor.d.ts +2 -1
  210. package/dist/objects/DetailedSensor.js +1 -1
  211. package/dist/objects/DetailedSensor.js.map +1 -1
  212. package/dist/objects/GroundObject.d.ts +85 -0
  213. package/dist/objects/GroundObject.js +143 -0
  214. package/dist/objects/GroundObject.js.map +1 -0
  215. package/dist/objects/LandObject.d.ts +2 -1
  216. package/dist/objects/LandObject.js +1 -1
  217. package/dist/objects/LandObject.js.map +1 -1
  218. package/dist/objects/Marker.d.ts +1 -1
  219. package/dist/objects/Marker.js +1 -1
  220. package/dist/objects/Marker.js.map +1 -1
  221. package/dist/objects/RfSensor.d.ts +1 -2
  222. package/dist/objects/RfSensor.js +1 -2
  223. package/dist/objects/RfSensor.js.map +1 -1
  224. package/dist/objects/Satellite.d.ts +226 -0
  225. package/dist/objects/Satellite.js +443 -0
  226. package/dist/objects/Satellite.js.map +1 -0
  227. package/dist/objects/Sensor.d.ts +100 -0
  228. package/dist/objects/Sensor.js +239 -0
  229. package/dist/objects/Sensor.js.map +1 -0
  230. package/dist/objects/Star.d.ts +36 -0
  231. package/dist/objects/Star.js +59 -0
  232. package/dist/objects/Star.js.map +1 -0
  233. package/dist/objects/index.d.ts +5 -0
  234. package/dist/objects/index.js +5 -0
  235. package/dist/objects/index.js.map +1 -1
  236. package/dist/observation/Observation.d.ts +1 -1
  237. package/dist/observation/ObservationOptical.d.ts +1 -1
  238. package/dist/observation/ObservationOptical.js +1 -1
  239. package/dist/observation/ObservationOptical.js.map +1 -1
  240. package/dist/observation/ObservationRadar.d.ts +1 -1
  241. package/dist/observation/ObservationRadar.js +1 -1
  242. package/dist/observation/ObservationRadar.js.map +1 -1
  243. package/dist/observation/ObservationUtils.d.ts +3 -1
  244. package/dist/observation/ObservationUtils.js +15 -1
  245. package/dist/observation/ObservationUtils.js.map +1 -1
  246. package/dist/observation/RAE.d.ts +111 -0
  247. package/dist/observation/RAE.js +215 -0
  248. package/dist/observation/RAE.js.map +1 -0
  249. package/dist/observation/RadecGeocentric.d.ts +111 -0
  250. package/dist/observation/RadecGeocentric.js +169 -0
  251. package/dist/observation/RadecGeocentric.js.map +1 -0
  252. package/dist/observation/RadecTopocentric.d.ts +123 -0
  253. package/dist/observation/RadecTopocentric.js +196 -0
  254. package/dist/observation/RadecTopocentric.js.map +1 -0
  255. package/dist/observation/index.d.ts +26 -0
  256. package/dist/observation/index.js +27 -0
  257. package/dist/observation/index.js.map +1 -0
  258. package/dist/operations/BoxMuller.d.ts +1 -1
  259. package/dist/operations/BoxMuller.js +1 -1
  260. package/dist/operations/BoxMuller.js.map +1 -1
  261. package/dist/operations/EulerAngles.d.ts +1 -1
  262. package/dist/operations/EulerAngles.js +1 -1
  263. package/dist/operations/EulerAngles.js.map +1 -1
  264. package/dist/operations/Matrix.d.ts +170 -0
  265. package/dist/operations/Matrix.js +405 -0
  266. package/dist/operations/Matrix.js.map +1 -0
  267. package/dist/operations/Quaternion.d.ts +1 -1
  268. package/dist/operations/Quaternion.js +1 -1
  269. package/dist/operations/Quaternion.js.map +1 -1
  270. package/dist/operations/Random.d.ts +40 -0
  271. package/dist/operations/Random.js +50 -0
  272. package/dist/operations/Random.js.map +1 -0
  273. package/dist/operations/RandomGaussianSource.d.ts +1 -1
  274. package/dist/operations/RandomGaussianSource.js +1 -1
  275. package/dist/operations/RandomGaussianSource.js.map +1 -1
  276. package/dist/operations/Vector.d.ts +262 -0
  277. package/dist/operations/Vector.js +415 -0
  278. package/dist/operations/Vector.js.map +1 -0
  279. package/dist/operations/Vector3D.d.ts +86 -0
  280. package/dist/operations/Vector3D.js +241 -0
  281. package/dist/operations/Vector3D.js.map +1 -0
  282. package/dist/operations/operations.d.ts +26 -0
  283. package/dist/operations/operations.js +27 -0
  284. package/dist/operations/operations.js.map +1 -0
  285. package/dist/optimize/ChebyshevCompressor.js +1 -1
  286. package/dist/optimize/ChebyshevCompressor.js.map +1 -1
  287. package/dist/optimize/PolynomialRegression.js +1 -1
  288. package/dist/optimize/PolynomialRegression.js.map +1 -1
  289. package/dist/optimize/SimplexEntry.js +1 -1
  290. package/dist/optimize/SimplexEntry.js.map +1 -1
  291. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +1 -1
  292. package/dist/orbit_determination/BatchLeastSquaresOD.js +1 -1
  293. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -1
  294. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +1 -1
  295. package/dist/orbit_determination/GibbsIOD.d.ts +1 -1
  296. package/dist/orbit_determination/GibbsIOD.js +1 -1
  297. package/dist/orbit_determination/GibbsIOD.js.map +1 -1
  298. package/dist/orbit_determination/GoodingIOD.d.ts +1 -1
  299. package/dist/orbit_determination/GoodingIOD.js +1 -1
  300. package/dist/orbit_determination/GoodingIOD.js.map +1 -1
  301. package/dist/orbit_determination/HerrickGibbsIOD.d.ts +1 -1
  302. package/dist/orbit_determination/HerrickGibbsIOD.js +1 -1
  303. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -1
  304. package/dist/orbit_determination/LambertIOD.d.ts +1 -1
  305. package/dist/orbit_determination/LambertIOD.js +1 -1
  306. package/dist/orbit_determination/LambertIOD.js.map +1 -1
  307. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +1 -1
  308. package/dist/orbit_determination/ModifiedGoodingIOD.js +1 -1
  309. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -1
  310. package/dist/orbit_determination/index.d.ts +7 -0
  311. package/dist/orbit_determination/index.js +8 -0
  312. package/dist/orbit_determination/index.js.map +1 -0
  313. package/dist/propagator/KeplerPropagator.d.ts +1 -1
  314. package/dist/propagator/KeplerPropagator.js +1 -1
  315. package/dist/propagator/KeplerPropagator.js.map +1 -1
  316. package/dist/propagator/Propagator.d.ts +1 -1
  317. package/dist/propagator/Propagator.js +1 -1
  318. package/dist/propagator/Propagator.js.map +1 -1
  319. package/dist/propagator/RkCheckpoint.d.ts +1 -1
  320. package/dist/propagator/RkResult.d.ts +1 -1
  321. package/dist/propagator/RungeKutta4Propagator.d.ts +1 -1
  322. package/dist/propagator/RungeKutta4Propagator.js +1 -1
  323. package/dist/propagator/RungeKutta4Propagator.js.map +1 -1
  324. package/dist/propagator/RungeKuttaAdaptive.d.ts +1 -1
  325. package/dist/propagator/RungeKuttaAdaptive.js +1 -1
  326. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -1
  327. package/dist/propagator/Sgp4Propagator.d.ts +1 -1
  328. package/dist/sgp4/index.d.ts +23 -0
  329. package/dist/sgp4/index.js +24 -0
  330. package/dist/sgp4/index.js.map +1 -0
  331. package/dist/sgp4/sgp4-error.d.ts +22 -0
  332. package/dist/sgp4/sgp4-error.js +44 -0
  333. package/dist/sgp4/sgp4-error.js.map +1 -0
  334. package/dist/sgp4/sgp4.d.ts +102 -0
  335. package/dist/sgp4/sgp4.js +3167 -0
  336. package/dist/sgp4/sgp4.js.map +1 -0
  337. package/dist/smoothing/ExponentialSmoothing.d.ts +1 -1
  338. package/dist/time/Epoch.d.ts +44 -0
  339. package/dist/time/Epoch.js +109 -0
  340. package/dist/time/Epoch.js.map +1 -0
  341. package/dist/time/EpochGPS.d.ts +42 -0
  342. package/dist/time/EpochGPS.js +70 -0
  343. package/dist/time/EpochGPS.js.map +1 -0
  344. package/dist/time/EpochTAI.d.ts +26 -0
  345. package/dist/time/EpochTAI.js +27 -0
  346. package/dist/time/EpochTAI.js.map +1 -0
  347. package/dist/time/EpochTDB.d.ts +26 -0
  348. package/dist/time/EpochTDB.js +27 -0
  349. package/dist/time/EpochTDB.js.map +1 -0
  350. package/dist/time/EpochTT.d.ts +26 -0
  351. package/dist/time/EpochTT.js +27 -0
  352. package/dist/time/EpochTT.js.map +1 -0
  353. package/dist/time/EpochUTC.d.ts +59 -0
  354. package/dist/time/EpochUTC.js +137 -0
  355. package/dist/time/EpochUTC.js.map +1 -0
  356. package/dist/time/EpochWindow.d.ts +28 -0
  357. package/dist/time/EpochWindow.js +31 -0
  358. package/dist/time/EpochWindow.js.map +1 -0
  359. package/dist/time/TimeStamped.d.ts +43 -0
  360. package/dist/time/TimeStamped.js +46 -0
  361. package/dist/time/TimeStamped.js.map +1 -0
  362. package/dist/time/index.d.ts +30 -0
  363. package/dist/time/index.js +31 -0
  364. package/dist/time/index.js.map +1 -0
  365. package/dist/transforms/TransformCache.d.ts +27 -0
  366. package/dist/transforms/TransformCache.js +41 -0
  367. package/dist/transforms/TransformCache.js.map +1 -0
  368. package/dist/transforms/conversions.d.ts +63 -0
  369. package/dist/transforms/conversions.js +88 -0
  370. package/dist/transforms/conversions.js.map +1 -0
  371. package/dist/transforms/index.d.ts +1 -0
  372. package/dist/transforms/index.js +1 -0
  373. package/dist/transforms/index.js.map +1 -1
  374. package/dist/transforms/transforms.d.ts +166 -2
  375. package/dist/transforms/transforms.js +372 -1
  376. package/dist/transforms/transforms.js.map +1 -1
  377. package/dist/types/types.d.ts +674 -2
  378. package/dist/types/types.js +36 -0
  379. package/dist/types/types.js.map +1 -1
  380. package/dist/utils/constants.d.ts +80 -0
  381. package/dist/utils/constants.js +87 -0
  382. package/dist/utils/constants.js.map +1 -0
  383. package/dist/utils/functions.d.ts +228 -0
  384. package/dist/utils/functions.js +476 -0
  385. package/dist/utils/functions.js.map +1 -1
  386. package/dist/utils/index.d.ts +3 -1
  387. package/dist/utils/index.js +3 -1
  388. package/dist/utils/index.js.map +1 -1
  389. package/dist/utils/jacobian.d.ts +1 -1
  390. package/dist/utils/jacobian.js +1 -1
  391. package/dist/utils/jacobian.js.map +1 -1
  392. package/dist/utils/linearDistance.d.ts +8 -0
  393. package/dist/utils/linearDistance.js +10 -0
  394. package/dist/utils/linearDistance.js.map +1 -0
  395. package/package.json +4 -7
  396. package/src/body/Celestial.ts +134 -0
  397. package/src/body/Earth.ts +260 -0
  398. package/src/body/Moon.ts +556 -0
  399. package/src/body/NutationAngles.ts +40 -0
  400. package/src/body/PrecessionAngles.ts +31 -0
  401. package/src/body/Sun.ts +669 -0
  402. package/src/body/index.ts +27 -0
  403. package/src/body/suncalc.LICENSE.md +18 -0
  404. package/src/coordinate/ClassicalElements.ts +326 -0
  405. package/src/coordinate/EquinoctialElements.ts +189 -0
  406. package/src/coordinate/FormatTle.ts +214 -0
  407. package/src/coordinate/Geodetic.ts +186 -0
  408. package/src/coordinate/Hill.ts +1 -1
  409. package/src/coordinate/ITRF.ts +146 -0
  410. package/src/coordinate/J2000.ts +130 -0
  411. package/src/coordinate/RIC.ts +87 -0
  412. package/src/coordinate/RelativeState.ts +101 -0
  413. package/src/coordinate/StateVector.ts +122 -0
  414. package/src/coordinate/TEME.ts +97 -0
  415. package/src/coordinate/Tle.ts +1024 -0
  416. package/src/coordinate/index.ts +12 -0
  417. package/src/coordinate/tle-format-data.ts +47 -0
  418. package/src/covariance/CovarianceSample.ts +1 -1
  419. package/src/covariance/StateCovariance.ts +1 -1
  420. package/src/data/DataHandler.ts +88 -0
  421. package/src/data/values/Egm96Data.ts +75 -0
  422. package/src/data/values/HpAtmosphereData.ts +76 -0
  423. package/src/data/values/HpAtmosphereResult.ts +41 -0
  424. package/src/data/values/Iau1980Data.ts +63 -0
  425. package/src/data/values/LeapSecond.ts +37 -0
  426. package/src/data/values/LeapSecondData.ts +113 -0
  427. package/src/data/values/egm96.ts +728 -0
  428. package/src/data/values/hpAtmosphere.ts +79 -0
  429. package/src/data/values/iau1980.ts +32 -0
  430. package/src/enums/AngularDiameterMethod.ts +28 -0
  431. package/src/enums/AngularDistanceMethod.ts +28 -0
  432. package/src/enums/OrbitRegime.ts +31 -0
  433. package/src/enums/PassType.ts +29 -0
  434. package/src/enums/Sgp4OpsMode.ts +27 -0
  435. package/src/enums/index.ts +5 -0
  436. package/src/force/AtmosphericDrag.ts +1 -1
  437. package/src/force/EarthGravity.ts +1 -1
  438. package/src/force/Force.ts +1 -1
  439. package/src/force/ForceModel.ts +1 -1
  440. package/src/force/Gravity.ts +1 -1
  441. package/src/force/SolarRadiationPressure.ts +1 -1
  442. package/src/force/ThirdBodyGravity.ts +1 -1
  443. package/src/force/Thrust.ts +1 -1
  444. package/src/interfaces/BaseObjectParams.ts +33 -0
  445. package/src/interfaces/ClassicalElementsParams.ts +35 -0
  446. package/src/interfaces/EquinoctialElementsParams.ts +37 -0
  447. package/src/interfaces/GroundPositionParams.ts +30 -0
  448. package/src/interfaces/OmmFormat.ts +63 -0
  449. package/src/interfaces/OptionsParams.ts +3 -0
  450. package/src/interfaces/RfSensorParams.ts +1 -1
  451. package/src/interfaces/SatelliteParams.ts +20 -0
  452. package/src/interfaces/SensorParams.ts +39 -0
  453. package/src/interfaces/StarObjectParams.ts +11 -0
  454. package/src/interfaces/TimeVariables.ts +7 -0
  455. package/src/interfaces/index.ts +8 -0
  456. package/src/interpolator/ChebyshevCoefficients.ts +1 -1
  457. package/src/interpolator/ChebyshevInterpolator.ts +1 -1
  458. package/src/interpolator/CubicSpline.ts +1 -1
  459. package/src/interpolator/CubicSplineInterpolator.ts +1 -1
  460. package/src/interpolator/Interpolator.ts +1 -1
  461. package/src/interpolator/LagrangeInterpolator.ts +1 -1
  462. package/src/interpolator/StateInterpolator.ts +1 -1
  463. package/src/interpolator/VerletBlendInterpolator.ts +1 -1
  464. package/src/main.ts +11 -3
  465. package/src/maneuver/TwoBurnOrbitTransfer.ts +1 -1
  466. package/src/maneuver/Waypoint.ts +1 -1
  467. package/src/objects/BaseObject.ts +171 -0
  468. package/src/objects/DetailedSatellite.ts +5 -3
  469. package/src/objects/DetailedSensor.ts +2 -1
  470. package/src/objects/GroundObject.ts +176 -0
  471. package/src/objects/LandObject.ts +2 -1
  472. package/src/objects/Marker.ts +1 -1
  473. package/src/objects/RfSensor.ts +1 -2
  474. package/src/objects/Satellite.ts +552 -0
  475. package/src/objects/Sensor.ts +280 -0
  476. package/src/objects/Star.ts +96 -0
  477. package/src/objects/index.ts +5 -0
  478. package/src/observation/Observation.ts +1 -1
  479. package/src/observation/ObservationOptical.ts +1 -1
  480. package/src/observation/ObservationRadar.ts +1 -1
  481. package/src/observation/ObservationUtils.ts +30 -1
  482. package/src/observation/RAE.ts +262 -0
  483. package/src/observation/RadecGeocentric.ts +206 -0
  484. package/src/observation/RadecTopocentric.ts +241 -0
  485. package/src/observation/index.ts +27 -0
  486. package/src/operations/BoxMuller.ts +1 -1
  487. package/src/operations/EulerAngles.ts +1 -1
  488. package/src/operations/Matrix.ts +473 -0
  489. package/src/operations/Quaternion.ts +1 -1
  490. package/src/operations/Random.ts +54 -0
  491. package/src/operations/RandomGaussianSource.ts +1 -1
  492. package/src/operations/Vector.ts +484 -0
  493. package/src/operations/Vector3D.ts +289 -0
  494. package/src/operations/operations.ts +27 -0
  495. package/src/optimize/ChebyshevCompressor.ts +1 -1
  496. package/src/optimize/PolynomialRegression.ts +1 -1
  497. package/src/optimize/SimplexEntry.ts +1 -1
  498. package/src/orbit_determination/BatchLeastSquaresOD.ts +1 -1
  499. package/src/orbit_determination/BatchLeastSquaresResult.ts +1 -1
  500. package/src/orbit_determination/GibbsIOD.ts +3 -1
  501. package/src/orbit_determination/GoodingIOD.ts +1 -1
  502. package/src/orbit_determination/HerrickGibbsIOD.ts +1 -1
  503. package/src/orbit_determination/LambertIOD.ts +1 -1
  504. package/src/orbit_determination/ModifiedGoodingIOD.ts +1 -1
  505. package/src/orbit_determination/index.ts +7 -0
  506. package/src/propagator/KeplerPropagator.ts +1 -1
  507. package/src/propagator/Propagator.ts +1 -1
  508. package/src/propagator/RkCheckpoint.ts +1 -1
  509. package/src/propagator/RkResult.ts +1 -1
  510. package/src/propagator/RungeKutta4Propagator.ts +1 -1
  511. package/src/propagator/RungeKuttaAdaptive.ts +1 -1
  512. package/src/propagator/Sgp4Propagator.ts +1 -1
  513. package/src/sgp4/index.ts +24 -0
  514. package/src/sgp4/sgp4-error.ts +53 -0
  515. package/src/sgp4/sgp4.LICENSE.md +28 -0
  516. package/src/sgp4/sgp4.ts +3986 -0
  517. package/src/smoothing/ExponentialSmoothing.ts +1 -1
  518. package/src/time/Epoch.ts +128 -0
  519. package/src/time/EpochGPS.ts +76 -0
  520. package/src/time/EpochTAI.ts +27 -0
  521. package/src/time/EpochTDB.ts +27 -0
  522. package/src/time/EpochTT.ts +27 -0
  523. package/src/time/EpochUTC.ts +188 -0
  524. package/src/time/EpochWindow.ts +33 -0
  525. package/src/time/TimeStamped.ts +50 -0
  526. package/src/time/index.ts +31 -0
  527. package/src/transforms/TransformCache.ts +46 -0
  528. package/src/transforms/conversions.ts +98 -0
  529. package/src/transforms/index.ts +1 -0
  530. package/src/transforms/transforms.ts +478 -2
  531. package/src/types/types.ts +721 -2
  532. package/src/utils/constants.ts +113 -0
  533. package/src/utils/functions.ts +562 -0
  534. package/src/utils/index.ts +3 -1
  535. package/src/utils/jacobian.ts +1 -1
  536. package/src/utils/linearDistance.ts +11 -0
@@ -0,0 +1,172 @@
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 { earthGravityParam, MINUTES_PER_DAY, TAU } from '../utils/constants.js';
24
+ import { newtonM } from '../utils/functions.js';
25
+ import { ClassicalElements } from './ClassicalElements.js';
26
+ /**
27
+ * Equinoctial elements are a set of orbital elements used to describe the
28
+ * orbits of celestial bodies, such as satellites around a planet. They provide
29
+ * an alternative to the traditional Keplerian elements and are especially
30
+ * useful for avoiding singularities and numerical issues in certain types of
31
+ * orbits.
32
+ *
33
+ * Unlike Keplerian elements, equinoctial elements don't suffer from
34
+ * singularities at zero eccentricity (circular orbits) or zero inclination
35
+ * (equatorial orbits). This makes them more reliable for numerical simulations
36
+ * and analytical studies, especially in these edge cases.
37
+ * @see https://faculty.nps.edu/dad/orbital/th0.pdf
38
+ */
39
+ export class EquinoctialElements {
40
+ epoch;
41
+ /** The semi-major axis of the orbit in kilometers. */
42
+ a;
43
+ /** The h component of the eccentricity vector. */
44
+ h;
45
+ /** The k component of the eccentricity vector. */
46
+ k;
47
+ /** The p component of the ascending node vector. */
48
+ p;
49
+ /** The q component of the ascending node vector. */
50
+ q;
51
+ /** The mean longitude of the orbit in radians. */
52
+ lambda;
53
+ /** The gravitational parameter of the central body in km³/s². */
54
+ mu;
55
+ /** The retrograde factor. 1 for prograde orbits, -1 for retrograde orbits. */
56
+ I;
57
+ constructor({ epoch, h, k, lambda, a, p, q, mu, I }) {
58
+ this.epoch = epoch;
59
+ this.h = h;
60
+ this.k = k;
61
+ this.lambda = lambda;
62
+ this.a = a;
63
+ this.p = p;
64
+ this.q = q;
65
+ this.mu = mu ?? earthGravityParam;
66
+ this.I = I ?? 1;
67
+ }
68
+ /**
69
+ * Returns a string representation of the EquinoctialElements object.
70
+ * @returns A string representation of the EquinoctialElements object.
71
+ */
72
+ toString() {
73
+ return [
74
+ '[EquinoctialElements]',
75
+ ` Epoch: ${this.epoch}`,
76
+ ` a: ${this.a} km`,
77
+ ` h: ${this.h}`,
78
+ ` k: ${this.k}`,
79
+ ` p: ${this.p}`,
80
+ ` q: ${this.q}`,
81
+ ` lambda: ${this.lambda} rad`,
82
+ ].join('\n');
83
+ }
84
+ /**
85
+ * Gets the semimajor axis.
86
+ * @returns The semimajor axis in kilometers.
87
+ */
88
+ get semimajorAxis() {
89
+ return this.a;
90
+ }
91
+ /**
92
+ * Gets the mean longitude.
93
+ * @returns The mean longitude in radians.
94
+ */
95
+ get meanLongitude() {
96
+ return this.lambda;
97
+ }
98
+ /**
99
+ * Calculates the mean motion of the celestial object.
100
+ * @returns The mean motion in units of radians per second.
101
+ */
102
+ get meanMotion() {
103
+ return Math.sqrt(this.mu / this.a ** 3);
104
+ }
105
+ /**
106
+ * Gets the retrograde factor.
107
+ * @returns The retrograde factor.
108
+ */
109
+ get retrogradeFactor() {
110
+ return this.I;
111
+ }
112
+ /**
113
+ * Checks if the orbit is prograde.
114
+ * @returns True if the orbit is prograde, false otherwise.
115
+ */
116
+ isPrograde() {
117
+ return this.I === 1;
118
+ }
119
+ /**
120
+ * Checks if the orbit is retrograde.
121
+ * @returns True if the orbit is retrograde, false otherwise.
122
+ */
123
+ isRetrograde() {
124
+ return this.I === -1;
125
+ }
126
+ /**
127
+ * Gets the period of the orbit.
128
+ * @returns The period in minutes.
129
+ */
130
+ get period() {
131
+ const periodSec = (TAU * Math.sqrt(this.semimajorAxis ** 3 / this.mu));
132
+ return (periodSec / 60);
133
+ }
134
+ /**
135
+ * Gets the number of revolutions per day.
136
+ * @returns The number of revolutions per day.
137
+ */
138
+ get revsPerDay() {
139
+ return MINUTES_PER_DAY / this.period;
140
+ }
141
+ /**
142
+ * Converts the equinoctial elements to classical elements.
143
+ * @returns The classical elements.
144
+ */
145
+ toClassicalElements() {
146
+ const a = this.semimajorAxis;
147
+ const e = Math.sqrt(this.k * this.k + this.h * this.h);
148
+ const i = Math.PI * ((1.0 - this.I) * 0.5) + 2.0 * this.I * Math.atan(Math.sqrt(this.p * this.p + this.q * this.q));
149
+ const o = Math.atan2(this.p, this.q);
150
+ const w = Math.atan2(this.h, this.k) - this.I * Math.atan2(this.p, this.q);
151
+ const m = this.lambda - this.I * o - w;
152
+ const v = newtonM(e, m).nu;
153
+ return new ClassicalElements({
154
+ epoch: this.epoch,
155
+ semimajorAxis: a,
156
+ eccentricity: e,
157
+ inclination: i,
158
+ rightAscension: o,
159
+ argPerigee: w,
160
+ trueAnomaly: v,
161
+ mu: this.mu,
162
+ });
163
+ }
164
+ /**
165
+ * Converts the equinoctial elements to position and velocity.
166
+ * @returns The position and velocity in classical elements.
167
+ */
168
+ toPositionVelocity() {
169
+ return this.toClassicalElements().toPositionVelocity();
170
+ }
171
+ }
172
+ //# sourceMappingURL=EquinoctialElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EquinoctialElements.js","sourceRoot":"","sources":["../../src/coordinate/EquinoctialElements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,mBAAmB;IAC9B,KAAK,CAAW;IAChB,sDAAsD;IACtD,CAAC,CAAa;IACd,kDAAkD;IAClD,CAAC,CAAS;IACV,kDAAkD;IAClD,CAAC,CAAS;IACV,oDAAoD;IACpD,CAAC,CAAS;IACV,oDAAoD;IACpD,CAAC,CAAS;IACV,kDAAkD;IAClD,MAAM,CAAU;IAChB,iEAAiE;IACjE,EAAE,CAAS;IACX,8EAA8E;IAC9E,CAAC,CAAS;IACV,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAA6B;QAC5E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,iBAAiB,CAAC;QAClC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAA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,WAAW,EAAE,CAAY;YACzB,EAAE,EAAE,IAAI,CAAC,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,kBAAkB;QAChB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,kBAAkB,EAAE,CAAC;IACzD,CAAC;CACF"}
@@ -0,0 +1,95 @@
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 { StringifiedNumber, TleParams, TleLine1, TleLine2 } from '../main.js';
24
+ /**
25
+ * A class containing static methods for formatting TLEs (Two-Line Elements).
26
+ */
27
+ export declare abstract class FormatTle {
28
+ private constructor();
29
+ /**
30
+ * Creates a TLE (Two-Line Element) string based on the provided TleParams.
31
+ * @param tleParams - The parameters used to generate the TLE.
32
+ * @returns An object containing the TLE strings tle1 and tle2.
33
+ */
34
+ static createTle(tleParams: TleParams): {
35
+ tle1: TleLine1;
36
+ tle2: TleLine2;
37
+ };
38
+ /**
39
+ * Converts the argument of perigee to a stringified number.
40
+ * @param argPe - The argument of perigee to be converted. Can be either a number or a string.
41
+ * @returns The argument of perigee as a stringified number.
42
+ * @throws Error if the length of the argument of perigee is not 8.
43
+ */
44
+ static argumentOfPerigee(argPe: number | string): StringifiedNumber;
45
+ /**
46
+ * Returns the eccentricity value of a given string.
47
+ * @param ecen - The string representing the eccentricity.
48
+ * @returns The eccentricity value.
49
+ * @throws Error if the length of the eccentricity string is not 7.
50
+ */
51
+ static eccentricity(ecen: string): string;
52
+ /**
53
+ * Converts the inclination value to a string representation.
54
+ * @param inc - The inclination value to be converted.
55
+ * @returns The string representation of the inclination value.
56
+ * @throws Error if the length of the converted value is not 8.
57
+ */
58
+ static inclination(inc: number | string): StringifiedNumber;
59
+ /**
60
+ * Converts the mean anomaly to a string representation with 8 digits, padded with leading zeros.
61
+ * @param meana - The mean anomaly to be converted. Can be either a number or a string.
62
+ * @returns The mean anomaly as a string with 8 digits, padded with leading zeros.
63
+ * @throws Error if the length of the mean anomaly is not 8.
64
+ */
65
+ static meanAnomaly(meana: number | string): StringifiedNumber;
66
+ /**
67
+ * Converts the mean motion value to a string representation with 8 decimal
68
+ * places. If the input is a number, it is converted to a string. If the input
69
+ * is already a string, it is parsed as a float and then converted to a string
70
+ * with 8 decimal places. The resulting string is padded with leading zeros to
71
+ * ensure a length of 11 characters. Throws an error if the resulting string
72
+ * does not have a length of 11 characters.
73
+ * @param meanmo - The mean motion value to be converted.
74
+ * @returns The string representation of the mean motion value with 8 decimal
75
+ * places and padded with leading zeros.
76
+ * @throws Error if the resulting string does not have a length of 11
77
+ * characters.
78
+ */
79
+ static meanMotion(meanmo: number | string): StringifiedNumber;
80
+ /**
81
+ * Converts the right ascension value to a stringified number.
82
+ * @param rasc - The right ascension value to convert.
83
+ * @returns The stringified number representation of the right ascension.
84
+ * @throws Error if the length of the converted right ascension is not 8.
85
+ */
86
+ static rightAscension(rasc: number | string): StringifiedNumber;
87
+ /**
88
+ * Sets a character at a specific index in a string. If the index is out of range, the original string is returned.
89
+ * @param str - The input string.
90
+ * @param index - The index at which to set the character.
91
+ * @param chr - The character to set at the specified index.
92
+ * @returns The modified string with the character set at the specified index.
93
+ */
94
+ static setCharAt(str: string, index: number, chr: string): string;
95
+ }
@@ -0,0 +1,184 @@
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 { Tle } from '../main.js';
24
+ /**
25
+ * A class containing static methods for formatting TLEs (Two-Line Elements).
26
+ */
27
+ export class FormatTle {
28
+ constructor() {
29
+ // Static class
30
+ }
31
+ /**
32
+ * Creates a TLE (Two-Line Element) string based on the provided TleParams.
33
+ * @param tleParams - The parameters used to generate the TLE.
34
+ * @returns An object containing the TLE strings tle1 and tle2.
35
+ */
36
+ static createTle(tleParams) {
37
+ const { inc, meanmo, rasc, argPe, meana, ecen, epochyr, epochday, intl } = tleParams;
38
+ const scc = Tle.convert6DigitToA5(tleParams.scc);
39
+ const epochYrStr = epochyr.padStart(2, '0');
40
+ const epochdayStr = parseFloat(epochday).toFixed(8).padStart(12, '0');
41
+ const incStr = FormatTle.inclination(inc);
42
+ const meanmoStr = FormatTle.meanMotion(meanmo);
43
+ const rascStr = FormatTle.rightAscension(rasc);
44
+ const argPeStr = FormatTle.argumentOfPerigee(argPe);
45
+ const meanaStr = FormatTle.meanAnomaly(meana);
46
+ const ecenStr = FormatTle.eccentricity(ecen);
47
+ const intlStr = intl.padEnd(8, ' ');
48
+ // M' and M'' are both set to 0 to put the object in a perfect stable orbit
49
+ let TLE1Ending = tleParams.sat ? tleParams.sat.tle1.substring(32, 71) : ' +.00000000 +00000+0 +00000-0 0 9990';
50
+ // Add explicit positive/negative signs
51
+ TLE1Ending = TLE1Ending[1] === ' ' ? FormatTle.setCharAt(TLE1Ending, 1, '+') : TLE1Ending;
52
+ TLE1Ending = TLE1Ending[12] === ' ' ? FormatTle.setCharAt(TLE1Ending, 12, '+') : TLE1Ending;
53
+ TLE1Ending = TLE1Ending[21] === ' ' ? FormatTle.setCharAt(TLE1Ending, 21, '+') : TLE1Ending;
54
+ TLE1Ending = TLE1Ending[32] === ' ' ? FormatTle.setCharAt(TLE1Ending, 32, '0') : TLE1Ending;
55
+ const tle1 = `1 ${scc}U ${intlStr} ${epochYrStr}${epochdayStr}${TLE1Ending}`;
56
+ const tle2 = `2 ${scc} ${incStr} ${rascStr} ${ecenStr} ${argPeStr} ${meanaStr} ${meanmoStr} 00010`;
57
+ return { tle1: tle1, tle2: tle2 };
58
+ }
59
+ /**
60
+ * Converts the argument of perigee to a stringified number.
61
+ * @param argPe - The argument of perigee to be converted. Can be either a number or a string.
62
+ * @returns The argument of perigee as a stringified number.
63
+ * @throws Error if the length of the argument of perigee is not 8.
64
+ */
65
+ static argumentOfPerigee(argPe) {
66
+ if (typeof argPe === 'number') {
67
+ argPe = argPe.toString();
68
+ }
69
+ const argPeNum = parseFloat(argPe).toFixed(4);
70
+ const argPe0 = argPeNum.padStart(8, '0');
71
+ if (argPe0.length !== 8) {
72
+ throw new Error('argPe length is not 8');
73
+ }
74
+ return argPe0;
75
+ }
76
+ /**
77
+ * Returns the eccentricity value of a given string.
78
+ * @param ecen - The string representing the eccentricity.
79
+ * @returns The eccentricity value.
80
+ * @throws Error if the length of the eccentricity string is not 7.
81
+ */
82
+ static eccentricity(ecen) {
83
+ let ecen0 = ecen.padEnd(9, '0');
84
+ if (ecen0[1] === '.') {
85
+ ecen0 = ecen0.substring(2);
86
+ }
87
+ else {
88
+ ecen0 = ecen0.substring(0, 7);
89
+ }
90
+ if (ecen0.length !== 7) {
91
+ throw new Error('ecen length is not 7');
92
+ }
93
+ return ecen0;
94
+ }
95
+ /**
96
+ * Converts the inclination value to a string representation.
97
+ * @param inc - The inclination value to be converted.
98
+ * @returns The string representation of the inclination value.
99
+ * @throws Error if the length of the converted value is not 8.
100
+ */
101
+ static inclination(inc) {
102
+ if (typeof inc === 'number') {
103
+ inc = inc.toString();
104
+ }
105
+ const incNum = parseFloat(inc).toFixed(4);
106
+ const inc0 = incNum.padStart(8, '0');
107
+ if (inc0.length !== 8) {
108
+ throw new Error('inc length is not 8');
109
+ }
110
+ return inc0;
111
+ }
112
+ /**
113
+ * Converts the mean anomaly to a string representation with 8 digits, padded with leading zeros.
114
+ * @param meana - The mean anomaly to be converted. Can be either a number or a string.
115
+ * @returns The mean anomaly as a string with 8 digits, padded with leading zeros.
116
+ * @throws Error if the length of the mean anomaly is not 8.
117
+ */
118
+ static meanAnomaly(meana) {
119
+ if (typeof meana === 'number') {
120
+ meana = meana.toString();
121
+ }
122
+ const meanaNum = parseFloat(meana).toFixed(4);
123
+ const meana0 = meanaNum.padStart(8, '0');
124
+ if (meana0.length !== 8) {
125
+ throw new Error('meana length is not 8');
126
+ }
127
+ return meana0;
128
+ }
129
+ /**
130
+ * Converts the mean motion value to a string representation with 8 decimal
131
+ * places. If the input is a number, it is converted to a string. If the input
132
+ * is already a string, it is parsed as a float and then converted to a string
133
+ * with 8 decimal places. The resulting string is padded with leading zeros to
134
+ * ensure a length of 11 characters. Throws an error if the resulting string
135
+ * does not have a length of 11 characters.
136
+ * @param meanmo - The mean motion value to be converted.
137
+ * @returns The string representation of the mean motion value with 8 decimal
138
+ * places and padded with leading zeros.
139
+ * @throws Error if the resulting string does not have a length of 11
140
+ * characters.
141
+ */
142
+ static meanMotion(meanmo) {
143
+ if (typeof meanmo === 'number') {
144
+ meanmo = meanmo.toString();
145
+ }
146
+ const meanmoNum = parseFloat(meanmo).toFixed(8);
147
+ const meanmo0 = meanmoNum.padStart(11, '0');
148
+ if (meanmo0.length !== 11) {
149
+ throw new Error('meanmo length is not 11');
150
+ }
151
+ return meanmo0;
152
+ }
153
+ /**
154
+ * Converts the right ascension value to a stringified number.
155
+ * @param rasc - The right ascension value to convert.
156
+ * @returns The stringified number representation of the right ascension.
157
+ * @throws Error if the length of the converted right ascension is not 8.
158
+ */
159
+ static rightAscension(rasc) {
160
+ if (typeof rasc === 'number') {
161
+ rasc = rasc.toString();
162
+ }
163
+ const rascNum = parseFloat(rasc).toFixed(4);
164
+ const rasc0 = rascNum.padStart(8, '0');
165
+ if (rasc0.length !== 8) {
166
+ throw new Error('rasc length is not 8');
167
+ }
168
+ return rasc0;
169
+ }
170
+ /**
171
+ * Sets a character at a specific index in a string. If the index is out of range, the original string is returned.
172
+ * @param str - The input string.
173
+ * @param index - The index at which to set the character.
174
+ * @param chr - The character to set at the specified index.
175
+ * @returns The modified string with the character set at the specified index.
176
+ */
177
+ static setCharAt(str, index, chr) {
178
+ if (index > str.length - 1) {
179
+ return str;
180
+ }
181
+ return `${str.substring(0, index)}${chr}${str.substring(index + 1)}`;
182
+ }
183
+ }
184
+ //# sourceMappingUR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AAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;QAED,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAEvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,KAA0B,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,GAAW,EAAE,KAAa,EAAE,GAAW;QACtD,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;IACvE,CAAC;CACF"}
@@ -0,0 +1,110 @@
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, Degrees, GroundObject, Kilometers, Radians } from '../main.js';
24
+ import { EpochUTC } from '../time/EpochUTC.js';
25
+ import { ITRF } from './ITRF.js';
26
+ /**
27
+ * This Geodetic class represents a geodetic coordinate in three-dimensional
28
+ * space, consisting of latitude, longitude, and altitude. It provides various
29
+ * methods to perform calculations and operations related to geodetic
30
+ * coordinates.
31
+ *
32
+ * This is a class for geodetic coordinates. This is related to the GroundObject
33
+ * class, which is used to represent an object on the surface of the Earth.
34
+ */
35
+ export declare class Geodetic {
36
+ lat: Radians;
37
+ lon: Radians;
38
+ alt: Kilometers;
39
+ constructor(latitude: Radians, longitude: Radians, altitude: Kilometers);
40
+ /**
41
+ * Creates a Geodetic object from latitude, longitude, and altitude values in
42
+ * degrees.
43
+ * @param latitude The latitude value in degrees.
44
+ * @param longitude The longitude value in degrees.
45
+ * @param altitude The altitude value in kilometers.
46
+ * @returns A Geodetic object representing the specified latitude, longitude,
47
+ * and altitude.
48
+ */
49
+ static fromDegrees(latitude: Degrees, longitude: Degrees, altitude: Kilometers): Geodetic;
50
+ /**
51
+ * Returns a string representation of the Geodetic object.
52
+ * @returns A string containing the latitude, longitude, and altitude of the Geodetic object.
53
+ */
54
+ toString(): string;
55
+ /**
56
+ * Gets the latitude in degrees.
57
+ * @returns The latitude in degrees.
58
+ */
59
+ get latDeg(): number;
60
+ /**
61
+ * Gets the longitude in degrees.
62
+ * @returns The longitude in degrees.
63
+ */
64
+ get lonDeg(): number;
65
+ /**
66
+ * Converts the geodetic coordinates to a ground position.
67
+ * @returns The ground position object.
68
+ */
69
+ toGroundObject(): GroundObject;
70
+ /**
71
+ * Converts the geodetic coordinates to the International Terrestrial
72
+ * Reference Frame (ITRF) coordinates.
73
+ * @param epoch The epoch in UTC.
74
+ * @returns The ITRF coordinates.
75
+ */
76
+ toITRF(epoch: EpochUTC): ITRF;
77
+ /**
78
+ * Calculates the angle between two geodetic coordinates.
79
+ * @param g The geodetic coordinate to calculate the angle to.
80
+ * @param method The method to use for calculating the angular distance (optional, default is Haversine).
81
+ * @returns The angle between the two geodetic coordinates in radians.
82
+ */
83
+ angle(g: Geodetic, method?: AngularDistanceMethod): Radians;
84
+ /**
85
+ * Calculates the angle in degrees between two Geodetic coordinates.
86
+ * @param g The Geodetic coordinate to calculate the angle with.
87
+ * @param method The method to use for calculating the angular distance (optional, default is Haversine).
88
+ * @returns The angle in degrees.
89
+ */
90
+ angleDeg(g: Geodetic, method?: AngularDistanceMethod): Degrees;
91
+ /**
92
+ * Calculates the distance between two geodetic coordinates.
93
+ * @param g The geodetic coordinates to calculate the distance to.
94
+ * @param method The method to use for calculating the angular distance. Default is Haversine.
95
+ * @returns The distance between the two geodetic coordinates in kilometers.
96
+ */
97
+ distance(g: Geodetic, method?: AngularDistanceMethod): Kilometers;
98
+ /**
99
+ * Calculates the field of view based on the altitude of the Geodetic object.
100
+ * @returns The field of view in radians.
101
+ */
102
+ fieldOfView(): Radians;
103
+ /**
104
+ * Determines if the current geodetic coordinate can see another geodetic coordinate.
105
+ * @param g The geodetic coordinate to check for visibility.
106
+ * @param method The method to use for calculating the angular distance (optional, default is Haversine).
107
+ * @returns A boolean indicating if the current coordinate can see the other coordinate.
108
+ */
109
+ isInView(g: Geodetic, method?: AngularDistanceMethod): boolean;
110
+ }