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
@@ -1,13 +1,7 @@
1
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 SpaceObject class is meant to provide properties to satellites/stars that
7
- * do not apply to ground based objects.
8
- *
2
+ * @author @thkruz Theodore Kruczek
9
3
  * @license AGPL-3.0-or-later
10
- * @Copyright (c) 2020-2023 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
11
5
  *
12
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -20,19 +14,23 @@
20
14
  * You should have received a copy of the GNU Affero General Public License along with
21
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
16
  */
23
- import { BaseObject } from './base-object';
24
- import { SpaceObjectType } from '../types/types';
25
- interface ObjectInfo {
26
- name?: string;
27
- type?: SpaceObjectType;
28
- rcs?: number;
29
- vmag?: number;
30
- }
31
- export declare class SpaceObject extends BaseObject {
32
- rcs: number;
33
- vmag: number;
34
- constructor(info: ObjectInfo);
35
- getRcs(): number;
36
- getVmag(): number;
17
+ // / Batch least squares orbit determination result.
18
+ export class BatchLeastSquaresResult {
19
+ state;
20
+ covariance;
21
+ rms;
22
+ /**
23
+ * Create a new [BatchLeastSquaresResult] object, containing the solved
24
+ * [state], [covariance], and root-mean-squared error [rms].
25
+ * @param state The solved state.
26
+ * @param covariance The solved covariance.
27
+ * @param rms The root-mean-squared error.
28
+ */
29
+ constructor(state, covariance, rms) {
30
+ this.state = state;
31
+ this.covariance = covariance;
32
+ this.rms = rms;
33
+ // Nothing to do here.
34
+ }
37
35
  }
38
- export {};
36
+ //# sourceMappingURL=BatchLeastSquaresResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BatchLeastSquaresResult.js","sourceRoot":"","sources":["../../src/orbit_determination/BatchLeastSquaresResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,oDAAoD;AACpD,MAAM,OAAO,uBAAuB;IAQf;IAAqB;IAAoC;IAP5E;;;;;;OAMG;IACH,YAAmB,KAAY,EAAS,UAA2B,EAAS,GAAW;QAApE,UAAK,GAAL,KAAK,CAAO;QAAS,eAAU,GAAV,UAAU,CAAiB;QAAS,QAAG,GAAH,GAAG,CAAQ;QACrF,sBAAsB;IACxB,CAAC;CACF"}
@@ -0,0 +1,38 @@
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
+ import { EpochUTC, J2000, Kilometers, Vector3D } from 'ootk-core';
18
+ /**
19
+ * Gibbs 3-position inital orbit determination.
20
+ */
21
+ export declare class GibbsIOD {
22
+ mu: number;
23
+ constructor(mu?: number);
24
+ /** Abort solve if position plane exceeds this value. */
25
+ private static readonly coplanarThreshold_;
26
+ /**
27
+ * Attempt to create a state estimate from three inertial position vectors.
28
+ *
29
+ * Throws an error if the positions are not coplanar.
30
+ * @param r1 Position vector 1.
31
+ * @param r2 Position vector 2.
32
+ * @param r3 Position vector 3.
33
+ * @param t2 Time of position 2.
34
+ * @param t3 Time of position 3.
35
+ * @returns State estimate at time t2.
36
+ */
37
+ solve(r1: Vector3D<Kilometers>, r2: Vector3D<Kilometers>, r3: Vector3D<Kilometers>, t2: EpochUTC, t3: EpochUTC): J2000;
38
+ }
@@ -0,0 +1,76 @@
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
+ import { DEG2RAD, Earth, halfPi, J2000 } from 'ootk-core';
18
+ import { ForceModel } from './../force/ForceModel';
19
+ import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator';
20
+ /**
21
+ * Gibbs 3-position inital orbit determination.
22
+ */
23
+ export class GibbsIOD {
24
+ mu;
25
+ constructor(mu = Earth.mu) {
26
+ this.mu = mu;
27
+ // Nothing to do here.
28
+ }
29
+ /** Abort solve if position plane exceeds this value. */
30
+ static coplanarThreshold_ = (5.0 * DEG2RAD);
31
+ /**
32
+ * Attempt to create a state estimate from three inertial position vectors.
33
+ *
34
+ * Throws an error if the positions are not coplanar.
35
+ * @param r1 Position vector 1.
36
+ * @param r2 Position vector 2.
37
+ * @param r3 Position vector 3.
38
+ * @param t2 Time of position 2.
39
+ * @param t3 Time of position 3.
40
+ * @returns State estimate at time t2.
41
+ */
42
+ solve(r1, r2, r3, t2, t3) {
43
+ const num = r1.normalize().dot(r2.normalize().cross(r3.normalize()));
44
+ const alpha = halfPi - Math.acos(num);
45
+ if (Math.abs(alpha) > GibbsIOD.coplanarThreshold_) {
46
+ throw new Error('Orbits are not coplanar.');
47
+ }
48
+ const r1m = r1.magnitude();
49
+ const r2m = r2.magnitude();
50
+ const r3m = r3.magnitude();
51
+ const d = r1.cross(r2).add(r2.cross(r3).add(r3.cross(r1)));
52
+ const n = r2.cross(r3).scale(r1m).add(r3.cross(r1).scale(r2m)).add(r1.cross(r2).scale(r3m));
53
+ const b = d.cross(r2);
54
+ const s = r1.scale(r2m - r3m).add(r2.scale(r3m - r1m).add(r3.scale(r1m - r2m)));
55
+ const nm = n.magnitude();
56
+ const dm = d.magnitude();
57
+ const vm = Math.sqrt(this.mu / (nm * dm));
58
+ const vlEci = b.scale((vm / r2m)).add(s.scale(vm));
59
+ const pv = new J2000(t2, r2, vlEci);
60
+ const forceModel = new ForceModel().setGravity(this.mu);
61
+ const orbit = new RungeKutta89Propagator(pv, forceModel);
62
+ const pv2 = new J2000(t2, r2, vlEci.negate());
63
+ const orbit2 = new RungeKutta89Propagator(pv2, forceModel);
64
+ const estP3 = orbit.propagate(t3).position;
65
+ const dist = estP3.subtract(r3).magnitude();
66
+ const estP3b = orbit2.propagate(t3).position;
67
+ const dist2 = estP3b.subtract(r3).magnitude();
68
+ if (dist <= dist2) {
69
+ orbit.reset();
70
+ return orbit.propagate(t2);
71
+ }
72
+ orbit2.reset();
73
+ return orbit2.propagate(t2);
74
+ }
75
+ }
76
+ //# sourceMappingURL=GibbsIOD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GibbsIOD.js","sourceRoot":"","sources":["../../src/orbit_determination/GibbsIOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,EAAE,KAAK,EAAsD,MAAM,WAAW,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;GAEG;AACH,MAAM,OAAO,QAAQ;IACA;IAAnB,YAAmB,KAAa,KAAK,CAAC,EAAE;QAArB,OAAE,GAAF,EAAE,CAAmB;QACtC,sBAAsB;IACxB,CAAC;IAED,wDAAwD;IAChD,MAAM,CAAU,kBAAkB,GAAY,CAAC,GAAG,GAAG,OAAO,CAAY,CAAC;IAEjF;;;;;;;;;;OAUG;IACH,KAAK,CACH,EAAwB,EACxB,EAAwB,EACxB,EAAwB,EACxB,EAAY,EACZ,EAAY;QAEZ,MAAM,GAAG,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtC,IAAI,IAAI,CAAC,GAAG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ek
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
+ import { J2000, Kilometers } from 'ootk-core';
18
+ import { ObservationOptical } from './../observation/ObservationOptical';
19
+ /**
20
+ * Gooding angles-only initial orbit determination.
21
+ *
22
+ * Used for orbit determination from three optical observations.
23
+ */
24
+ export declare class GoodingIOD {
25
+ private readonly _mu;
26
+ private readonly o1_;
27
+ private readonly o2_;
28
+ private readonly o3_;
29
+ private vObserverPosition1_;
30
+ private vObserverPosition2_;
31
+ private vObserverPosition3_;
32
+ private r_;
33
+ private v_;
34
+ private t_;
35
+ private r1_;
36
+ private r2_;
37
+ private r3_;
38
+ private rho1_;
39
+ private rho2_;
40
+ private rho3_;
41
+ private d1_;
42
+ private d3_;
43
+ private facFiniteDiff_;
44
+ private readonly _forceModel;
45
+ constructor(o1: ObservationOptical, o2: ObservationOptical, o3: ObservationOptical, mu?: number);
46
+ private _getPositionOnLoS2;
47
+ private _modifyIterate;
48
+ private _computeDerivatives;
49
+ solve(r1Init: Kilometers, r3Init: Kilometers, nRev?: number, direction?: boolean): J2000;
50
+ private _solveRangeProblem;
51
+ }
@@ -0,0 +1,247 @@
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
+ import { Earth, J2000, TAU, Vector3D } from 'ootk-core';
18
+ import { ForceModel } from '../force/ForceModel';
19
+ import { RungeKutta89Propagator } from '../propagator/RungeKutta89Propagator';
20
+ import { GibbsIOD } from './GibbsIOD';
21
+ import { LambertIOD } from './LambertIOD';
22
+ /**
23
+ * Gooding angles-only initial orbit determination.
24
+ *
25
+ * Used for orbit determination from three optical observations.
26
+ */
27
+ export class GoodingIOD {
28
+ _mu;
29
+ o1_;
30
+ o2_;
31
+ o3_;
32
+ vObserverPosition1_ = Vector3D.origin;
33
+ vObserverPosition2_ = Vector3D.origin;
34
+ vObserverPosition3_ = Vector3D.origin;
35
+ r_ = 0.0;
36
+ v_ = 0.0;
37
+ t_ = 0.0;
38
+ r1_ = 0.0;
39
+ r2_ = 0.0;
40
+ r3_ = 0.0;
41
+ rho1_ = 0.0;
42
+ rho2_ = 0.0;
43
+ rho3_ = 0.0;
44
+ d1_ = 0.0;
45
+ d3_ = 0.0;
46
+ facFiniteDiff_ = 0.0;
47
+ _forceModel = new ForceModel().setGravity(1.0);
48
+ constructor(o1, o2, o3, mu = Earth.mu) {
49
+ this._mu = mu;
50
+ this.o1_ = o1;
51
+ this.o2_ = o2;
52
+ this.o3_ = o3;
53
+ }
54
+ _getPositionOnLoS2({ e1, r01, e3, r03, t13, t12, nRev, posigrade, }) {
55
+ const p1 = this.vObserverPosition1_.add(e1.scale(r01));
56
+ this.r1_ = p1.magnitude();
57
+ const p3 = this.vObserverPosition3_.add(e3.scale(r03));
58
+ this.r3_ = p3.magnitude();
59
+ const p13 = p1.cross(p3);
60
+ let th = Math.atan2(p13.magnitude(), p1.dot(p3));
61
+ if (!posigrade) {
62
+ th = TAU - th;
63
+ }
64
+ const v1 = new Float64Array(2);
65
+ const exitflag = LambertIOD.solve(this.r1_, this.r3_, th, t13, nRev, v1);
66
+ if (exitflag) {
67
+ const pn = p1.cross(p3);
68
+ const pt = pn.cross(p1);
69
+ let rt = pt.magnitude();
70
+ if (!posigrade) {
71
+ rt = -rt;
72
+ }
73
+ const vel1 = p1.scale(v1[0] / this.r1_).add(pt.scale(v1[1] / rt));
74
+ const p2 = new RungeKutta89Propagator(new J2000(this.o1_.epoch, p1, vel1), this._forceModel).propagate(this.o1_.epoch.roll(t12)).position;
75
+ return p2;
76
+ }
77
+ return null;
78
+ }
79
+ _modifyIterate(lineOfSight1, lineOfSight3) {
80
+ const r13 = this.vObserverPosition3_.subtract(this.vObserverPosition1_);
81
+ this.d1_ = r13.dot(lineOfSight1);
82
+ this.d3_ = r13.dot(lineOfSight3);
83
+ const d2 = lineOfSight1.dot(lineOfSight3);
84
+ const d4 = 1.0 - d2 * d2;
85
+ this.rho1_ = Math.max((this.d1_ - this.d3_ * d2) / d4, 0.0);
86
+ this.rho3_ = Math.max((this.d1_ * d2 - this.d3_) / d4, 0.0);
87
+ }
88
+ _computeDerivatives({ x, y, lineOfSight1, lineOfSight3, pin, ein, t13, t12, nrev, direction, fd, gd, }) {
89
+ const p = pin.normalize();
90
+ const en = ein.normalize();
91
+ const dx = this.facFiniteDiff_ * x;
92
+ const dy = this.facFiniteDiff_ * y;
93
+ const cm1 = this._getPositionOnLoS2({
94
+ e1: lineOfSight1,
95
+ r01: x - dx,
96
+ e3: lineOfSight3,
97
+ r03: y,
98
+ t13,
99
+ t12,
100
+ nRev: nrev,
101
+ posigrade: direction,
102
+ }).subtract(this.vObserverPosition2_);
103
+ const fm1 = p.dot(cm1);
104
+ const gm1 = en.dot(cm1);
105
+ const cp1 = this._getPositionOnLoS2({
106
+ e1: lineOfSight1,
107
+ r01: x + dx,
108
+ e3: lineOfSight3,
109
+ r03: y,
110
+ t13,
111
+ t12,
112
+ nRev: nrev,
113
+ posigrade: direction,
114
+ }).subtract(this.vObserverPosition2_);
115
+ const fp1 = p.dot(cp1);
116
+ const gp1 = en.dot(cp1);
117
+ const fx = (fp1 - fm1) / (2.0 * dx);
118
+ const gx = (gp1 - gm1) / (2.0 * dx);
119
+ const cm3 = this._getPositionOnLoS2({
120
+ e1: lineOfSight1,
121
+ r01: x,
122
+ e3: lineOfSight3,
123
+ r03: y - dy,
124
+ t13,
125
+ t12,
126
+ nRev: nrev,
127
+ posigrade: direction,
128
+ }).subtract(this.vObserverPosition2_);
129
+ const fm3 = p.dot(cm3);
130
+ const gm3 = en.dot(cm3);
131
+ const cp3 = this._getPositionOnLoS2({
132
+ e1: lineOfSight1,
133
+ r01: x,
134
+ e3: lineOfSight3,
135
+ r03: y + dy,
136
+ t13,
137
+ t12,
138
+ nRev: nrev,
139
+ posigrade: direction,
140
+ }).subtract(this.vObserverPosition2_);
141
+ const fp3 = p.dot(cp3);
142
+ const gp3 = en.dot(cp3);
143
+ const fy = (fp3 - fm3) / (2.0 * dy);
144
+ const gy = (gp3 - gm3) / (2.0 * dy);
145
+ fd[0] = fx;
146
+ fd[1] = fy;
147
+ gd[0] = gx;
148
+ gd[1] = gy;
149
+ }
150
+ solve(r1Init, r3Init, nRev = 0, direction = true) {
151
+ const lineOfSight1 = this.o1_.observation.lineOfSight();
152
+ const lineOfSight2 = this.o2_.observation.lineOfSight();
153
+ const lineOfSight3 = this.o3_.observation.lineOfSight();
154
+ this.r_ = Math.max(r1Init, r3Init);
155
+ this.v_ = Math.sqrt(this._mu / this.r_);
156
+ this.t_ = this.r_ / this.v_;
157
+ this.vObserverPosition1_ = this.o1_.site.position.scale(1.0 / this.r_);
158
+ this.vObserverPosition2_ = this.o2_.site.position.scale(1.0 / this.r_);
159
+ this.vObserverPosition3_ = this.o3_.site.position.scale(1.0 / this.r_);
160
+ const maxiter = 100;
161
+ this._solveRangeProblem({
162
+ rho1init: r1Init / this.r_,
163
+ rho3init: r3Init / this.r_,
164
+ t13: this.o3_.epoch.difference(this.o1_.epoch) / this.t_,
165
+ t12: this.o2_.epoch.difference(this.o1_.epoch) / this.t_,
166
+ nrev: nRev,
167
+ direction,
168
+ lineOfSight1,
169
+ lineOfSight2,
170
+ lineOfSight3,
171
+ maxIterations: maxiter,
172
+ });
173
+ const gibbs = new GibbsIOD(this._mu);
174
+ const p1 = this.vObserverPosition1_.add(lineOfSight1.scale(this.rho1_)).scale(this.r_);
175
+ const p2 = this.vObserverPosition2_.add(lineOfSight2.scale(this.rho2_)).scale(this.r_);
176
+ const p3 = this.vObserverPosition3_.add(lineOfSight3.scale(this.rho3_)).scale(this.r_);
177
+ return gibbs.solve(p1, p2, p3, this.o2_.epoch, this.o3_.epoch);
178
+ }
179
+ _solveRangeProblem({ rho1init, rho3init, t13, t12, nrev, direction, lineOfSight1, lineOfSight2, lineOfSight3, maxIterations, }) {
180
+ const arbf = 1e-6;
181
+ const cvtol = 1e-14;
182
+ this.rho1_ = rho1init;
183
+ this.rho3_ = rho3init;
184
+ let iter = 0;
185
+ let stoppingCriterion = 10.0 * cvtol;
186
+ while (iter < maxIterations && Math.abs(stoppingCriterion) > cvtol) {
187
+ this.facFiniteDiff_ = arbf;
188
+ const p2 = this._getPositionOnLoS2({
189
+ e1: lineOfSight1,
190
+ r01: this.rho1_,
191
+ e3: lineOfSight3,
192
+ r03: this.rho3_,
193
+ t13,
194
+ t12,
195
+ nRev: nrev,
196
+ posigrade: direction,
197
+ });
198
+ if (p2 === null) {
199
+ this._modifyIterate(lineOfSight1, lineOfSight3);
200
+ }
201
+ else {
202
+ this.r2_ = p2.magnitude();
203
+ const c = p2.subtract(this.vObserverPosition2_);
204
+ this.rho2_ = c.magnitude();
205
+ const cr = lineOfSight2.dot(c);
206
+ const u = lineOfSight2.cross(c);
207
+ const p = u.cross(lineOfSight2).normalize();
208
+ const ent = lineOfSight2.cross(p);
209
+ const enr = ent.magnitude();
210
+ if (enr === 0.0) {
211
+ return;
212
+ }
213
+ const en = ent.normalize();
214
+ const fc = p.dot(c);
215
+ const fd = new Float64Array(2);
216
+ const gd = new Float64Array(2);
217
+ this._computeDerivatives({
218
+ x: this.rho1_,
219
+ y: this.rho3_,
220
+ lineOfSight1,
221
+ lineOfSight3,
222
+ pin: p,
223
+ ein: en,
224
+ t13,
225
+ t12,
226
+ nrev,
227
+ direction,
228
+ fd,
229
+ gd,
230
+ });
231
+ const fr1 = fd[0];
232
+ const fr3 = fd[1];
233
+ const gr1 = gd[0];
234
+ const gr3 = gd[1];
235
+ const detj = fr1 * gr3 - fr3 * gr1;
236
+ this.d3_ = (-gr3 * fc) / detj;
237
+ this.d1_ = (gr1 * fc) / detj;
238
+ this.rho1_ = this.rho1_ + this.d3_;
239
+ this.rho3_ = this.rho3_ + this.d1_;
240
+ const den = Math.max(cr, this.r2_);
241
+ stoppingCriterion = fc / den;
242
+ }
243
+ ++iter;
244
+ }
245
+ }
246
+ }
247
+ //# sourceMappingURL=GoodingIOD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoodingIOD.js","sourceRoot":"","sources":["../../src/orbit_determination/GoodingIOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,EAA4C,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyC1C;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACJ,GAAG,CAAS;IACZ,GAAG,CAAqB;IACxB,GA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AG,GAAG,CAAC;aAC9B;YAED,EAAE,IAAI,CAAC;SACR;IACH,CAAC;CACF"}
@@ -0,0 +1,33 @@
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
+ import { EpochUTC, J2000, Kilometers, Vector3D } from 'ootk-core';
18
+ /**
19
+ * Herrik-Gibbs 3-position initial orbit determination.
20
+ *
21
+ * Possibly better than regular Gibbs IOD for closely spaced position
22
+ * vectors (less than 5°).
23
+ */
24
+ export declare class HerrickGibbsIOD {
25
+ mu: number;
26
+ /**
27
+ * Create a new [HerrickGibbsIOD] object with optional
28
+ * gravitational parameter [mu].
29
+ * @param mu Gravitational parameter (default: Earth.mu)
30
+ */
31
+ constructor(mu?: number);
32
+ solve(r1: Vector3D, t1: EpochUTC, r2: Vector3D<Kilometers>, t2: EpochUTC, r3: Vector3D, t3: EpochUTC): J2000;
33
+ }
@@ -0,0 +1,50 @@
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
+ import { Earth, J2000 } from 'ootk-core';
18
+ /**
19
+ * Herrik-Gibbs 3-position initial orbit determination.
20
+ *
21
+ * Possibly better than regular Gibbs IOD for closely spaced position
22
+ * vectors (less than 5°).
23
+ */
24
+ export class HerrickGibbsIOD {
25
+ mu;
26
+ /**
27
+ * Create a new [HerrickGibbsIOD] object with optional
28
+ * gravitational parameter [mu].
29
+ * @param mu Gravitational parameter (default: Earth.mu)
30
+ */
31
+ constructor(mu = Earth.mu) {
32
+ this.mu = mu;
33
+ // Nothing to do here.
34
+ }
35
+ // / Attempt to create a state estimate from three inertial position vectors.
36
+ solve(r1, t1, r2, t2, r3, t3) {
37
+ const dt31 = t3.difference(t1);
38
+ const dt32 = t3.difference(t2);
39
+ const dt21 = t2.difference(t1);
40
+ const r1m = r1.magnitude();
41
+ const r2m = r2.magnitude();
42
+ const r3m = r3.magnitude();
43
+ const vA = r1.scale(-dt32 * (1.0 / (dt21 * dt31) + this.mu / (12.0 * r1m * r1m * r1m)));
44
+ const vB = r2.scale((dt32 - dt21) * (1.0 / (dt21 * dt32) + this.mu / (12.0 * r2m * r2m * r2m)));
45
+ const vC = r3.scale(dt21 * (1.0 / (dt32 * dt31) + this.mu / (12.0 * r3m * r3m * r3m)));
46
+ const v2 = vA.add(vB).add(vC);
47
+ return new J2000(t2, r2, v2);
48
+ }
49
+ }
50
+ //# sourceMappingURL=HerrickGibbsIOD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HerrickGibbsIOD.js","sourceRoot":"","sources":["../../src/orbit_determination/HerrickGibbsIOD.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAA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AC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACvF,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAkC,CAAC;QAE/D,OAAO,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,59 @@
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
+ import { EpochUTC, J2000, Kilometers, Vector3D } from 'ootk-core';
18
+ export declare class LambertIOD {
19
+ mu: number;
20
+ constructor(mu?: number);
21
+ /**
22
+ * Try to guess the short path argument given an [interceptor] and
23
+ * [target] state.
24
+ * @param interceptor Interceptor
25
+ * @param target Target
26
+ * @returns True if the short path should be used, false otherwise.
27
+ */
28
+ static useShortPath(interceptor: J2000, target: J2000): boolean;
29
+ private static timeOfFlight_;
30
+ /**
31
+ * Attempt to solve output velocity [v1] _(km/s)_ given radii [r1] and
32
+ * [r2] _(canonical)_, sweep angle [dth] _(rad)_, time of flight [tau]
33
+ * _(canonical)_, and number of revolutions _(mRev)_.
34
+ * @param r1 Radius 1
35
+ * @param r2 Radius 2
36
+ * @param dth Sweep angle
37
+ * @param tau Time of flight
38
+ * @param mRev Number of revolutions
39
+ * @param v1 Output velocity
40
+ * @returns True if successful, false otherwise.
41
+ */
42
+ static solve(r1: number, r2: number, dth: number, tau: number, mRev: number, v1: Float64Array): boolean;
43
+ /**
44
+ * Estimate a state vector for inertial position [p1] _(km)_ given the
45
+ * two epoch and positions.
46
+ * @param p1 Position vector 1
47
+ * @param p2 Position vector 2
48
+ * @param t1 Epoch 1
49
+ * @param t2 Epoch 2
50
+ * @param root0 Optional parameters
51
+ * @param root0.posigrade If true, use the positive root (default: true)
52
+ * @param root0.nRev Number of revolutions (default: 0)
53
+ * @returns A [J2000] object with the estimated state vector.
54
+ */
55
+ estimate(p1: Vector3D<Kilometers>, p2: Vector3D<Kilometers>, t1: EpochUTC, t2: EpochUTC, { posigrade, nRev }?: {
56
+ posigrade?: boolean;
57
+ nRev?: number;
58
+ }): J2000 | null;
59
+ }