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,73 @@
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 { DataHandler, DEG2RAD, Earth, ITRF, J2000, Sun, Vector3D, } from 'ootk-core';
18
+ /**
19
+ * Harris-Priester atmospheric drag force model.
20
+ * Atmospheric density model assumes mean solar flux.
21
+ */
22
+ export class AtmosphericDrag {
23
+ mass;
24
+ area;
25
+ dragCoeff;
26
+ cosine;
27
+ constructor(mass, area, dragCoeff, cosine) {
28
+ this.mass = mass;
29
+ this.area = area;
30
+ this.dragCoeff = dragCoeff;
31
+ this.cosine = cosine;
32
+ }
33
+ static _getHPDensity(state, n) {
34
+ const hpa = DataHandler.getInstance().getHpAtmosphere(state.height);
35
+ if (hpa === null) {
36
+ return 0.0;
37
+ }
38
+ const sunPos = Sun.positionApparent(state.epoch);
39
+ const sunVec = new J2000(state.epoch, sunPos, Vector3D.origin).toITRF().position.normalize();
40
+ const bulVec = sunVec.rotZ(-30.0 * DEG2RAD);
41
+ const cosPsi = bulVec.normalize().dot(state.position.normalize());
42
+ const c2Psi2 = 0.5 * (1.0 + cosPsi);
43
+ const cPsi2 = Math.sqrt(c2Psi2);
44
+ const cosPow = cPsi2 > 1e-12 ? c2Psi2 * cPsi2 ** (n - 2) : 0.0;
45
+ const altitude = hpa.height;
46
+ const [h0, min0, max0] = hpa.hp0;
47
+ const [h1, min1, max1] = hpa.hp1;
48
+ const dH = (h0 - altitude) / (h0 - h1);
49
+ const rhoMin = min0 * (min1 / min0) ** dH;
50
+ if (cosPow === 0) {
51
+ return rhoMin;
52
+ }
53
+ const rhoMax = max0 * (max1 / max0) ** dH;
54
+ return rhoMin + (rhoMax - rhoMin) * cosPow;
55
+ }
56
+ acceleration(state) {
57
+ const itrfState = state.toITRF();
58
+ const density = AtmosphericDrag._getHPDensity(itrfState, this.cosine);
59
+ if (density === 0) {
60
+ return Vector3D.origin;
61
+ }
62
+ const rotation = new ITRF(state.epoch,
63
+ // TODO: #26 This is a bit of a hack to get Radians/Second to work with StateVector class
64
+ Earth.rotation, Vector3D.origin).toJ2000().position;
65
+ // TODO: #26 This is a bit of a hack to get Radians/Second to work with StateVector class
66
+ const vRel = state.velocity.subtract(rotation.cross(state.position))
67
+ .scale(1000.0);
68
+ const vm = vRel.magnitude();
69
+ const fScale = -0.5 * density * ((this.dragCoeff * this.area) / this.mass) * vm;
70
+ return vRel.scale(fScale / 1000.0);
71
+ }
72
+ }
73
+ //# sourceMappingURL=AtmosphericDrag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AtmosphericDrag.js","sourceRoot":"","sources":["../../src/force/AtmosphericDrag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EAIL,GAAG,EACH,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B,IAAI,CAAS;IACb,IAAI,CAAS;IACb,SAAS,CAAS;IAClB,MAAM,CAAS;IAEf,YAAY,IAAY,EAAE,IAAY,EAAE,SAAiB,EAAE,MAAc;QACvE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAW,EAAE,CAAS;QACjD,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEpE,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,OAAO,GAAG,CAAC;SACZ;QACD,MAAM,MAAM,GAAG,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,IAAI,KAAK,CACtB,KAAK,CAAC,KAAK,EACX,MAAM,EACN,QAAQ,CAAC,MAAuC,CACjD,CAAC,MA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,EAAE,CAAC;QACjC,MAAM,OAAO,GAAG,eAAe,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAEtE,IAAI,OAAO,KAAK,CAAC,EAAE;YACjB,OAAO,QAAQ,CAAC,MAAM,CAAC;SACxB;QACD,MAAM,QAAQ,GAAG,IAAI,IAAI,CACvB,KAAK,CAAC,KAAK;QACX,yFAAyF;QACzF,KAAK,CAAC,QAA2C,EACjD,QAAQ,CAAC,MAAuC,CACjD,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;QACrB,yFAAyF;QACzF,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAA6C,CAAC;aAC7G,KAAK,CAAC,MAA6B,CAAC,CAAC;QACxC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAEhF,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,27 @@
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 { J2000, Vector3D } from 'ootk-core';
18
+ import { Force } from './Force';
19
+ export declare class EarthGravity implements Force {
20
+ degree: number;
21
+ order: number;
22
+ _asphericalFlag: boolean;
23
+ constructor(degree: number, order: number);
24
+ _spherical(state: J2000): Vector3D;
25
+ _aspherical(state: J2000): Vector3D;
26
+ acceleration(state: J2000): Vector3D;
27
+ }
@@ -0,0 +1,117 @@
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 { DataHandler, Earth, ITRF, Vector3D } from 'ootk-core';
18
+ // / tesseral geopotential perturbations.
19
+ export class EarthGravity {
20
+ degree;
21
+ order;
22
+ _asphericalFlag;
23
+ constructor(degree, order) {
24
+ this.degree = Math.min(Math.max(degree, 0), 36);
25
+ this.order = Math.min(Math.max(order, 0), 36);
26
+ this._asphericalFlag = degree >= 2;
27
+ }
28
+ _spherical(state) {
29
+ const rMag = state.position.magnitude();
30
+ return state.position.scale(-Earth.mu / (rMag * rMag * rMag));
31
+ }
32
+ // eslint-disable-next-line max-statements
33
+ _aspherical(state) {
34
+ const posEcef = state.toITRF().position;
35
+ const ri = 1.0 / posEcef.magnitude();
36
+ const xor = posEcef.x * ri;
37
+ const yor = posEcef.y * ri;
38
+ const zor = posEcef.z * ri;
39
+ const ep = zor;
40
+ const reor = Earth.radiusEquator * ri;
41
+ let reorn = reor;
42
+ const muor2 = Earth.mu * ri * ri;
43
+ let sumH = 0.0;
44
+ let sumGm = 0.0;
45
+ let sumJ = 0.0;
46
+ let sumK = 0.0;
47
+ const cTil = new Float64Array(this.order + 4);
48
+ const sTil = new Float64Array(this.order + 4);
49
+ const pN = new Float64Array(this.order + 4);
50
+ const pNm1 = new Float64Array(this.order + 4);
51
+ const pNm2 = new Float64Array(this.order + 4);
52
+ pNm2[0] = 1.0;
53
+ pNm1[0] = ep;
54
+ pNm1[1] = 1.0;
55
+ cTil[0] = 1.0;
56
+ cTil[1] = xor;
57
+ sTil[1] = yor;
58
+ const dh = DataHandler.getInstance();
59
+ for (let n = 2, nm1 = 1, nm2 = 0, np1 = 3; n <= this.degree; nm2++, nm1++, n++, np1++) {
60
+ const twonm1 = 2.0 * n - 1.0;
61
+ reorn *= reor;
62
+ const cN0 = dh.getEgm96Coeffs(n, 0)[2];
63
+ pN[0] = (twonm1 * ep * pNm1[0] - nm1 * pNm2[0]) / n;
64
+ pN[1] = pNm2[1] + twonm1 * pNm1[0];
65
+ pN[2] = pNm2[2] + twonm1 * pNm1[1];
66
+ let sumHn = pN[1] * cN0;
67
+ let sumGmn = pN[0] * cN0 * np1;
68
+ if (this.order > 0) {
69
+ let sumJn = 0.0;
70
+ let sumKn = 0.0;
71
+ cTil[n] = cTil[1] * cTil[nm1] - sTil[1] * sTil[nm1];
72
+ sTil[n] = sTil[1] * cTil[nm1] + cTil[1] * sTil[nm1];
73
+ const lim = n < this.order ? n : this.order;
74
+ for (let m = 1, mm1 = 0, mm2 = -1, mp1 = 2, mp2 = 3; m <= lim; mm2++, mm1++, m++, mp1++, mp2++) {
75
+ pN[mp1] = pNm2[mp1] + twonm1 * pNm1[m];
76
+ const dm = m;
77
+ const npmp1 = n + mp1;
78
+ const pNm = pN[m];
79
+ const pNmp1 = pN[mp1];
80
+ const coefs = dh.getEgm96Coeffs(n, m);
81
+ const cNm = coefs[2];
82
+ const sNm = coefs[3];
83
+ const mxPnm = dm * pNm;
84
+ const bNmtil = cNm * cTil[m] + sNm * sTil[m];
85
+ const pNmBnm = pNm * bNmtil;
86
+ const bNmtm1 = cNm * cTil[mm1] + sNm * sTil[mm1];
87
+ const aNmtm1 = cNm * sTil[mm1] - sNm * cTil[mm1];
88
+ sumHn += pNmp1 * bNmtil;
89
+ sumGmn += npmp1 * pNmBnm;
90
+ sumJn += mxPnm * bNmtm1;
91
+ sumKn -= mxPnm * aNmtm1;
92
+ }
93
+ sumJ += reorn * sumJn;
94
+ sumK += reorn * sumKn;
95
+ }
96
+ sumH += reorn * sumHn;
97
+ sumGm += reorn * sumGmn;
98
+ if (n < this.degree) {
99
+ for (let i = 0; i <= n; i++) {
100
+ pNm2[i] = pNm1[i];
101
+ pNm1[i] = pN[i];
102
+ }
103
+ }
104
+ }
105
+ const lambda = sumGm + ep * sumH;
106
+ const g = new Vector3D(-muor2 * (lambda * xor - sumJ), -muor2 * (lambda * yor - sumK), -muor2 * (lambda * zor - sumH));
107
+ return new ITRF(state.epoch, g, Vector3D.origin).toJ2000().position;
108
+ }
109
+ acceleration(state) {
110
+ let accVec = this._spherical(state);
111
+ if (this._asphericalFlag) {
112
+ accVec = accVec.add(this._aspherical(state));
113
+ }
114
+ return accVec;
115
+ }
116
+ }
117
+ //# sourceMappingURL=EarthGravity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EarthGravity.js","sourceRoot":"","sources":["../../src/force/EarthGravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAA0C,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMvG,yCAAyC;AACzC,MAAM,OAAO,YAAY;IACvB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,eAAe,CAAU;IAEzB,YAAY,MAAc,EAAE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working
4
- * with satellites and other orbital objects.
5
- *
2
+ * @author @thkruz Theodore Kruczek
6
3
  * @license AGPL-3.0-or-later
7
- * @Copyright (c) 2020-2023 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
8
5
  *
9
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
10
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -17,9 +14,13 @@
17
14
  * You should have received a copy of the GNU Affero General Public License along with
18
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
19
16
  */
20
- export { Sgp4 } from './sgp4/sgp4';
21
- export { Transforms } from './transforms/transforms';
22
- export { Utils } from './utils/utils';
23
- export { Tle } from './tle/tle';
24
- export * from './objects/index';
25
- export * from './types/types';
17
+ import { J2000, Vector3D } from 'ootk-core';
18
+ export declare abstract class Force {
19
+ /**
20
+ * Calculate the acceleration due to the perturbing force on a given
21
+ * state vector.
22
+ * @param state The state vector.
23
+ * @throws If the force cannot be calculated.
24
+ */
25
+ acceleration(state: J2000): Vector3D;
26
+ }
@@ -0,0 +1,31 @@
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
+ /* eslint-disable @typescript-eslint/no-unused-vars */
18
+ /* eslint-disable class-methods-use-this */
19
+ // / Base class for perturbation forces.
20
+ export class Force {
21
+ /**
22
+ * Calculate the acceleration due to the perturbing force on a given
23
+ * state vector.
24
+ * @param state The state vector.
25
+ * @throws If the force cannot be calculated.
26
+ */
27
+ acceleration(state) {
28
+ throw Error('Not implemented');
29
+ }
30
+ }
31
+ //# sourceMappingURL=Force.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Force.js","sourceRoot":"","sources":["../../src/force/Force.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,sDAAsD;AACtD,2CAA2C;AAE3C,wCAAwC;AACxC,MAAM,OAAgB,KAAK;IACzB;;;;;OAKG;IACH,YAAY,CAAC,KAAY;QACvB,MAAM,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACjC,CAAC;CACF"}
@@ -0,0 +1,37 @@
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 { J2000, Vector, Vector3D } from 'ootk-core';
18
+ import { Thrust } from './Thrust';
19
+ export declare class ForceModel {
20
+ private _centralGravity?;
21
+ private _thirdBodyGravity?;
22
+ private _solarRadiationPressure?;
23
+ private _atmosphericDrag?;
24
+ private _maneuverThrust;
25
+ setGravity(mu?: number): this;
26
+ setEarthGravity(degree: number, order: number): void;
27
+ setThirdBodyGravity({ moon, sun }: {
28
+ moon?: boolean | undefined;
29
+ sun?: boolean | undefined;
30
+ }): void;
31
+ setSolarRadiationPressure(mass: number, area: number, coeff?: number): void;
32
+ setAtmosphericDrag(mass: number, area: number, coeff?: number, cosine?: number): void;
33
+ loadManeuver(maneuver: Thrust): void;
34
+ clearManeuver(): void;
35
+ acceleration(state: J2000): Vector3D;
36
+ derivative(state: J2000): Vector;
37
+ }
@@ -0,0 +1,75 @@
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, Vector3D } from 'ootk-core';
18
+ import { AtmosphericDrag } from './AtmosphericDrag';
19
+ import { EarthGravity } from './EarthGravity';
20
+ import { Gravity } from './Gravity';
21
+ import { SolarRadiationPressure } from './SolarRadiationPressure';
22
+ import { ThirdBodyGravity } from './ThirdBodyGravity';
23
+ // / Force model for spacecraft propagation.
24
+ export class ForceModel {
25
+ _centralGravity;
26
+ _thirdBodyGravity;
27
+ _solarRadiationPressure;
28
+ _atmosphericDrag;
29
+ _maneuverThrust = null;
30
+ setGravity(mu = Earth.mu) {
31
+ this._centralGravity = new Gravity(mu);
32
+ return this;
33
+ }
34
+ setEarthGravity(degree, order) {
35
+ this._centralGravity = new EarthGravity(degree, order);
36
+ }
37
+ setThirdBodyGravity({ moon = false, sun = false }) {
38
+ this._thirdBodyGravity = new ThirdBodyGravity(moon, sun);
39
+ }
40
+ setSolarRadiationPressure(mass, area, coeff = 1.2) {
41
+ this._solarRadiationPressure = new SolarRadiationPressure(mass, area, coeff);
42
+ }
43
+ setAtmosphericDrag(mass, area, coeff = 2.2, cosine = 4) {
44
+ this._atmosphericDrag = new AtmosphericDrag(mass, area, coeff, cosine);
45
+ }
46
+ loadManeuver(maneuver) {
47
+ this._maneuverThrust = maneuver;
48
+ }
49
+ clearManeuver() {
50
+ this._maneuverThrust = null;
51
+ }
52
+ acceleration(state) {
53
+ let accVec = Vector3D.origin;
54
+ if (this._centralGravity) {
55
+ accVec = accVec.add(this._centralGravity.acceleration(state));
56
+ }
57
+ if (this._thirdBodyGravity) {
58
+ accVec = accVec.add(this._thirdBodyGravity.acceleration(state));
59
+ }
60
+ if (this._solarRadiationPressure) {
61
+ accVec = accVec.add(this._solarRadiationPressure.acceleration(state));
62
+ }
63
+ if (this._atmosphericDrag) {
64
+ accVec = accVec.add(this._atmosphericDrag.acceleration(state));
65
+ }
66
+ if (this._maneuverThrust) {
67
+ accVec = accVec.add(this._maneuverThrust.acceleration(state));
68
+ }
69
+ return accVec;
70
+ }
71
+ derivative(state) {
72
+ return state.velocity.join(this.acceleration(state));
73
+ }
74
+ }
75
+ //# sourceMappingURL=ForceModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForceModel.js","sourceRoot":"","sources":["../../src/force/ForceModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAiB,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,4CAA4C;AA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AC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;SAC/D;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;SACjE;QACD,IAAI,IAAI,CAAC,uBAAuB,EAAE;YAChC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;SACvE;QACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;SAChE;QACD,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;SAC/D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,KAAY;QACrB,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,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 { J2000, Vector3D } from 'ootk-core';
18
+ import { Force } from './Force';
19
+ export declare class Gravity implements Force {
20
+ mu: number;
21
+ /**
22
+ * Create a new [Gravity] object with optional gravitational
23
+ * @param mu Gravitational parameter _(km²/s³)_.
24
+ */
25
+ constructor(mu?: number);
26
+ /**
27
+ * Calculates the gravitational force in spherical coordinates.
28
+ * @param state The J2000 state containing the position and velocity vectors.
29
+ * @returns The gravitational force vector in spherical coordinates.
30
+ */
31
+ private _spherical;
32
+ /**
33
+ * Calculates the acceleration due to gravity at a given state.
34
+ * @param state The J2000 state at which to calculate the acceleration.
35
+ * @returns The acceleration vector.
36
+ */
37
+ acceleration(state: J2000): Vector3D;
38
+ }
@@ -0,0 +1,47 @@
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 } from 'ootk-core';
18
+ // / Simple central-body gravity model.
19
+ export class Gravity {
20
+ // / Gravitational parameter _(km²/s³)_.
21
+ mu;
22
+ /**
23
+ * Create a new [Gravity] object with optional gravitational
24
+ * @param mu Gravitational parameter _(km²/s³)_.
25
+ */
26
+ constructor(mu = Earth.mu) {
27
+ this.mu = mu;
28
+ }
29
+ /**
30
+ * Calculates the gravitational force in spherical coordinates.
31
+ * @param state The J2000 state containing the position and velocity vectors.
32
+ * @returns The gravitational force vector in spherical coordinates.
33
+ */
34
+ _spherical(state) {
35
+ const rMag = state.position.magnitude();
36
+ return state.position.scale(-this.mu / (rMag * rMag * rMag));
37
+ }
38
+ /**
39
+ * Calculates the acceleration due to gravity at a given state.
40
+ * @param state The J2000 state at which to calculate the acceleration.
41
+ * @returns The acceleration vector.
42
+ */
43
+ acceleration(state) {
44
+ return this._spherical(state);
45
+ }
46
+ }
47
+ //# sourceMappingURL=Gravity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gravity.js","sourceRoot":"","sources":["../../src/force/Gravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAmB,MAAM,WAAW,CAAC;AAGnD,uCAAuC;AACvC,MAAM,OAAO,OAAO;IAClB,wCAAwC;IACxC,EAAE,CAAS;IAEX;;;OAGG;IACH,YAAY,KAAa,KAAK,CAAC,EAAE;QAC/B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED;;;;OAIG;IACK,UAAU,CAAC,KAAY;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QAExC,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,KAAY;QACvB,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF"}
@@ -1,10 +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
- *
2
+ * @author @thkruz Theodore Kruczek
6
3
  * @license AGPL-3.0-or-later
7
- * @Copyright (c) 2020-2023 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
8
5
  *
9
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
10
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -17,9 +14,13 @@
17
14
  * You should have received a copy of the GNU Affero General Public License along with
18
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
19
16
  */
20
- export { Sgp4 } from './sgp4/sgp4';
21
- export { Transforms } from './transforms/transforms';
22
- export { Utils } from './utils/utils';
23
- export { Tle } from './tle/tle';
24
- export * from './objects/index';
25
- export * from './types/types';
17
+ import { J2000, Vector3D } from 'ootk-core';
18
+ import { Force } from './Force';
19
+ export declare class SolarRadiationPressure extends Force {
20
+ mass: number;
21
+ area: number;
22
+ reflectCoeff: number;
23
+ constructor(mass: number, area: number, reflectCoeff: number);
24
+ private static readonly _kRef;
25
+ acceleration(state: J2000): Vector3D;
26
+ }
@@ -0,0 +1,44 @@
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 { astronomicalUnit, Sun } from 'ootk-core';
18
+ import { Force } from './Force';
19
+ // / Solar radiation pressure model.
20
+ export class SolarRadiationPressure extends Force {
21
+ mass;
22
+ area;
23
+ reflectCoeff;
24
+ // / Create a new [SolarRadiationPressure] object.
25
+ constructor(mass, area, reflectCoeff) {
26
+ super();
27
+ this.mass = mass;
28
+ this.area = area;
29
+ this.reflectCoeff = reflectCoeff;
30
+ }
31
+ // / Solar pressure _(N/m²)_;
32
+ static _kRef = 4.56e-6 * astronomicalUnit ** 2;
33
+ acceleration(state) {
34
+ const rSun = Sun.positionApparent(state.epoch);
35
+ const r = state.position.subtract(rSun);
36
+ const rMag = r.magnitude();
37
+ const r2 = rMag * rMag;
38
+ const ratio = Sun.lightingRatio(state.position, rSun);
39
+ const p = (ratio * SolarRadiationPressure._kRef) / r2;
40
+ const flux = r.scale(p / rMag);
41
+ return flux.scale(((this.area * this.reflectCoeff) / this.mass) * 1e-3);
42
+ }
43
+ }
44
+ //# sourceMappingURL=SolarRadiationPressure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolarRadiationPressure.js","sourceRoot":"","sources":["../../src/force/SolarRadiationPressure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,gBAAgB,EAAS,GAAG,EAAY,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,oCAAoC;AACpC,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAE5B;IAAqB;IAAqB;IAD7D,kDAAkD;IAClD,YAAmB,IAAY,EAAS,IAAY,EAAS,YAAoB;QAC/E,KAAK,EAAE,CAAC;QADS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,iBAAY,GAAZ,YAAY,CAAQ;IAEjF,CAAC;IAED,6BAA6B;IACrB,MAAM,CAAU,KAAK,GAAW,OAAO,GAAG,gBAAgB,IAAI,CAAC,CAAC;IAExE,YAAY,CAAC,KAAY;QACvB,MAAM,IAAI,GAAG,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;QACvB,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QACtD,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1E,CAAC"}
@@ -0,0 +1,26 @@
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 { J2000, Vector3D } from 'ootk-core';
18
+ import { Force } from './Force';
19
+ export declare class ThirdBodyGravity implements Force {
20
+ moon: boolean;
21
+ sun: boolean;
22
+ constructor(moon?: boolean, sun?: boolean);
23
+ private static _moonGravity;
24
+ private static _sunGravity;
25
+ acceleration(state: J2000): Vector3D;
26
+ }