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
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ export var ZoomValue;
18
+ (function (ZoomValue) {
19
+ ZoomValue[ZoomValue["LEO"] = 0.45] = "LEO";
20
+ ZoomValue[ZoomValue["GEO"] = 0.82] = "GEO";
21
+ ZoomValue[ZoomValue["MAX"] = 1] = "MAX";
22
+ })(ZoomValue || (ZoomValue = {}));
23
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0CAAU,CAAA;IACV,0CAAU,CAAA;IACV,uCAAO,CAAA;AACT,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB"}
@@ -0,0 +1 @@
1
+ export * from './jacobian';
@@ -0,0 +1,2 @@
1
+ export * from './jacobian';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Matrix } from 'ootk-core';
2
+ import { JacobianFunction } from '../types/types';
3
+ /**
4
+ * Calculates the Jacobian matrix of a given Jacobian function.
5
+ * @param f The Jacobian function.
6
+ * @param m The number of rows in the Jacobian matrix.
7
+ * @param x0 The initial values of the variables.
8
+ * @param step The step size for numerical differentiation (default: 1e-5).
9
+ * @returns The Jacobian matrix.
10
+ */
11
+ export declare function jacobian(f: JacobianFunction, m: number, x0: Float64Array, step?: number): Matrix;
@@ -0,0 +1,29 @@
1
+ import { array2d, Matrix, Vector } from 'ootk-core';
2
+ // TODO: #11 Expand documentation of Jacobian function.
3
+ /**
4
+ * Calculates the Jacobian matrix of a given Jacobian function.
5
+ * @param f The Jacobian function.
6
+ * @param m The number of rows in the Jacobian matrix.
7
+ * @param x0 The initial values of the variables.
8
+ * @param step The step size for numerical differentiation (default: 1e-5).
9
+ * @returns The Jacobian matrix.
10
+ */
11
+ export function jacobian(f, m, x0, step = 0.00001) {
12
+ const n = x0.length;
13
+ const j = array2d(m, n, 0);
14
+ const h = 0.5 * step;
15
+ for (let k = 0; k < n; k++) {
16
+ const xp = x0.slice();
17
+ xp[k] += h;
18
+ const fp = new Vector(f(xp));
19
+ const xm = x0.slice();
20
+ xm[k] -= h;
21
+ const fm = new Vector(f(xm));
22
+ const cd = fp.subtract(fm).scale(1 / step);
23
+ for (let i = 0; i < m; i++) {
24
+ j[i][k] = cd.elements[i];
25
+ }
26
+ }
27
+ return new Matrix(j);
28
+ }
29
+ //# sourceMappingURL=jacobian.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jacobian.js","sourceRoot":"","sources":["../../src/utils/jacobian.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGpD,uDAAuD;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAmB,EAAE,CAAS,EAAE,EAAgB,EAAE,IAAI,GAAG,OAAO;IACvF,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IACpB,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;IAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;QAEtB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACX,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7B,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;QAEtB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACX,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7B,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SAC1B;KACF;IAED,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,21 +1,20 @@
1
1
  {
2
2
  "name": "ootk",
3
- "version": "3.0.0",
4
- "description": "Orbital Object Toolkit including SGP4 Propagator and Coordinate Transforms",
5
- "main": "dist/ootk.js",
3
+ "version": "4.0.0-1",
4
+ "type": "module",
5
+ "module": "dist/main.js",
6
+ "description": "Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.",
6
7
  "scripts": {
7
- "build": "node ./scripts/cleanup.js && tsc -p tsconfig.build.json && node --openssl-legacy-provider node_modules/webpack/bin/webpack.js --config ./scripts/webpack.js",
8
- "build:legacy": "node ./scripts/cleanup.js && tsc -p tsconfig.build.json && node node_modules/webpack/bin/webpack.js --config ./scripts/webpack.js",
9
- "lcov": "node ./scripts/openLcov.mjs",
10
- "lint": "eslint src",
11
- "lint:fix": "eslint src --fix",
12
- "lint:test": "eslint test",
13
- "sandbox": "http-server ./",
8
+ "build": "npm run clean && npx tsc -p tsconfig.build.json -m esnext",
9
+ "clean": "node ./scripts/cleanup.mjs",
10
+ "lint": "npx eslint src",
11
+ "lint:fix": "npx eslint src --fix",
14
12
  "test": "jest",
15
13
  "test:coverage": "jest --coverage",
16
- "test:performance": "node test/performance/timing.test.mjs",
17
- "version": "auto-changelog -p && git add CHANGELOG.md"
14
+ "version": "npm run build && auto-changelog && git add CHANGELOG.md"
18
15
  },
16
+ "main": "dist/main.js",
17
+ "typings": "dist/main.d.ts",
19
18
  "repository": {
20
19
  "type": "git",
21
20
  "url": "git://github.com/thkruz/ootk"
@@ -25,43 +24,36 @@
25
24
  "orbit",
26
25
  "toolkit",
27
26
  "space",
28
- "satellite"
27
+ "satellite",
28
+ "radar",
29
+ "iod"
29
30
  ],
30
31
  "author": "Theodore Kruczek <theodore.kruczek@gmail.com> (https://github.com/ootk/)",
31
- "license": "MIT",
32
+ "license": "APGL-3.0",
32
33
  "bugs": {
33
34
  "url": "https://github.com/thkruz/ootk/issues"
34
35
  },
35
36
  "devDependencies": {
36
- "@babel/core": "^7.22.9",
37
- "@babel/plugin-transform-runtime": "^7.22.9",
38
- "@babel/preset-env": "^7.22.9",
39
- "@babel/preset-typescript": "^7.22.5",
40
- "@types/jest": "^28.1.8",
41
- "@types/node-fetch": "^2.6.2",
42
- "@typescript-eslint/eslint-plugin": "^5.54.0",
43
- "@typescript-eslint/parser": "^5.54.0",
44
- "auto-changelog": "^2.2.1",
37
+ "@babel/core": "^7.23.7",
38
+ "@babel/plugin-transform-runtime": "^7.23.7",
39
+ "@babel/preset-env": "^7.23.8",
40
+ "@babel/preset-typescript": "^7.23.3",
41
+ "@types/jest": "^29.5.11",
42
+ "@typescript-eslint/eslint-plugin": "^6.18.1",
43
+ "@typescript-eslint/parser": "^6.18.1",
44
+ "auto-changelog": "^2.4.0",
45
+ "auto-changelog-thkruz": "^1.0.0",
45
46
  "babel-eslint": "^10.1.0",
46
- "babel-loader": "^8.3.0",
47
- "codecov": "^3.8.1",
48
- "copy-webpack-plugin": "^11.0.0",
49
- "eslint": "^7.32.0",
50
- "imports-loader": "^4.0.1",
47
+ "babel-jest": "^29.7.0",
48
+ "babel-loader": "^9.1.3",
49
+ "eslint": "^8.56.0",
50
+ "eslint-plugin-jsdoc": "^48.0.2",
51
51
  "jest": "^28.1.3",
52
- "node-fetch": "^2.6.7",
53
- "opener": "^1.5.2",
54
- "prettier": "^2.8.8",
55
- "prettier-plugin-organize-imports": "^3.2.3",
56
- "ts-node": "^10.9.1",
57
- "typescript": "^4.9.5",
58
- "webpack": "^5.11.1",
59
- "webpack-cli": "^4.10.0"
52
+ "tsx": "^4.7.0",
53
+ "typescript": "^4.9.5"
60
54
  },
61
- "homepage": "https://github.com/thkruz/ootk",
62
- "directories": {
63
- "lib": "lib",
64
- "src": "src",
65
- "test": "test"
66
- }
55
+ "dependencies": {
56
+ "ootk-core": "^1.0.7"
57
+ },
58
+ "homepage": "https://github.com/thkruz/ootk"
67
59
  }
@@ -0,0 +1,326 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+
18
+ import {
19
+ Earth,
20
+ EpochUTC,
21
+ J2000,
22
+ Kilometers,
23
+ KilometersPerSecond,
24
+ Matrix,
25
+ MetersPerSecond,
26
+ RadiansPerSecond,
27
+ RelativeState,
28
+ Seconds,
29
+ Vector3D,
30
+ } from 'ootk-core';
31
+ import { Thrust } from './../force/Thrust';
32
+ import { Waypoint } from './../maneuver/Waypoint';
33
+
34
+ // / Hill Modified Equidistant Cyllindrical _(EQCM)_ coordinates.
35
+ export class Hill {
36
+ private semimajorAxis_: Kilometers;
37
+ private meanMotion_: RadiansPerSecond;
38
+
39
+ constructor(
40
+ public epoch: EpochUTC,
41
+ public position: Vector3D<Kilometers>,
42
+ public velocity: Vector3D<KilometersPerSecond>,
43
+ semimajorAxis: Kilometers,
44
+ ) {
45
+ this.semimajorAxis_ = semimajorAxis;
46
+ this.meanMotion_ = Earth.smaToMeanMotion(this.semimajorAxis_);
47
+ }
48
+
49
+ static fromState(
50
+ origin: J2000,
51
+ radialPosition: Kilometers,
52
+ intrackPosition: Kilometers,
53
+ nodeVelocity: KilometersPerSecond,
54
+ nodeOffsetTime: Seconds,
55
+ ): Hill {
56
+ const a = origin.semimajorAxis;
57
+ const n = Earth.smaToMeanMotion(a);
58
+ const yDot = -3.0 * radialPosition * n * 0.5 as KilometersPerSecond;
59
+ const z = (nodeVelocity / n) * Math.sin(n * -nodeOffsetTime) as Kilometers;
60
+ const zDot = nodeVelocity * Math.cos(n * -nodeOffsetTime) as KilometersPerSecond;
61
+ const r = new Vector3D(radialPosition, intrackPosition, z);
62
+ const v = new Vector3D(0.0 as KilometersPerSecond, yDot, zDot);
63
+
64
+ return new Hill(origin.epoch, r, v, a);
65
+ }
66
+
67
+ static fromNmc(
68
+ origin: J2000,
69
+ majorAxisRange: Kilometers,
70
+ nodeVelocity: KilometersPerSecond,
71
+ nodeOffsetTime: Seconds,
72
+ translation = 0.0,
73
+ ): Hill {
74
+ const a = origin.semimajorAxis;
75
+ const n = Earth.smaToMeanMotion(a);
76
+ const xDot = majorAxisRange * n * 0.5 as KilometersPerSecond;
77
+ const z = (nodeVelocity / n) * Math.sin(n * -nodeOffsetTime) as Kilometers;
78
+ const zDot = nodeVelocity * Math.cos(n * -nodeOffsetTime) as KilometersPerSecond;
79
+ const r = new Vector3D(0.0 as Kilometers, majorAxisRange + translation as Kilometers, z);
80
+ const v = new Vector3D(xDot, 0.0 as KilometersPerSecond, zDot);
81
+
82
+ return new Hill(origin.epoch, r, v, a);
83
+ }
84
+
85
+ static fromPerch(
86
+ origin: J2000,
87
+ perchRange: Kilometers,
88
+ nodeVelocity: KilometersPerSecond,
89
+ nodeOffsetTime: Seconds,
90
+ ): Hill {
91
+ const a = origin.semimajorAxis;
92
+ const n = Earth.smaToMeanMotion(a);
93
+ const z = (nodeVelocity / n) * Math.sin(n * -nodeOffsetTime) as Kilometers;
94
+ const zDot = nodeVelocity * Math.cos(n * -nodeOffsetTime) as KilometersPerSecond;
95
+ const r = new Vector3D(0.0 as Kilometers, perchRange, z);
96
+ const v = new Vector3D(0.0 as KilometersPerSecond, 0.0 as KilometersPerSecond, zDot);
97
+
98
+ return new Hill(origin.epoch, r, v, a);
99
+ }
100
+
101
+ get semimajorAxis(): Kilometers {
102
+ return this.semimajorAxis_;
103
+ }
104
+
105
+ set semimajorAxis(sma: Kilometers) {
106
+ this.semimajorAxis_ = sma;
107
+ this.meanMotion_ = Earth.smaToMeanMotion(this.semimajorAxis_);
108
+ }
109
+
110
+ get meanMotion(): RadiansPerSecond {
111
+ return this.meanMotion_;
112
+ }
113
+
114
+ toJ2000Matrix(origin: J2000, transform: Matrix): J2000 {
115
+ const magrtgt = origin.position.magnitude();
116
+ const magrint = magrtgt + this.position.x;
117
+ const vtgtrsw = transform.multiplyVector3D(origin.velocity);
118
+
119
+ const lambdadottgt = vtgtrsw.y / magrtgt;
120
+ const lambdaint = this.position.y / magrtgt;
121
+ const phiint = this.position.z / magrtgt;
122
+ const sinphiint = Math.sin(phiint);
123
+ const cosphiint = Math.cos(phiint);
124
+ const sinlambdaint = Math.sin(lambdaint);
125
+ const coslambdaint = Math.cos(lambdaint);
126
+
127
+ const rotRswSez = new Matrix([
128
+ [sinphiint * coslambdaint, sinphiint * sinlambdaint, -cosphiint],
129
+ [-sinlambdaint, coslambdaint, 0],
130
+ [cosphiint * coslambdaint, cosphiint * sinlambdaint, sinphiint],
131
+ ]);
132
+
133
+ const rdotint = this.velocity.x + vtgtrsw.x;
134
+ const lambdadotint = this.velocity.y / magrtgt + lambdadottgt;
135
+ const phidotint = this.velocity.z / magrtgt;
136
+ const vintsez = new Vector3D(-magrint * phidotint, magrint * lambdadotint * cosphiint, rdotint);
137
+ const vintrsw = rotRswSez.transpose().multiplyVector3D(vintsez);
138
+ const vinteci = transform.transpose().multiplyVector3D(vintrsw) as Vector3D<KilometersPerSecond>;
139
+
140
+ const rintrsw = new Vector3D(
141
+ cosphiint * magrint * coslambdaint,
142
+ cosphiint * magrint * sinlambdaint,
143
+ sinphiint * magrint,
144
+ );
145
+
146
+ const rinteci = transform.transpose().multiplyVector3D(rintrsw) as Vector3D<Kilometers>;
147
+
148
+ return new J2000(origin.epoch, rinteci, vinteci);
149
+ }
150
+
151
+ toJ2000(origin: J2000): J2000 {
152
+ return this.toJ2000Matrix(origin, RelativeState.createMatrix(origin.position, origin.velocity));
153
+ }
154
+
155
+ static transitionMatrix(t: number, meanMotion: number): Matrix {
156
+ const n = meanMotion;
157
+ const sn = Math.sin(n * t);
158
+ const cs = Math.cos(n * t);
159
+
160
+ return new Matrix([
161
+ [4.0 - 3.0 * cs, 0.0, 0.0, sn / n, (2.0 * (1.0 - cs)) / n, 0.0],
162
+ [6.0 * (sn - n * t), 1.0, 0.0, (-2.0 * (1.0 - cs)) / n, (4.0 * sn - 3.0 * n * t) / n, 0.0],
163
+ [0.0, 0.0, cs, 0.0, 0.0, sn / n],
164
+ [3.0 * n * sn, 0.0, 0.0, cs, 2.0 * sn, 0.0],
165
+ [-6.0 * n * (1.0 - cs), 0.0, 0.0, -2.0 * sn, 4.0 * cs - 3.0, 0.0],
166
+ [0.0, 0.0, -n * sn, 0.0, 0.0, cs],
167
+ ]);
168
+ }
169
+
170
+ transition(t: Seconds): Hill {
171
+ const sysMat = Hill.transitionMatrix(t, this.meanMotion_);
172
+ const res = sysMat.multiplyVector(this.position.join(this.velocity)).elements;
173
+
174
+ return new Hill(
175
+ this.epoch.roll(t),
176
+ new Vector3D(res[0] as Kilometers, res[1] as Kilometers, res[2] as Kilometers),
177
+ new Vector3D(res[3] as KilometersPerSecond, res[4] as KilometersPerSecond, res[5] as KilometersPerSecond),
178
+ this.semimajorAxis_,
179
+ );
180
+ }
181
+
182
+ transitionWithMatrix(stm: Matrix, t: Seconds): Hill {
183
+ const res = stm.multiplyVector(this.position.join(this.velocity)).elements;
184
+
185
+ return new Hill(
186
+ this.epoch.roll(t),
187
+ new Vector3D(res[0] as Kilometers, res[1] as Kilometers, res[2] as Kilometers),
188
+ new Vector3D(res[3] as KilometersPerSecond, res[4] as KilometersPerSecond, res[5] as KilometersPerSecond),
189
+ this.semimajorAxis_,
190
+ );
191
+ }
192
+
193
+ propagate(newEpoch: EpochUTC): Hill {
194
+ return this.transition(newEpoch.difference(this.epoch));
195
+ }
196
+
197
+ propagateWithMatrix(stm: Matrix, newEpoch: EpochUTC): Hill {
198
+ return this.transitionWithMatrix(stm, newEpoch.difference(this.epoch));
199
+ }
200
+
201
+ maneuver(maneuver: Thrust): Hill {
202
+ const state = this.propagate(maneuver.center);
203
+
204
+ return new Hill(state.epoch, state.position, state.velocity.add(maneuver.deltaV), state.semimajorAxis_);
205
+ }
206
+
207
+ ephemeris(start: EpochUTC, stop: EpochUTC, step = 60.0 as Seconds): Hill[] {
208
+ const output: Hill[] = [];
209
+ let current = start;
210
+
211
+ while (stop >= current) {
212
+ output.push(this.propagate(current));
213
+ current = current.roll(step);
214
+ }
215
+
216
+ return output;
217
+ }
218
+
219
+ get period(): Seconds {
220
+ return (2 * Math.PI) / this.meanMotion_ as Seconds;
221
+ }
222
+
223
+ nextRadialTangent(): Hill {
224
+ const x = this.position.x;
225
+ const xDot = this.velocity.x;
226
+ const yDot = this.velocity.y;
227
+ let t = Math.atan(-xDot / (3.0 * this.meanMotion_ * x + 2.0 * yDot)) / this.meanMotion_ as Seconds;
228
+
229
+ if (t <= 0) {
230
+ t = t + 0.5 * this.period as Seconds;
231
+ } else if (isNaN(t)) {
232
+ t = 0.5 * this.period as Seconds;
233
+ }
234
+
235
+ return this.propagate(this.epoch.roll(t));
236
+ }
237
+
238
+ solveManeuver(waypoint: Waypoint, ignoreCrosstrack = false): Thrust {
239
+ const t = waypoint.epoch.difference(this.epoch);
240
+ const w = waypoint.relativePosition;
241
+ const sysMat = Hill.transitionMatrix(t, this.meanMotion_);
242
+ const posEquationMat = new Matrix([
243
+ [sysMat.elements[0][0], sysMat.elements[0][1], sysMat.elements[0][2]],
244
+ [sysMat.elements[1][0], sysMat.elements[1][1], sysMat.elements[1][2]],
245
+ [sysMat.elements[2][0], sysMat.elements[2][1], sysMat.elements[2][2]],
246
+ ]);
247
+ const solnVector = w
248
+ .subtract(posEquationMat.multiplyVector3D(this.position)) as unknown as Vector3D<KilometersPerSecond>;
249
+ const velEquationMat = new Matrix([
250
+ [sysMat.elements[0][3], sysMat.elements[0][4], sysMat.elements[0][5]],
251
+ [sysMat.elements[1][3], sysMat.elements[1][4], sysMat.elements[1][5]],
252
+ [sysMat.elements[2][3], sysMat.elements[2][4], sysMat.elements[2][5]],
253
+ ]);
254
+ let result = velEquationMat
255
+ .inverse()
256
+ .multiplyVector3D(solnVector)
257
+ .subtract(this.velocity);
258
+
259
+ if (ignoreCrosstrack) {
260
+ result = new Vector3D(
261
+ result.x,
262
+ result.y,
263
+ 0 as KilometersPerSecond,
264
+ );
265
+ }
266
+
267
+ return new Thrust(
268
+ this.epoch,
269
+ result.x * 1000 as MetersPerSecond,
270
+ result.y * 1000 as MetersPerSecond,
271
+ result.z * 1000 as MetersPerSecond,
272
+ );
273
+ }
274
+
275
+ maneuverSequence(
276
+ pivot: EpochUTC,
277
+ waypoints: Waypoint[],
278
+ preManeuvers: Thrust[] = [],
279
+ postManeuvers: Thrust[] = [],
280
+ ): Thrust[] {
281
+ let state = new Hill(this.epoch, this.position, this.velocity, this.semimajorAxis_);
282
+
283
+ preManeuvers = preManeuvers.slice();
284
+ postManeuvers = postManeuvers.slice();
285
+ let output = preManeuvers;
286
+
287
+ // Note difference was once compareTo
288
+ output.sort((a, b) => a.center.difference(b.center));
289
+ output = output.filter((mvr) => mvr.center >= this.epoch && mvr.center >= pivot);
290
+ for (const mvr of output) {
291
+ state = state.maneuver(mvr);
292
+ }
293
+ state = state.propagate(pivot);
294
+ for (const wpt of waypoints) {
295
+ const mvr = state.solveManeuver(wpt);
296
+
297
+ state = state.maneuver(mvr);
298
+ output.push(mvr);
299
+ }
300
+ output.push(...postManeuvers);
301
+
302
+ return output;
303
+ }
304
+
305
+ maneuverOrigin(maneuver: Thrust): Hill {
306
+ const state = this.propagate(maneuver.center);
307
+ const vInit = Math.sqrt(Earth.mu / this.semimajorAxis_);
308
+ const vFinal = vInit - maneuver.intrack * 1e-3;
309
+ const aFinal = Earth.mu / (vFinal * vFinal) as Kilometers;
310
+
311
+ return new Hill(state.epoch, state.position, state.velocity.subtract(maneuver.deltaV), aFinal);
312
+ }
313
+
314
+ get name(): string {
315
+ return 'Hill';
316
+ }
317
+
318
+ toString(): string {
319
+ return [
320
+ `[${this.name}]`,
321
+ ` Epoch: ${this.epoch}`,
322
+ ` Position: ${this.position.toString(6)} km`,
323
+ ` Velocity: ${this.velocity.toString(9)} km/s`,
324
+ ].join('\n');
325
+ }
326
+ }
@@ -0,0 +1 @@
1
+ export { Hill } from './Hill';