ootk 3.0.0 → 4.0.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/CHANGELOG.md +235 -10
  2. package/README.md +27 -40
  3. package/dist/coordinate/Hill.d.ts +49 -0
  4. package/dist/coordinate/Hill.js +222 -0
  5. package/dist/coordinate/Hill.js.map +1 -0
  6. package/dist/coordinate/index.d.ts +1 -0
  7. package/dist/coordinate/index.js +2 -0
  8. package/dist/coordinate/index.js.map +1 -0
  9. package/dist/covariance/CovarianceSample.d.ts +43 -0
  10. package/dist/covariance/CovarianceSample.js +147 -0
  11. package/dist/covariance/CovarianceSample.js.map +1 -0
  12. package/dist/covariance/StateCovariance.d.ts +42 -0
  13. package/dist/covariance/StateCovariance.js +65 -0
  14. package/dist/covariance/StateCovariance.js.map +1 -0
  15. package/dist/force/AtmosphericDrag.d.ts +31 -0
  16. package/dist/force/AtmosphericDrag.js +73 -0
  17. package/dist/force/AtmosphericDrag.js.map +1 -0
  18. package/dist/force/EarthGravity.d.ts +27 -0
  19. package/dist/force/EarthGravity.js +117 -0
  20. package/dist/force/EarthGravity.js.map +1 -0
  21. package/{lib/ootk.d.ts → dist/force/Force.d.ts} +12 -11
  22. package/dist/force/Force.js +31 -0
  23. package/dist/force/Force.js.map +1 -0
  24. package/dist/force/ForceModel.d.ts +37 -0
  25. package/dist/force/ForceModel.js +75 -0
  26. package/dist/force/ForceModel.js.map +1 -0
  27. package/dist/force/Gravity.d.ts +38 -0
  28. package/dist/force/Gravity.js +47 -0
  29. package/dist/force/Gravity.js.map +1 -0
  30. package/dist/{ootk.d.ts → force/SolarRadiationPressure.d.ts} +12 -11
  31. package/dist/force/SolarRadiationPressure.js +44 -0
  32. package/dist/force/SolarRadiationPressure.js.map +1 -0
  33. package/dist/force/ThirdBodyGravity.d.ts +26 -0
  34. package/dist/force/ThirdBodyGravity.js +57 -0
  35. package/dist/force/ThirdBodyGravity.js.map +1 -0
  36. package/dist/force/Thrust.d.ts +34 -0
  37. package/dist/force/Thrust.js +58 -0
  38. package/dist/force/Thrust.js.map +1 -0
  39. package/dist/interfaces/RfSensorParams.d.ts +28 -0
  40. package/dist/interfaces/RfSensorParams.js +24 -0
  41. package/dist/interfaces/RfSensorParams.js.map +1 -0
  42. package/dist/interfaces/index.d.ts +1 -0
  43. package/dist/interfaces/index.js +2 -0
  44. package/dist/interfaces/index.js.map +1 -0
  45. package/dist/interpolator/ChebyshevCoefficients.d.ts +50 -0
  46. package/dist/interpolator/ChebyshevCoefficients.js +94 -0
  47. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
  48. package/dist/interpolator/ChebyshevInterpolator.d.ts +38 -0
  49. package/dist/interpolator/ChebyshevInterpolator.js +71 -0
  50. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
  51. package/dist/interpolator/CubicSpline.d.ts +35 -0
  52. package/dist/interpolator/CubicSpline.js +69 -0
  53. package/dist/interpolator/CubicSpline.js.map +1 -0
  54. package/dist/interpolator/CubicSplineInterpolator.d.ts +36 -0
  55. package/dist/interpolator/CubicSplineInterpolator.js +80 -0
  56. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
  57. package/dist/interpolator/FieldInterpolator.d.ts +28 -0
  58. package/dist/interpolator/FieldInterpolator.js +34 -0
  59. package/dist/interpolator/FieldInterpolator.js.map +1 -0
  60. package/dist/interpolator/Interpolator.d.ts +22 -0
  61. package/dist/interpolator/Interpolator.js +47 -0
  62. package/dist/interpolator/Interpolator.js.map +1 -0
  63. package/dist/interpolator/LagrangeInterpolator.d.ts +40 -0
  64. package/dist/interpolator/LagrangeInterpolator.js +159 -0
  65. package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
  66. package/dist/interpolator/StateInterpolator.d.ts +27 -0
  67. package/dist/interpolator/StateInterpolator.js +35 -0
  68. package/dist/interpolator/StateInterpolator.js.map +1 -0
  69. package/dist/interpolator/VerletBlendInterpolator.d.ts +43 -0
  70. package/dist/interpolator/VerletBlendInterpolator.js +118 -0
  71. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
  72. package/{lib/ootk.js → dist/main.d.ts} +13 -10
  73. package/dist/{objects/space-object.d.ts → main.js} +17 -23
  74. package/dist/main.js.map +1 -0
  75. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +41 -0
  76. package/dist/maneuver/TwoBurnOrbitTransfer.js +65 -0
  77. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  78. package/dist/maneuver/Waypoint.d.ts +91 -0
  79. package/dist/maneuver/Waypoint.js +179 -0
  80. package/dist/maneuver/Waypoint.js.map +1 -0
  81. package/{lib/objects/detailed-sat.d.ts → dist/objects/DetailedSatellite.d.ts} +40 -36
  82. package/dist/objects/DetailedSatellite.js +136 -0
  83. package/dist/objects/DetailedSatellite.js.map +1 -0
  84. package/dist/objects/DetailedSensor.d.ts +42 -0
  85. package/dist/objects/DetailedSensor.js +65 -0
  86. package/dist/objects/DetailedSensor.js.map +1 -0
  87. package/dist/objects/LandObject.d.ts +33 -0
  88. package/dist/objects/LandObject.js +34 -0
  89. package/dist/objects/LandObject.js.map +1 -0
  90. package/dist/objects/Marker.d.ts +20 -0
  91. package/dist/objects/Marker.js +24 -0
  92. package/dist/objects/Marker.js.map +1 -0
  93. package/dist/objects/RfSensor.d.ts +41 -0
  94. package/dist/objects/RfSensor.js +67 -0
  95. package/dist/objects/RfSensor.js.map +1 -0
  96. package/dist/objects/index.d.ts +5 -4
  97. package/dist/objects/index.js +6 -0
  98. package/dist/objects/index.js.map +1 -0
  99. package/dist/observation/Observation.d.ts +89 -0
  100. package/dist/observation/Observation.js +102 -0
  101. package/dist/observation/Observation.js.map +1 -0
  102. package/dist/observation/ObservationOptical.d.ts +48 -0
  103. package/dist/observation/ObservationOptical.js +105 -0
  104. package/dist/observation/ObservationOptical.js.map +1 -0
  105. package/dist/observation/ObservationRadar.d.ts +46 -0
  106. package/dist/observation/ObservationRadar.js +96 -0
  107. package/dist/observation/ObservationRadar.js.map +1 -0
  108. package/dist/observation/ObservationUtils.d.ts +20 -0
  109. package/dist/observation/ObservationUtils.js +32 -0
  110. package/dist/observation/ObservationUtils.js.map +1 -0
  111. package/dist/observation/PropagatorPairs.d.ts +32 -0
  112. package/dist/observation/PropagatorPairs.js +43 -0
  113. package/dist/observation/PropagatorPairs.js.map +1 -0
  114. package/dist/operations/BoxMuller.d.ts +46 -0
  115. package/dist/operations/BoxMuller.js +77 -0
  116. package/dist/operations/BoxMuller.js.map +1 -0
  117. package/dist/operations/EulerAngles.d.ts +105 -0
  118. package/dist/operations/EulerAngles.js +161 -0
  119. package/dist/operations/EulerAngles.js.map +1 -0
  120. package/dist/operations/Quaternion.d.ts +56 -0
  121. package/dist/operations/Quaternion.js +167 -0
  122. package/dist/operations/Quaternion.js.map +1 -0
  123. package/dist/operations/RandomGaussianSource.d.ts +24 -0
  124. package/dist/operations/RandomGaussianSource.js +43 -0
  125. package/dist/operations/RandomGaussianSource.js.map +1 -0
  126. package/dist/operations/index.d.ts +4 -0
  127. package/dist/operations/index.js +5 -0
  128. package/dist/operations/index.js.map +1 -0
  129. package/dist/optimize/ChebyshevCompressor.d.ts +32 -0
  130. package/dist/optimize/ChebyshevCompressor.js +83 -0
  131. package/dist/optimize/ChebyshevCompressor.js.map +1 -0
  132. package/dist/optimize/DownhillSimplex.d.ts +64 -0
  133. package/dist/optimize/DownhillSimplex.js +182 -0
  134. package/dist/optimize/DownhillSimplex.js.map +1 -0
  135. package/dist/optimize/GoldenSection.d.ts +39 -0
  136. package/dist/optimize/GoldenSection.js +55 -0
  137. package/dist/optimize/GoldenSection.js.map +1 -0
  138. package/dist/optimize/PolynomialRegression.d.ts +49 -0
  139. package/dist/optimize/PolynomialRegression.js +83 -0
  140. package/dist/optimize/PolynomialRegression.js.map +1 -0
  141. package/dist/optimize/PolynomicalRegressionResult.d.ts +31 -0
  142. package/dist/optimize/PolynomicalRegressionResult.js +38 -0
  143. package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
  144. package/dist/optimize/SimpleLinearRegression.d.ts +44 -0
  145. package/dist/optimize/SimpleLinearRegression.js +112 -0
  146. package/dist/optimize/SimpleLinearRegression.js.map +1 -0
  147. package/dist/optimize/SimplexEntry.d.ts +32 -0
  148. package/dist/optimize/SimplexEntry.js +42 -0
  149. package/dist/optimize/SimplexEntry.js.map +1 -0
  150. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +65 -0
  151. package/dist/orbit_determination/BatchLeastSquaresOD.js +143 -0
  152. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  153. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +31 -0
  154. package/{lib/objects/space-object.d.ts → dist/orbit_determination/BatchLeastSquaresResult.js} +21 -23
  155. package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  156. package/dist/orbit_determination/GibbsIOD.d.ts +38 -0
  157. package/dist/orbit_determination/GibbsIOD.js +76 -0
  158. package/dist/orbit_determination/GibbsIOD.js.map +1 -0
  159. package/dist/orbit_determination/GoodingIOD.d.ts +51 -0
  160. package/dist/orbit_determination/GoodingIOD.js +247 -0
  161. package/dist/orbit_determination/GoodingIOD.js.map +1 -0
  162. package/dist/orbit_determination/HerrickGibbsIOD.d.ts +33 -0
  163. package/dist/orbit_determination/HerrickGibbsIOD.js +50 -0
  164. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  165. package/dist/orbit_determination/LambertIOD.d.ts +59 -0
  166. package/dist/orbit_determination/LambertIOD.js +213 -0
  167. package/dist/orbit_determination/LambertIOD.js.map +1 -0
  168. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +40 -0
  169. package/dist/orbit_determination/ModifiedGoodingIOD.js +83 -0
  170. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  171. package/dist/propagator/DormandPrince54Propagator.d.ts +28 -0
  172. package/dist/propagator/DormandPrince54Propagator.js +64 -0
  173. package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
  174. package/dist/propagator/KeplerPropagator.d.ts +35 -0
  175. package/dist/propagator/KeplerPropagator.js +84 -0
  176. package/dist/propagator/KeplerPropagator.js.map +1 -0
  177. package/dist/propagator/Propagator.d.ts +34 -0
  178. package/dist/propagator/Propagator.js +162 -0
  179. package/dist/propagator/Propagator.js.map +1 -0
  180. package/dist/propagator/RkCheckpoint.d.ts +22 -0
  181. package/dist/propagator/RkCheckpoint.js +27 -0
  182. package/dist/propagator/RkCheckpoint.js.map +1 -0
  183. package/dist/propagator/RkResult.d.ts +23 -0
  184. package/dist/propagator/RkResult.js +30 -0
  185. package/dist/propagator/RkResult.js.map +1 -0
  186. package/dist/propagator/RungeKutta4Propagator.d.ts +50 -0
  187. package/dist/propagator/RungeKutta4Propagator.js +141 -0
  188. package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
  189. package/dist/propagator/RungeKutta89Propagator.d.ts +28 -0
  190. package/dist/propagator/RungeKutta89Propagator.js +126 -0
  191. package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
  192. package/dist/propagator/RungeKuttaAdaptive.d.ts +54 -0
  193. package/dist/propagator/RungeKuttaAdaptive.js +159 -0
  194. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
  195. package/dist/propagator/Sgp4Propagator.d.ts +34 -0
  196. package/dist/propagator/Sgp4Propagator.js +56 -0
  197. package/dist/propagator/Sgp4Propagator.js.map +1 -0
  198. package/dist/smoothing/ExponentialSmoothing.d.ts +23 -0
  199. package/dist/smoothing/ExponentialSmoothing.js +81 -0
  200. package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
  201. package/dist/transforms/index.d.ts +1 -0
  202. package/dist/transforms/index.js +2 -0
  203. package/dist/transforms/index.js.map +1 -0
  204. package/dist/transforms/transforms.d.ts +56 -92
  205. package/dist/transforms/transforms.js +94 -0
  206. package/dist/transforms/transforms.js.map +1 -0
  207. package/dist/types/types.d.ts +105 -584
  208. package/dist/types/types.js +23 -0
  209. package/dist/types/types.js.map +1 -0
  210. package/dist/utils/index.d.ts +1 -0
  211. package/dist/utils/index.js +2 -0
  212. package/dist/utils/index.js.map +1 -0
  213. package/dist/utils/jacobian.d.ts +11 -0
  214. package/dist/utils/jacobian.js +29 -0
  215. package/dist/utils/jacobian.js.map +1 -0
  216. package/package.json +34 -42
  217. package/src/coordinate/Hill.ts +326 -0
  218. package/src/coordinate/index.ts +1 -0
  219. package/src/covariance/CovarianceSample.ts +194 -0
  220. package/src/covariance/StateCovariance.ts +69 -0
  221. package/src/force/AtmosphericDrag.ts +101 -0
  222. package/src/force/EarthGravity.ts +157 -0
  223. package/src/force/Force.ts +33 -0
  224. package/src/force/ForceModel.ts +91 -0
  225. package/src/force/Gravity.ts +53 -0
  226. package/src/force/SolarRadiationPressure.ts +42 -0
  227. package/src/force/ThirdBodyGravity.ts +62 -0
  228. package/src/force/Thrust.ts +83 -0
  229. package/src/interfaces/RfSensorParams.ts +30 -0
  230. package/src/interfaces/index.ts +1 -0
  231. package/src/interpolator/ChebyshevCoefficients.ts +109 -0
  232. package/src/interpolator/ChebyshevInterpolator.ts +87 -0
  233. package/src/interpolator/CubicSpline.ts +72 -0
  234. package/src/interpolator/CubicSplineInterpolator.ts +90 -0
  235. package/src/interpolator/FieldInterpolator.ts +37 -0
  236. package/src/interpolator/Interpolator.ts +56 -0
  237. package/src/interpolator/LagrangeInterpolator.ts +192 -0
  238. package/src/interpolator/StateInterpolator.ts +39 -0
  239. package/src/interpolator/VerletBlendInterpolator.ts +146 -0
  240. package/src/main.ts +32 -0
  241. package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
  242. package/src/maneuver/Waypoint.ts +267 -0
  243. package/src/objects/DetailedSatellite.ts +159 -0
  244. package/src/objects/DetailedSensor.ts +68 -0
  245. package/src/objects/LandObject.ts +46 -0
  246. package/src/objects/Marker.ts +25 -0
  247. package/src/objects/RfSensor.ts +78 -0
  248. package/src/objects/index.ts +5 -0
  249. package/src/observation/Observation.ts +125 -0
  250. package/src/observation/ObservationOptical.ts +146 -0
  251. package/src/observation/ObservationRadar.ts +131 -0
  252. package/src/observation/ObservationUtils.ts +40 -0
  253. package/src/observation/PropagatorPairs.ts +45 -0
  254. package/src/operations/BoxMuller.ts +87 -0
  255. package/src/operations/EulerAngles.ts +183 -0
  256. package/src/operations/Quaternion.ts +222 -0
  257. package/src/operations/RandomGaussianSource.ts +51 -0
  258. package/src/operations/index.ts +4 -0
  259. package/src/optimize/ChebyshevCompressor.ts +96 -0
  260. package/src/optimize/DownhillSimplex.ts +212 -0
  261. package/src/optimize/GoldenSection.ts +71 -0
  262. package/src/optimize/PolynomialRegression.ts +109 -0
  263. package/src/optimize/PolynomicalRegressionResult.ts +32 -0
  264. package/src/optimize/SimpleLinearRegression.ts +127 -0
  265. package/src/optimize/SimplexEntry.ts +50 -0
  266. package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
  267. package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
  268. package/src/orbit_determination/GibbsIOD.ts +95 -0
  269. package/src/orbit_determination/GoodingIOD.ts +380 -0
  270. package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
  271. package/src/orbit_determination/LambertIOD.ts +260 -0
  272. package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
  273. package/src/propagator/DormandPrince54Propagator.ts +73 -0
  274. package/src/propagator/KeplerPropagator.ts +102 -0
  275. package/src/propagator/Propagator.ts +253 -0
  276. package/src/propagator/RkCheckpoint.ts +25 -0
  277. package/src/propagator/RkResult.ts +26 -0
  278. package/src/propagator/RungeKutta4Propagator.ts +179 -0
  279. package/src/propagator/RungeKutta89Propagator.ts +132 -0
  280. package/src/propagator/RungeKuttaAdaptive.ts +232 -0
  281. package/src/propagator/Sgp4Propagator.ts +71 -0
  282. package/src/smoothing/ExponentialSmoothing.ts +90 -0
  283. package/src/transforms/index.ts +1 -0
  284. package/src/transforms/transforms.ts +117 -0
  285. package/src/types/types.ts +135 -0
  286. package/src/utils/index.ts +1 -0
  287. package/src/utils/jacobian.ts +38 -0
  288. package/.eslintrc.json +0 -244
  289. package/.prettierrc +0 -17
  290. package/babel.config.js +0 -16
  291. package/codecov.yml +0 -21
  292. package/dist/objects/base-object.d.ts +0 -40
  293. package/dist/objects/detailed-sat.d.ts +0 -66
  294. package/dist/objects/sat.d.ts +0 -92
  295. package/dist/objects/sensor.d.ts +0 -93
  296. package/dist/objects/star.d.ts +0 -46
  297. package/dist/ootk.js +0 -2
  298. package/dist/ootk.js.LICENSE.txt +0 -77
  299. package/dist/sgp4/sgp4.d.ts +0 -82
  300. package/dist/tle/tle-format-data.d.ts +0 -6
  301. package/dist/tle/tle.d.ts +0 -375
  302. package/dist/utils/constants.d.ts +0 -34
  303. package/dist/utils/moon-math.d.ts +0 -113
  304. package/dist/utils/sun-math.d.ts +0 -230
  305. package/dist/utils/utils.d.ts +0 -39
  306. package/jest.config.ts +0 -30
  307. package/lib/objects/base-object.d.ts +0 -40
  308. package/lib/objects/base-object.js +0 -79
  309. package/lib/objects/base-object.js.map +0 -1
  310. package/lib/objects/detailed-sat.js +0 -149
  311. package/lib/objects/detailed-sat.js.map +0 -1
  312. package/lib/objects/index.d.ts +0 -4
  313. package/lib/objects/index.js +0 -5
  314. package/lib/objects/index.js.map +0 -1
  315. package/lib/objects/sat.d.ts +0 -92
  316. package/lib/objects/sat.js +0 -188
  317. package/lib/objects/sat.js.map +0 -1
  318. package/lib/objects/sensor.d.ts +0 -93
  319. package/lib/objects/sensor.js +0 -273
  320. package/lib/objects/sensor.js.map +0 -1
  321. package/lib/objects/space-object.js +0 -60
  322. package/lib/objects/space-object.js.map +0 -1
  323. package/lib/objects/star.d.ts +0 -46
  324. package/lib/objects/star.js +0 -91
  325. package/lib/objects/star.js.map +0 -1
  326. package/lib/ootk.js.map +0 -1
  327. package/lib/sgp4/sgp4.d.ts +0 -82
  328. package/lib/sgp4/sgp4.js +0 -3262
  329. package/lib/sgp4/sgp4.js.map +0 -1
  330. package/lib/tle/tle-format-data.d.ts +0 -6
  331. package/lib/tle/tle-format-data.js +0 -10
  332. package/lib/tle/tle-format-data.js.map +0 -1
  333. package/lib/tle/tle.d.ts +0 -375
  334. package/lib/tle/tle.js +0 -611
  335. package/lib/tle/tle.js.map +0 -1
  336. package/lib/transforms/transforms.d.ts +0 -94
  337. package/lib/transforms/transforms.js +0 -308
  338. package/lib/transforms/transforms.js.map +0 -1
  339. package/lib/types/types.d.ts +0 -605
  340. package/lib/types/types.js +0 -36
  341. package/lib/types/types.js.map +0 -1
  342. package/lib/utils/constants.d.ts +0 -34
  343. package/lib/utils/constants.js +0 -35
  344. package/lib/utils/constants.js.map +0 -1
  345. package/lib/utils/moon-math.d.ts +0 -113
  346. package/lib/utils/moon-math.js +0 -387
  347. package/lib/utils/moon-math.js.map +0 -1
  348. package/lib/utils/sun-math.d.ts +0 -230
  349. package/lib/utils/sun-math.js +0 -422
  350. package/lib/utils/sun-math.js.map +0 -1
  351. package/lib/utils/utils.d.ts +0 -39
  352. package/lib/utils/utils.js +0 -102
  353. package/lib/utils/utils.js.map +0 -1
  354. package/sandbox.html +0 -8
  355. package/tsconfig.base.json +0 -31
  356. package/tsconfig.build.json +0 -14
  357. /package/{LICENSE.MD → LICENSE.md} +0 -0
package/dist/tle/tle.d.ts DELETED
@@ -1,375 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file The TLE module contains a collection of functions for working with TLEs.
7
- *
8
- * @license AGPL-3.0-or-later
9
- * @Copyright (c) 2020-2023 Theodore Kruczek
10
- *
11
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
- * terms of the GNU Affero General Public License as published by the Free Software
13
- * Foundation, either version 3 of the License, or (at your option) any later version.
14
- *
15
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
- * See the GNU Affero General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public License along with
20
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import { Line1Data, Line2Data, TleLine1, TleLine2 } from '../types/types';
23
- import { TleFormatData } from './tle-format-data';
24
- type TleData = {
25
- satNum: number;
26
- intlDes: string;
27
- epochYear: number;
28
- epochDay: number;
29
- meanMoDev1: number;
30
- meanMoDev2: number;
31
- bstar: number;
32
- inclination: number;
33
- raan: number;
34
- eccentricity: number;
35
- argOfPerigee: number;
36
- meanAnomaly: number;
37
- meanMotion: number;
38
- };
39
- type TleDataFull = Line1Data & Line2Data;
40
- export declare class Tle {
41
- static readonly lineNumber: TleFormatData;
42
- static readonly satNum: TleFormatData;
43
- static readonly classification: TleFormatData;
44
- static readonly intlDes: TleFormatData;
45
- static readonly intlDesYear: TleFormatData;
46
- static readonly intlDesLaunchNum: TleFormatData;
47
- static readonly intlDesLaunchPiece: TleFormatData;
48
- static readonly epochYear: TleFormatData;
49
- static readonly epochDay: TleFormatData;
50
- static readonly meanMoDev1: TleFormatData;
51
- static readonly meanMoDev2: TleFormatData;
52
- static readonly bstar: TleFormatData;
53
- static readonly ephemerisType: TleFormatData;
54
- static readonly elsetNum: TleFormatData;
55
- static readonly checksum: TleFormatData;
56
- static readonly inclination: TleFormatData;
57
- static readonly raan: TleFormatData;
58
- static readonly eccentricity: TleFormatData;
59
- static readonly argPerigee: TleFormatData;
60
- static readonly meanAnom: TleFormatData;
61
- static readonly meanMo: TleFormatData;
62
- static readonly revNum: TleFormatData;
63
- /**
64
- * Parses the TLE into orbital data.
65
- *
66
- * If you want all of the data then use parseTleFull instead.
67
- * @param {TleLine1} tleLine1 TLE line 1
68
- * @param {TleLine2} tleLine2 TLE line 2
69
- * @returns {TleData} Returns most commonly used orbital data from TLE
70
- */
71
- static parseTle(tleLine1: TleLine1, tleLine2: TleLine2): TleData;
72
- /**
73
- * Parses all of the data contained in the TLE.
74
- *
75
- * If you only want the most commonly used data then use parseTle instead.
76
- * @param {TleLine1} tleLine1 The first line of the TLE to parse.
77
- * @param {TleLine2} tleLine2 The second line of the TLE to parse.
78
- * @returns {TleDataFull} Returns all of the data from the TLE.
79
- */
80
- static parseTleFull(tleLine1: TleLine1, tleLine2: TleLine2): TleDataFull;
81
- /**
82
- * Parse the first line of the TLE.
83
- * @param {TleLine1} tleLine1 The first line of the TLE to parse.
84
- * @returns {Line1Data} Returns the data from the first line of the TLE.
85
- */
86
- static parseLine1(tleLine1: TleLine1): Line1Data;
87
- /**
88
- * Parse the second line of the TLE.
89
- * @param {TleLine2} tleLine2 The second line of the TLE to parse.
90
- * @returns {Line2Data} Returns the data from the second line of the TLE.
91
- */
92
- static parseLine2(tleLine2: TleLine2): Line2Data;
93
- /**
94
- * This should always return a 1 or a 2.
95
- * @param {string} tleLine The first line of the TLE to parse.
96
- * @returns {number} The line number of the TLE.
97
- */
98
- static getLineNumber(tleLine: TleLine1 | TleLine2): 1 | 2;
99
- /**
100
- * See https://en.wikipedia.org/wiki/Satellite_Catalog_Number
101
- *
102
- * Range: 0 to 99999 or 26999.
103
- *
104
- * NOTE: To support Alpha-5, the first digit can be a letter.
105
- * This will be converted to a number in order to expand the range to 26999.
106
- *
107
- * Example: 25544 or B1234 (e.g. Sputnik's rocket body was number 00001)
108
- *
109
- * @param {string} tleLine The first line of the TLE to parse.
110
- * @returns {number} NORAD catalog number.
111
- */
112
- static getSatNum(tleLine: TleLine1 | TleLine2): number;
113
- /**
114
- * See https://en.wikipedia.org/wiki/Satellite_Catalog_Number
115
- *
116
- * Range: 0 to 99999 or 26999.
117
- *
118
- * NOTE: To support Alpha-5, the first digit can be a letter.
119
- * This will NOT be converted to a number. Use getSatNum() for that.
120
- *
121
- * Example: 25544 or B1234 (e.g. Sputnik's rocket body was number 00001)
122
- *
123
- * @param {string} tleLine The first line of the TLE to parse.
124
- * @returns {string} NORAD catalog number.
125
- */
126
- static getRawSatNum(tleLine: TleLine1 | TleLine2): string;
127
- /**
128
- * Satellite classification.
129
- * * 'U' = unclassified
130
- * * 'C' = confidential
131
- * * 'S' = secret
132
- *
133
- * Example: 'U'
134
- * @param {string} tleLine1 The first line of the TLE to parse.
135
- * @returns {string} The classification.
136
- */
137
- static getClassification(tleLine1: TleLine1): string;
138
- /**
139
- * International Designator (COSPAR ID)
140
- * See https://en.wikipedia.org/wiki/International_Designator
141
- * @param {string} tleLine1 The first line of the TLE to parse.
142
- * @returns {string} The International Designator.
143
- */
144
- static getIntlDes(tleLine1: TleLine1): string;
145
- /**
146
- * International Designator (COSPAR ID): Last 2 digits of launch year.
147
- *
148
- * Range: 00 to 99
149
- *
150
- * Example: 98
151
- *
152
- * @param {string} tleLine1 The first line of the TLE to parse.
153
- * @returns {number} The year of the International Designator.
154
- */
155
- static getIntlDesYear(tleLine1: TleLine1): number;
156
- /**
157
- * International Designator (COSPAR ID): Launch number of the year.
158
- *
159
- * Range: 1 to 999
160
- *
161
- * Example: 67
162
- *
163
- * @param {string} tleLine1 The first line of the TLE to parse.
164
- * @returns {number} The launch number of the International Designator.
165
- */
166
- static getIntlDesLaunchNum(tleLine1: string): number;
167
- /**
168
- * International Designator (COSPAR ID): Piece of the launch.
169
- *
170
- * Range: A to ZZZ
171
- *
172
- * Example: 'A'
173
- *
174
- * @param {string} tleLine1 The first line of the TLE to parse.
175
- * @returns {string} The launch piece of the International Designator.
176
- */
177
- static getIntlDesLaunchPiece(tleLine1: TleLine1): string;
178
- /**
179
- * Year when the TLE was generated (TLE epoch), last two digits.
180
- *
181
- * Range: 00 to 99
182
- *
183
- * Example: 17
184
- *
185
- * @param {string} tleLine1 The first line of the TLE to parse.
186
- * @returns {number} The year the TLE was generated.
187
- */
188
- static getEpochYear(tleLine1: TleLine1): number;
189
- /**
190
- * Year when the TLE was generated (TLE epoch), four digits.
191
- *
192
- * Range: 1957 to 2056
193
- *
194
- * Example: 2008
195
- *
196
- * @param {string} tleLine1 The first line of the TLE to parse.
197
- * @returns {number} The year the TLE was generated.
198
- */
199
- static getEpochYearFull(tleLine1: TleLine1): number;
200
- /**
201
- * Fractional day of the year when the TLE was generated (TLE epoch).
202
- *
203
- * Range: 1 to 365.99999999
204
- *
205
- * Example: 206.18396726
206
- *
207
- * @param {string} tleLine1 The first line of the TLE to parse.
208
- * @returns {number} The day of the year the TLE was generated.
209
- */
210
- static getEpochDay(tleLine1: string): number;
211
- /**
212
- * First Time Derivative of the Mean Motion divided by two. Defines how mean motion changes
213
- * over time, so TLE propagators can still be used to make reasonable guesses when
214
- * times are distant from the original TLE epoch.
215
- *
216
- * Units: Orbits / day ^ 2
217
- *
218
- * Example: 0.00001961
219
- *
220
- * @param {string} tleLine1 The first line of the TLE to parse.
221
- * @returns {number} The first derivative of the mean motion.
222
- */
223
- static getMeanMoDev1(tleLine1: TleLine1): number;
224
- /**
225
- * Second Time Derivative of Mean Motion divided by six (decimal point assumed). Measures rate
226
- * of change in the Mean Motion Dot so software can make reasonable guesses when times are
227
- * distant from the original TLE epoch.
228
- *
229
- * Usually zero, unless the satellite is manuevering or in a decaying orbit.
230
- *
231
- * Units: Orbits / day ^ 3.
232
- *
233
- * Example: 0 ('00000-0' in the original TLE [= 0.00000 * 10 ^ 0])
234
- *
235
- * @param {string} tleLine1 The first line of the TLE to parse.
236
- * @returns {number} The second derivative of the mean motion.
237
- */
238
- static getMeanMoDev2(tleLine1: string): number;
239
- /**
240
- * BSTAR drag term (decimal point assumed). Estimates the effects of
241
- * atmospheric drag on the satellite's motion.
242
- *
243
- * Units: EarthRadii ^ -1
244
- *
245
- * Example: 0.000036771 ('36771-4' in the original TLE [= 0.36771 * 10 ^ -4])
246
- *
247
- * @param {string} tleLine1 The first line of the TLE to parse.
248
- * @returns {number} The drag coefficient.
249
- */
250
- static getBstar(tleLine1: TleLine1): number;
251
- /**
252
- * Private value - used by United States Space Force to reference the orbit model used to
253
- * generate the TLE. Will always be seen as zero externally (e.g. by "us", unless you are
254
- * "them" - in which case, hello!).
255
- *
256
- * Example: 0
257
- *
258
- * @param {string} tleLine1 The first line of the TLE to parse.
259
- * @returns {number} The ephemeris type.
260
- */
261
- static getEphemerisType(tleLine1: TleLine1): number;
262
- /**
263
- * TLE element set number, incremented for each new TLE generated. 999 seems to mean the TLE
264
- * has maxed out.
265
- *
266
- * Range: Technically 1 to 9999, though in practice the maximum number seems to be 999.
267
- *
268
- * Example: 999
269
- * @param {string} tleLine1 The first line of the TLE to parse.
270
- * @returns {number} The element number.
271
- */
272
- static getElsetNum(tleLine1: TleLine1): number;
273
- /**
274
- * TLE line 1 checksum (modulo 10), for verifying the integrity of this line of the TLE.
275
- *
276
- * Range: 0 to 9
277
- * Example: 3
278
- *
279
- * @param {string} tleLine The first line of the TLE to parse.
280
- * @returns {number} The checksum value.
281
- */
282
- static getChecksum(tleLine: TleLine1 | TleLine2): number;
283
- /**
284
- * Inclination relative to the Earth's equatorial plane in degrees. 0 to 90 degrees is a
285
- * prograde orbit and 90 to 180 degrees is a retrograde orbit.
286
- *
287
- * Units: degrees
288
- *
289
- * Range: 0 to 180
290
- *
291
- * Example: 51.6400
292
- *
293
- * @param {string} tleLine2 The second line of the TLE to parse.
294
- * @returns {number} The inclination of the satellite.
295
- */
296
- static getInclination(tleLine2: TleLine2): number;
297
- /**
298
- * Right ascension of the ascending node in degrees. Essentially, this is the angle of the
299
- * satellite as it crosses northward (ascending) across the Earth's equator (equatorial
300
- * plane).
301
- *
302
- * Units: degrees
303
- *
304
- * Range: 0 to 359.9999
305
- *
306
- * Example: 208.9163
307
- *
308
- * @param {string} tleLine2 The second line of the TLE to parse.
309
- * @returns {number} The right ascension of the satellite.
310
- */
311
- static getRaan(tleLine2: TleLine2): number;
312
- /**
313
- * Orbital eccentricity, decimal point assumed. All artificial Earth satellites have an
314
- * eccentricity between 0 (perfect circle) and 1 (parabolic orbit).
315
- *
316
- * Range: 0 to 1
317
- *
318
- * Example: 0.0006317 (`0006317` in the original TLE)
319
- *
320
- * @param {string} tleLine2 The second line of the TLE to parse.
321
- * @returns {number} The eccentricity of the satellite.
322
- */
323
- static getEccentricity(tleLine2: TleLine2): number;
324
- /**
325
- * Argument of perigee. See https://en.wikipedia.org/wiki/Argument_of_perigee
326
- *
327
- * Units: degrees
328
- *
329
- * Range: 0 to 359.9999
330
- *
331
- * Example: 69.9862
332
- *
333
- * @param {string} tleLine2 The second line of the TLE to parse.
334
- * @returns {number} The argument of perigee in degrees.
335
- */
336
- static getArgOfPerigee(tleLine2: TleLine2): number;
337
- /**
338
- * Mean anomaly. Indicates where the satellite was located within its orbit at the time of the
339
- * TLE epoch.
340
- * See https://en.wikipedia.org/wiki/Mean_Anomaly
341
- *
342
- * Units: degrees
343
- *
344
- * Range: 0 to 359.9999
345
- *
346
- * Example: 25.2906
347
- *
348
- * @param {string} tleLine2 The second line of the TLE to parse.
349
- * @returns {number} The mean anomaly of the satellite.
350
- */
351
- static getMeanAnomaly(tleLine2: TleLine2): number;
352
- /**
353
- * Revolutions around the Earth per day (mean motion).
354
- * See https://en.wikipedia.org/wiki/Mean_Motion
355
- *
356
- * Range: 0 to 17 (theoretically)
357
- * Example: 15.54225995
358
- * @param {string} tleLine2 The second line of the TLE to parse.
359
- * @returns {number} The mean motion of the satellite.
360
- */
361
- static getMeanMotion(tleLine2: TleLine2): number;
362
- /**
363
- * Total satellite revolutions when this TLE was generated. This number rolls over
364
- * (e.g. 99999 -> 0).
365
- *
366
- * Range: 0 to 99999
367
- *
368
- * Example: 6766
369
- *
370
- * @param {string} tleLine2 The second line of the TLE to parse.
371
- * @returns {number} The revolutions around the Earth per day (mean motion).
372
- */
373
- static getRevNum(tleLine2: TleLine2): number;
374
- }
375
- export {};
@@ -1,34 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file Commonly used constants.
7
- *
8
- * @license AGPL-3.0-or-later
9
- * @Copyright (c) 2020-2023 Theodore Kruczek
10
- *
11
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
- * terms of the GNU Affero General Public License as published by the Free Software
13
- * Foundation, either version 3 of the License, or (at your option) any later version.
14
- *
15
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
- * See the GNU Affero General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public License along with
20
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- export declare const PI: number;
23
- export declare const TAU: number;
24
- export declare const DEG2RAD: number;
25
- export declare const x2o3: number;
26
- export declare const temp4 = 1.5e-12;
27
- export declare const RAD2DEG: number;
28
- export declare const MINUTES_PER_DAY = 1440;
29
- export declare const MS_PER_DAY = 86400000;
30
- export declare const DAY_TO_MS = 1.15741e-8;
31
- export declare const cMPerSec = 299792458;
32
- export declare const cKmPerSec: number;
33
- export declare const cKmPerMs: number;
34
- export declare const RADIUS_OF_EARTH = 6371;
@@ -1,113 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file MoonMath is a an extension to SunMath for calculating the position of the moon
7
- * and its phases. This was originally created by Vladimir Agafonkin. Robert Gester's
8
- * update was referenced for documentation. There were a couple of bugs in both versions
9
- * so there will be some differences if you are migrating from either to this library.
10
- *
11
- *
12
- * @license AGPL-3.0-or-later
13
- * @Copyright (c) 2020-2023 Theodore Kruczek
14
- *
15
- * @Copyright (c) 2011-2015, Vladimir Agafonkin
16
- * SunCalc is a JavaScript library for calculating sun/moon position and light phases.
17
- * https://github.com/mourner/suncalc
18
- *
19
- * Reworked and enhanced by Robert Gester
20
- * @Copyright (c) 2022 Robert Gester
21
- * https://github.com/hypnos3/suncalc3
22
- *
23
- * moon calculations, based on http://aa.quae.nl/en/reken/hemelpositie.html formulas
24
- *
25
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
26
- * terms of the GNU Affero General Public License as published by the Free Software
27
- * Foundation, either version 3 of the License, or (at your option) any later version.
28
- *
29
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
30
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31
- * See the GNU Affero General Public License for more details.
32
- *
33
- * You should have received a copy of the GNU Affero General Public License along with
34
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
35
- */
36
- import { Degrees, Radians } from '../ootk';
37
- type MoonIlluminationData = {
38
- fraction: number;
39
- phase: {
40
- from: number;
41
- to: number;
42
- id: string;
43
- emoji: string;
44
- code: string;
45
- name: string;
46
- weight: number;
47
- css: string;
48
- };
49
- phaseValue: number;
50
- angle: number;
51
- next: {
52
- value: number;
53
- date: string;
54
- type: string;
55
- newMoon: {
56
- value: number;
57
- date: string;
58
- };
59
- fullMoon: {
60
- value: number;
61
- date: string;
62
- };
63
- firstQuarter: {
64
- value: number;
65
- date: string;
66
- };
67
- thirdQuarter: {
68
- value: number;
69
- date: string;
70
- };
71
- };
72
- };
73
- export declare class MoonMath {
74
- private static moonCycles_;
75
- /**
76
- * calculations for illumination parameters of the moon,
77
- * based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and
78
- * Chapter 48 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
79
- * @param {number | Date} date Date object or timestamp for calculating moon-illumination
80
- * @return {MoonIlluminationData} result object of moon-illumination
81
- */
82
- static getMoonIllumination(date: number | Date): MoonIlluminationData;
83
- static getMoonPosition(date: Date, lat: Degrees, lon: Degrees): {
84
- az: Radians;
85
- el: Radians;
86
- rng: number;
87
- parallacticAngle: number;
88
- };
89
- /**
90
- * calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article
91
- * @param {number|Date} dateValue Date object or timestamp for calculating moon-times
92
- * @param {Degrees} lat latitude for calculating moon-times
93
- * @param {Degrees} lon longitude for calculating moon-times
94
- * @param {boolean} [isUtc] defines if the calculation should be in utc or local time (default is local)
95
- * @return {IMoonTimes} result object of sunTime
96
- */
97
- static getMoonTimes(dateValue: number | Date, lat: Degrees, lon: Degrees, isUtc?: boolean): {
98
- rise: any;
99
- set: any;
100
- ye: any;
101
- alwaysUp: any;
102
- alwaysDown: any;
103
- highest: any;
104
- };
105
- static hoursLater(date: Date, h: number): Date;
106
- static moonCoords(d: any): {
107
- ra: Radians;
108
- dec: Radians;
109
- dist: number;
110
- };
111
- private static calculateRiseSetTimes_;
112
- }
113
- export {};