ootk 5.1.0 → 6.0.0-rc.2

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 (599) hide show
  1. package/.claude/PROMPT.md +13 -0
  2. package/.claude/hooks/post-tool-use.ts +33 -0
  3. package/.claude/hooks/user-prompt-submit.ts +138 -0
  4. package/.claude/settings.local.json +13 -0
  5. package/.claude/skill-rules.json +11 -0
  6. package/.claude/skills/ootk-dev/SKILL.md +16 -0
  7. package/ADVANCED_FEATURES_GUIDE.md +1025 -0
  8. package/CHANGELOG.md +42 -3
  9. package/README.md +77 -45
  10. package/dist/body/Celestial.d.ts +2 -2
  11. package/dist/body/Celestial.js +2 -2
  12. package/dist/body/Celestial.js.map +1 -1
  13. package/dist/body/Earth.d.ts +4 -4
  14. package/dist/body/Earth.js +2 -2
  15. package/dist/body/Earth.js.map +1 -1
  16. package/dist/body/Moon.d.ts +3 -3
  17. package/dist/body/Moon.js +7 -7
  18. package/dist/body/Moon.js.map +1 -1
  19. package/dist/body/NutationAngles.d.ts +2 -2
  20. package/dist/body/NutationAngles.js +1 -1
  21. package/dist/body/PrecessionAngles.d.ts +2 -2
  22. package/dist/body/PrecessionAngles.js +1 -1
  23. package/dist/body/Sun.d.ts +2 -2
  24. package/dist/body/Sun.js +3 -3
  25. package/dist/body/Sun.js.map +1 -1
  26. package/dist/body/index.d.ts +5 -5
  27. package/dist/body/index.js +5 -5
  28. package/dist/body/index.js.map +1 -1
  29. package/dist/conjunction/ConjunctionAssessment.d.ts +156 -0
  30. package/dist/conjunction/ConjunctionAssessment.js +281 -0
  31. package/dist/conjunction/ConjunctionAssessment.js.map +1 -0
  32. package/dist/conjunction/ConjunctionEvent.d.ts +104 -0
  33. package/dist/conjunction/ConjunctionEvent.js +156 -0
  34. package/dist/conjunction/ConjunctionEvent.js.map +1 -0
  35. package/dist/conjunction/ProbabilityOfCollision.d.ts +102 -0
  36. package/dist/conjunction/ProbabilityOfCollision.js +240 -0
  37. package/dist/conjunction/ProbabilityOfCollision.js.map +1 -0
  38. package/dist/conjunction/index.d.ts +19 -0
  39. package/dist/conjunction/index.js +20 -0
  40. package/dist/conjunction/index.js.map +1 -0
  41. package/dist/coordinate/ClassicalElements.d.ts +7 -7
  42. package/dist/coordinate/ClassicalElements.js +7 -7
  43. package/dist/coordinate/ClassicalElements.js.map +1 -1
  44. package/dist/coordinate/EquinoctialElements.d.ts +5 -5
  45. package/dist/coordinate/EquinoctialElements.js +4 -4
  46. package/dist/coordinate/EquinoctialElements.js.map +1 -1
  47. package/dist/coordinate/FormatTle.d.ts +2 -2
  48. package/dist/coordinate/FormatTle.js +2 -2
  49. package/dist/coordinate/FormatTle.js.map +1 -1
  50. package/dist/coordinate/Geodetic.d.ts +4 -4
  51. package/dist/coordinate/Geodetic.js +7 -7
  52. package/dist/coordinate/Geodetic.js.map +1 -1
  53. package/dist/coordinate/Hill.d.ts +4 -4
  54. package/dist/coordinate/Hill.js +3 -3
  55. package/dist/coordinate/Hill.js.map +1 -1
  56. package/dist/coordinate/ITRF.d.ts +5 -5
  57. package/dist/coordinate/ITRF.js +6 -5
  58. package/dist/coordinate/ITRF.js.map +1 -1
  59. package/dist/coordinate/J2000.d.ts +5 -5
  60. package/dist/coordinate/J2000.js +5 -5
  61. package/dist/coordinate/J2000.js.map +1 -1
  62. package/dist/coordinate/RIC.d.ts +4 -4
  63. package/dist/coordinate/RIC.js +3 -3
  64. package/dist/coordinate/RIC.js.map +1 -1
  65. package/dist/coordinate/RelativeState.d.ts +5 -5
  66. package/dist/coordinate/RelativeState.js +2 -2
  67. package/dist/coordinate/RelativeState.js.map +1 -1
  68. package/dist/coordinate/StateVector.d.ts +2 -2
  69. package/dist/coordinate/StateVector.js +2 -2
  70. package/dist/coordinate/StateVector.js.map +1 -1
  71. package/dist/coordinate/TEME.d.ts +4 -4
  72. package/dist/coordinate/TEME.js +4 -4
  73. package/dist/coordinate/TEME.js.map +1 -1
  74. package/dist/coordinate/Tle.d.ts +5 -5
  75. package/dist/coordinate/Tle.js +9 -9
  76. package/dist/coordinate/Tle.js.map +1 -1
  77. package/dist/coordinate/index.d.ts +12 -12
  78. package/dist/coordinate/index.js +12 -12
  79. package/dist/coordinate/index.js.map +1 -1
  80. package/dist/coordinate/tle-format-data.d.ts +1 -1
  81. package/dist/coordinate/tle-format-data.js +1 -1
  82. package/dist/covariance/CovarianceSample.d.ts +5 -5
  83. package/dist/covariance/CovarianceSample.js +5 -5
  84. package/dist/covariance/CovarianceSample.js.map +1 -1
  85. package/dist/covariance/StateCovariance.d.ts +2 -2
  86. package/dist/covariance/StateCovariance.js +2 -2
  87. package/dist/covariance/StateCovariance.js.map +1 -1
  88. package/dist/covariance/index.d.ts +2 -2
  89. package/dist/covariance/index.js +2 -2
  90. package/dist/covariance/index.js.map +1 -1
  91. package/dist/data/DataHandler.d.ts +4 -4
  92. package/dist/data/DataHandler.js +5 -5
  93. package/dist/data/DataHandler.js.map +1 -1
  94. package/dist/data/values/Egm96Data.d.ts +1 -1
  95. package/dist/data/values/Egm96Data.js +3 -3
  96. package/dist/data/values/Egm96Data.js.map +1 -1
  97. package/dist/data/values/HpAtmosphereData.d.ts +2 -2
  98. package/dist/data/values/HpAtmosphereData.js +3 -3
  99. package/dist/data/values/HpAtmosphereData.js.map +1 -1
  100. package/dist/data/values/HpAtmosphereResult.d.ts +2 -2
  101. package/dist/data/values/HpAtmosphereResult.js +1 -1
  102. package/dist/data/values/Iau1980Data.d.ts +1 -1
  103. package/dist/data/values/Iau1980Data.js +2 -2
  104. package/dist/data/values/Iau1980Data.js.map +1 -1
  105. package/dist/data/values/LeapSecond.d.ts +1 -1
  106. package/dist/data/values/LeapSecond.js +1 -1
  107. package/dist/data/values/LeapSecondData.d.ts +2 -2
  108. package/dist/data/values/LeapSecondData.js +2 -2
  109. package/dist/data/values/LeapSecondData.js.map +1 -1
  110. package/dist/data/values/egm96.d.ts +2 -2
  111. package/dist/data/values/egm96.js +1 -1
  112. package/dist/data/values/hpAtmosphere.d.ts +2 -2
  113. package/dist/data/values/hpAtmosphere.js +1 -1
  114. package/dist/data/values/iau1980.d.ts +2 -2
  115. package/dist/data/values/iau1980.js +1 -1
  116. package/dist/enums/AngularDiameterMethod.d.ts +1 -1
  117. package/dist/enums/AngularDiameterMethod.js +1 -1
  118. package/dist/enums/AngularDistanceMethod.d.ts +1 -1
  119. package/dist/enums/AngularDistanceMethod.js +1 -1
  120. package/dist/enums/OrbitRegime.d.ts +1 -1
  121. package/dist/enums/OrbitRegime.js +1 -1
  122. package/dist/enums/PassType.d.ts +1 -1
  123. package/dist/enums/PassType.js +1 -1
  124. package/dist/enums/Sgp4OpsMode.d.ts +1 -1
  125. package/dist/enums/Sgp4OpsMode.js +1 -1
  126. package/dist/enums/index.d.ts +7 -7
  127. package/dist/enums/index.js +7 -7
  128. package/dist/enums/index.js.map +1 -1
  129. package/dist/fetch/horizons-constants.d.ts +43 -0
  130. package/dist/fetch/horizons-constants.js +50 -0
  131. package/dist/fetch/horizons-constants.js.map +1 -0
  132. package/dist/fetch/horizons-interfaces.d.ts +37 -0
  133. package/dist/fetch/horizons-interfaces.js +2 -0
  134. package/dist/fetch/horizons-interfaces.js.map +1 -0
  135. package/dist/fetch/horizons.d.ts +86 -0
  136. package/dist/fetch/horizons.js +237 -0
  137. package/dist/fetch/horizons.js.map +1 -0
  138. package/dist/force/AtmosphericDrag.d.ts +3 -3
  139. package/dist/force/AtmosphericDrag.js +2 -2
  140. package/dist/force/AtmosphericDrag.js.map +1 -1
  141. package/dist/force/EarthGravity.d.ts +3 -3
  142. package/dist/force/EarthGravity.js +2 -2
  143. package/dist/force/EarthGravity.js.map +1 -1
  144. package/dist/force/Force.d.ts +3 -3
  145. package/dist/force/Force.js +1 -10
  146. package/dist/force/Force.js.map +1 -1
  147. package/dist/force/ForceModel.d.ts +3 -3
  148. package/dist/force/ForceModel.js +7 -7
  149. package/dist/force/ForceModel.js.map +1 -1
  150. package/dist/force/Gravity.d.ts +3 -3
  151. package/dist/force/Gravity.js +2 -2
  152. package/dist/force/Gravity.js.map +1 -1
  153. package/dist/force/SolarRadiationPressure.d.ts +3 -3
  154. package/dist/force/SolarRadiationPressure.js +4 -4
  155. package/dist/force/SolarRadiationPressure.js.map +1 -1
  156. package/dist/force/ThirdBodyGravity.d.ts +3 -3
  157. package/dist/force/ThirdBodyGravity.js +2 -2
  158. package/dist/force/ThirdBodyGravity.js.map +1 -1
  159. package/dist/force/Thrust.d.ts +3 -3
  160. package/dist/force/Thrust.js +2 -2
  161. package/dist/force/Thrust.js.map +1 -1
  162. package/dist/force/index.d.ts +1 -1
  163. package/dist/force/index.js +1 -1
  164. package/dist/force/index.js.map +1 -1
  165. package/dist/interfaces/BaseObjectParams.d.ts +2 -2
  166. package/dist/interfaces/BaseObjectParams.js +1 -1
  167. package/dist/interfaces/ClassicalElementsParams.d.ts +2 -2
  168. package/dist/interfaces/ClassicalElementsParams.js +1 -1
  169. package/dist/interfaces/EquinoctialElementsParams.d.ts +2 -2
  170. package/dist/interfaces/EquinoctialElementsParams.js +1 -1
  171. package/dist/interfaces/GroundPositionParams.d.ts +2 -2
  172. package/dist/interfaces/GroundPositionParams.js +1 -1
  173. package/dist/interfaces/RfSensorParams.d.ts +2 -2
  174. package/dist/interfaces/SatelliteParams.d.ts +2 -2
  175. package/dist/interfaces/SensorParams.d.ts +2 -2
  176. package/dist/interfaces/StarObjectParams.d.ts +1 -1
  177. package/dist/interfaces/TimeVariables.d.ts +1 -1
  178. package/dist/interfaces/index.d.ts +9 -9
  179. package/dist/interpolator/ChebyshevCoefficients.d.ts +2 -2
  180. package/dist/interpolator/ChebyshevCoefficients.js +2 -2
  181. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -1
  182. package/dist/interpolator/ChebyshevInterpolator.d.ts +4 -4
  183. package/dist/interpolator/ChebyshevInterpolator.js +3 -3
  184. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -1
  185. package/dist/interpolator/CubicSpline.d.ts +2 -2
  186. package/dist/interpolator/CubicSpline.js +1 -1
  187. package/dist/interpolator/CubicSplineInterpolator.d.ts +4 -4
  188. package/dist/interpolator/CubicSplineInterpolator.js +4 -4
  189. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -1
  190. package/dist/interpolator/FieldInterpolator.d.ts +3 -3
  191. package/dist/interpolator/FieldInterpolator.js +2 -12
  192. package/dist/interpolator/FieldInterpolator.js.map +1 -1
  193. package/dist/interpolator/Interpolator.d.ts +2 -2
  194. package/dist/interpolator/Interpolator.js +2 -2
  195. package/dist/interpolator/Interpolator.js.map +1 -1
  196. package/dist/interpolator/LagrangeInterpolator.d.ts +3 -3
  197. package/dist/interpolator/LagrangeInterpolator.js +3 -3
  198. package/dist/interpolator/LagrangeInterpolator.js.map +1 -1
  199. package/dist/interpolator/StateInterpolator.d.ts +4 -4
  200. package/dist/interpolator/StateInterpolator.js +2 -10
  201. package/dist/interpolator/StateInterpolator.js.map +1 -1
  202. package/dist/interpolator/VerletBlendInterpolator.d.ts +5 -5
  203. package/dist/interpolator/VerletBlendInterpolator.js +5 -5
  204. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -1
  205. package/dist/main.d.ts +20 -20
  206. package/dist/main.js +21 -20
  207. package/dist/main.js.map +1 -1
  208. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +3 -3
  209. package/dist/maneuver/TwoBurnOrbitTransfer.js +3 -3
  210. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -1
  211. package/dist/maneuver/Waypoint.d.ts +5 -5
  212. package/dist/maneuver/Waypoint.js +7 -7
  213. package/dist/maneuver/Waypoint.js.map +1 -1
  214. package/dist/objects/BaseObject.d.ts +3 -3
  215. package/dist/objects/BaseObject.js +2 -2
  216. package/dist/objects/BaseObject.js.map +1 -1
  217. package/dist/objects/DetailedSatellite.d.ts +4 -4
  218. package/dist/objects/DetailedSatellite.js +4 -4
  219. package/dist/objects/DetailedSatellite.js.map +1 -1
  220. package/dist/objects/DetailedSensor.d.ts +5 -5
  221. package/dist/objects/DetailedSensor.js +2 -2
  222. package/dist/objects/DetailedSensor.js.map +1 -1
  223. package/dist/objects/GroundObject.d.ts +4 -4
  224. package/dist/objects/GroundObject.js +3 -3
  225. package/dist/objects/GroundObject.js.map +1 -1
  226. package/dist/objects/LandObject.d.ts +3 -3
  227. package/dist/objects/LandObject.js +2 -2
  228. package/dist/objects/LandObject.js.map +1 -1
  229. package/dist/objects/Marker.d.ts +2 -2
  230. package/dist/objects/Marker.js +2 -2
  231. package/dist/objects/Marker.js.map +1 -1
  232. package/dist/objects/RfSensor.d.ts +2 -2
  233. package/dist/objects/RfSensor.js +2 -2
  234. package/dist/objects/RfSensor.js.map +1 -1
  235. package/dist/objects/Satellite.d.ts +12 -12
  236. package/dist/objects/Satellite.js +14 -14
  237. package/dist/objects/Satellite.js.map +1 -1
  238. package/dist/objects/Sensor.d.ts +6 -6
  239. package/dist/objects/Sensor.js +5 -5
  240. package/dist/objects/Sensor.js.map +1 -1
  241. package/dist/objects/Star.d.ts +3 -3
  242. package/dist/objects/Star.js +3 -3
  243. package/dist/objects/Star.js.map +1 -1
  244. package/dist/objects/index.d.ts +10 -10
  245. package/dist/objects/index.js +10 -10
  246. package/dist/objects/index.js.map +1 -1
  247. package/dist/observation/Observation.d.ts +11 -11
  248. package/dist/observation/Observation.js +1 -52
  249. package/dist/observation/Observation.js.map +1 -1
  250. package/dist/observation/ObservationOptical.d.ts +6 -6
  251. package/dist/observation/ObservationOptical.js +4 -4
  252. package/dist/observation/ObservationOptical.js.map +1 -1
  253. package/dist/observation/ObservationRadar.d.ts +6 -6
  254. package/dist/observation/ObservationRadar.js +4 -4
  255. package/dist/observation/ObservationRadar.js.map +1 -1
  256. package/dist/observation/ObservationUtils.d.ts +2 -2
  257. package/dist/observation/ObservationUtils.js +2 -2
  258. package/dist/observation/ObservationUtils.js.map +1 -1
  259. package/dist/observation/PropagatorPairs.d.ts +2 -2
  260. package/dist/observation/PropagatorPairs.js +1 -1
  261. package/dist/observation/RAE.d.ts +6 -6
  262. package/dist/observation/RAE.js +6 -6
  263. package/dist/observation/RAE.js.map +1 -1
  264. package/dist/observation/RadecGeocentric.d.ts +6 -6
  265. package/dist/observation/RadecGeocentric.js +5 -5
  266. package/dist/observation/RadecGeocentric.js.map +1 -1
  267. package/dist/observation/RadecTopocentric.d.ts +6 -6
  268. package/dist/observation/RadecTopocentric.js +9 -7
  269. package/dist/observation/RadecTopocentric.js.map +1 -1
  270. package/dist/observation/index.d.ts +5 -5
  271. package/dist/observation/index.js +5 -5
  272. package/dist/observation/index.js.map +1 -1
  273. package/dist/operations/BoxMuller.d.ts +2 -2
  274. package/dist/operations/BoxMuller.js +2 -2
  275. package/dist/operations/BoxMuller.js.map +1 -1
  276. package/dist/operations/EulerAngles.d.ts +2 -2
  277. package/dist/operations/EulerAngles.js +2 -2
  278. package/dist/operations/EulerAngles.js.map +1 -1
  279. package/dist/operations/Matrix.d.ts +2 -2
  280. package/dist/operations/Matrix.js +2 -2
  281. package/dist/operations/Matrix.js.map +1 -1
  282. package/dist/operations/Quaternion.d.ts +2 -2
  283. package/dist/operations/Quaternion.js +2 -2
  284. package/dist/operations/Quaternion.js.map +1 -1
  285. package/dist/operations/Random.d.ts +1 -1
  286. package/dist/operations/Random.js +1 -1
  287. package/dist/operations/RandomGaussianSource.d.ts +2 -2
  288. package/dist/operations/RandomGaussianSource.js +3 -3
  289. package/dist/operations/RandomGaussianSource.js.map +1 -1
  290. package/dist/operations/Vector.d.ts +2 -2
  291. package/dist/operations/Vector.js +2 -2
  292. package/dist/operations/Vector.js.map +1 -1
  293. package/dist/operations/Vector3D.d.ts +5 -4
  294. package/dist/operations/Vector3D.js +5 -4
  295. package/dist/operations/Vector3D.js.map +1 -1
  296. package/dist/operations/index.d.ts +4 -4
  297. package/dist/operations/index.js +4 -4
  298. package/dist/operations/index.js.map +1 -1
  299. package/dist/operations/operations.d.ts +5 -5
  300. package/dist/operations/operations.js +5 -5
  301. package/dist/operations/operations.js.map +1 -1
  302. package/dist/optimize/ChebyshevCompressor.d.ts +3 -3
  303. package/dist/optimize/ChebyshevCompressor.js +4 -4
  304. package/dist/optimize/ChebyshevCompressor.js.map +1 -1
  305. package/dist/optimize/DownhillSimplex.d.ts +2 -2
  306. package/dist/optimize/DownhillSimplex.js +2 -2
  307. package/dist/optimize/DownhillSimplex.js.map +1 -1
  308. package/dist/optimize/GoldenSection.d.ts +2 -2
  309. package/dist/optimize/GoldenSection.js +1 -1
  310. package/dist/optimize/PolynomialRegression.d.ts +2 -2
  311. package/dist/optimize/PolynomialRegression.js +4 -4
  312. package/dist/optimize/PolynomialRegression.js.map +1 -1
  313. package/dist/optimize/PolynomicalRegressionResult.d.ts +1 -1
  314. package/dist/optimize/PolynomicalRegressionResult.js +1 -1
  315. package/dist/optimize/SimpleLinearRegression.d.ts +1 -1
  316. package/dist/optimize/SimpleLinearRegression.js +1 -1
  317. package/dist/optimize/SimplexEntry.d.ts +1 -1
  318. package/dist/optimize/SimplexEntry.js +2 -2
  319. package/dist/optimize/SimplexEntry.js.map +1 -1
  320. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +5 -5
  321. package/dist/orbit_determination/BatchLeastSquaresOD.js +8 -8
  322. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -1
  323. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +3 -3
  324. package/dist/orbit_determination/BatchLeastSquaresResult.js +1 -1
  325. package/dist/orbit_determination/GaussIOD.d.ts +98 -0
  326. package/dist/orbit_determination/GaussIOD.js +291 -0
  327. package/dist/orbit_determination/GaussIOD.js.map +1 -0
  328. package/dist/orbit_determination/GibbsIOD.d.ts +2 -2
  329. package/dist/orbit_determination/GibbsIOD.js +4 -4
  330. package/dist/orbit_determination/GibbsIOD.js.map +1 -1
  331. package/dist/orbit_determination/GoodingIOD.d.ts +58 -8
  332. package/dist/orbit_determination/GoodingIOD.js +225 -35
  333. package/dist/orbit_determination/GoodingIOD.js.map +1 -1
  334. package/dist/orbit_determination/HerrickGibbsIOD.d.ts +2 -2
  335. package/dist/orbit_determination/HerrickGibbsIOD.js +2 -2
  336. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -1
  337. package/dist/orbit_determination/LambertIOD.d.ts +2 -2
  338. package/dist/orbit_determination/LambertIOD.js +2 -2
  339. package/dist/orbit_determination/LambertIOD.js.map +1 -1
  340. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +3 -3
  341. package/dist/orbit_determination/ModifiedGoodingIOD.js +8 -8
  342. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -1
  343. package/dist/orbit_determination/index.d.ts +7 -7
  344. package/dist/orbit_determination/index.js +7 -7
  345. package/dist/orbit_determination/index.js.map +1 -1
  346. package/dist/propagator/DormandPrince54Propagator.d.ts +2 -2
  347. package/dist/propagator/DormandPrince54Propagator.js +2 -2
  348. package/dist/propagator/DormandPrince54Propagator.js.map +1 -1
  349. package/dist/propagator/KeplerPropagator.d.ts +6 -6
  350. package/dist/propagator/KeplerPropagator.js +6 -7
  351. package/dist/propagator/KeplerPropagator.js.map +1 -1
  352. package/dist/propagator/Propagator.d.ts +5 -5
  353. package/dist/propagator/Propagator.js +5 -5
  354. package/dist/propagator/Propagator.js.map +1 -1
  355. package/dist/propagator/RkCheckpoint.d.ts +2 -2
  356. package/dist/propagator/RkCheckpoint.js +1 -1
  357. package/dist/propagator/RkResult.d.ts +2 -2
  358. package/dist/propagator/RkResult.js +1 -1
  359. package/dist/propagator/RungeKutta4Propagator.d.ts +6 -6
  360. package/dist/propagator/RungeKutta4Propagator.js +5 -5
  361. package/dist/propagator/RungeKutta4Propagator.js.map +1 -1
  362. package/dist/propagator/RungeKutta89Propagator.d.ts +2 -2
  363. package/dist/propagator/RungeKutta89Propagator.js +2 -2
  364. package/dist/propagator/RungeKutta89Propagator.js.map +1 -1
  365. package/dist/propagator/RungeKuttaAdaptive.d.ts +6 -6
  366. package/dist/propagator/RungeKuttaAdaptive.js +52 -9
  367. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -1
  368. package/dist/propagator/Sgp4Propagator.d.ts +7 -7
  369. package/dist/propagator/Sgp4Propagator.js +4 -4
  370. package/dist/propagator/Sgp4Propagator.js.map +1 -1
  371. package/dist/propagator/index.d.ts +3 -3
  372. package/dist/propagator/index.js +3 -3
  373. package/dist/propagator/index.js.map +1 -1
  374. package/dist/sgp4/index.d.ts +2 -2
  375. package/dist/sgp4/index.js +2 -2
  376. package/dist/sgp4/index.js.map +1 -1
  377. package/dist/sgp4/sgp4.d.ts +3 -3
  378. package/dist/sgp4/sgp4.js +11 -5
  379. package/dist/sgp4/sgp4.js.map +1 -1
  380. package/dist/smoothing/ExponentialSmoothing.d.ts +2 -2
  381. package/dist/smoothing/ExponentialSmoothing.js +1 -1
  382. package/dist/time/Epoch.d.ts +2 -2
  383. package/dist/time/Epoch.js +2 -2
  384. package/dist/time/Epoch.js.map +1 -1
  385. package/dist/time/EpochGPS.d.ts +3 -3
  386. package/dist/time/EpochGPS.js +3 -3
  387. package/dist/time/EpochGPS.js.map +1 -1
  388. package/dist/time/EpochTAI.d.ts +2 -2
  389. package/dist/time/EpochTAI.js +2 -2
  390. package/dist/time/EpochTAI.js.map +1 -1
  391. package/dist/time/EpochTDB.d.ts +2 -2
  392. package/dist/time/EpochTDB.js +2 -2
  393. package/dist/time/EpochTDB.js.map +1 -1
  394. package/dist/time/EpochTT.d.ts +2 -2
  395. package/dist/time/EpochTT.js +2 -2
  396. package/dist/time/EpochTT.js.map +1 -1
  397. package/dist/time/EpochUTC.d.ts +7 -7
  398. package/dist/time/EpochUTC.js +9 -9
  399. package/dist/time/EpochUTC.js.map +1 -1
  400. package/dist/time/EpochWindow.d.ts +2 -2
  401. package/dist/time/EpochWindow.js +1 -1
  402. package/dist/time/TimeStamped.d.ts +2 -2
  403. package/dist/time/TimeStamped.js +1 -1
  404. package/dist/time/index.d.ts +8 -8
  405. package/dist/time/index.js +8 -8
  406. package/dist/time/index.js.map +1 -1
  407. package/dist/transforms/TransformCache.d.ts +1 -1
  408. package/dist/transforms/TransformCache.js +1 -1
  409. package/dist/transforms/conversions.d.ts +2 -2
  410. package/dist/transforms/conversions.js +2 -2
  411. package/dist/transforms/conversions.js.map +1 -1
  412. package/dist/transforms/index.d.ts +2 -2
  413. package/dist/transforms/index.js +2 -2
  414. package/dist/transforms/index.js.map +1 -1
  415. package/dist/transforms/transforms.d.ts +1 -1
  416. package/dist/transforms/transforms.js +1 -1
  417. package/dist/transforms/transforms.js.map +1 -1
  418. package/dist/types/types.d.ts +8 -3
  419. package/dist/types/types.js +6 -1
  420. package/dist/types/types.js.map +1 -1
  421. package/dist/utils/constants.d.ts +2 -2
  422. package/dist/utils/constants.js +1 -1
  423. package/dist/utils/constants.js.map +1 -1
  424. package/dist/utils/create-covariance-from-tle.d.ts +1 -1
  425. package/dist/utils/create-covariance-from-tle.js +1 -1
  426. package/dist/utils/create-covariance-from-tle.js.map +1 -1
  427. package/dist/utils/functions.d.ts +4 -4
  428. package/dist/utils/functions.js +9 -4
  429. package/dist/utils/functions.js.map +1 -1
  430. package/dist/utils/index.d.ts +5 -5
  431. package/dist/utils/index.js +5 -5
  432. package/dist/utils/index.js.map +1 -1
  433. package/dist/utils/jacobian.d.ts +2 -2
  434. package/dist/utils/jacobian.js +1 -1
  435. package/dist/utils/jacobian.js.map +1 -1
  436. package/dist/utils/linearDistance.d.ts +1 -1
  437. package/docs/README.md +132 -0
  438. package/docs/getting-started.md +792 -0
  439. package/docs/lambert-satellite-integration-guide.md +766 -0
  440. package/docs/user-guide.md +1935 -0
  441. package/jest.config.mjs +28 -0
  442. package/package.json +3 -4
  443. package/src/body/Celestial.ts +2 -2
  444. package/src/body/Earth.ts +4 -4
  445. package/src/body/Moon.ts +7 -7
  446. package/src/body/NutationAngles.ts +2 -2
  447. package/src/body/PrecessionAngles.ts +2 -2
  448. package/src/body/Sun.ts +4 -4
  449. package/src/body/index.ts +6 -5
  450. package/src/conjunction/ConjunctionAssessment.ts +417 -0
  451. package/src/conjunction/ConjunctionEvent.ts +149 -0
  452. package/src/conjunction/ProbabilityOfCollision.ts +300 -0
  453. package/src/conjunction/index.ts +24 -0
  454. package/src/coordinate/ClassicalElements.ts +16 -11
  455. package/src/coordinate/EquinoctialElements.ts +7 -7
  456. package/src/coordinate/FormatTle.ts +2 -2
  457. package/src/coordinate/Geodetic.ts +8 -8
  458. package/src/coordinate/Hill.ts +4 -4
  459. package/src/coordinate/ITRF.ts +6 -6
  460. package/src/coordinate/J2000.ts +7 -7
  461. package/src/coordinate/RIC.ts +4 -4
  462. package/src/coordinate/RelativeState.ts +5 -5
  463. package/src/coordinate/StateVector.ts +8 -3
  464. package/src/coordinate/TEME.ts +6 -6
  465. package/src/coordinate/Tle.ts +9 -9
  466. package/src/coordinate/index.ts +13 -12
  467. package/src/coordinate/tle-format-data.ts +1 -1
  468. package/src/covariance/CovarianceSample.ts +13 -13
  469. package/src/covariance/StateCovariance.ts +2 -2
  470. package/src/covariance/index.ts +3 -2
  471. package/src/data/DataHandler.ts +6 -6
  472. package/src/data/values/Egm96Data.ts +3 -3
  473. package/src/data/values/HpAtmosphereData.ts +3 -3
  474. package/src/data/values/HpAtmosphereResult.ts +2 -2
  475. package/src/data/values/Iau1980Data.ts +2 -2
  476. package/src/data/values/LeapSecond.ts +1 -1
  477. package/src/data/values/LeapSecondData.ts +2 -2
  478. package/src/data/values/egm96.ts +2 -2
  479. package/src/data/values/hpAtmosphere.ts +2 -2
  480. package/src/data/values/iau1980.ts +2 -2
  481. package/src/enums/AngularDiameterMethod.ts +1 -1
  482. package/src/enums/AngularDistanceMethod.ts +1 -1
  483. package/src/enums/OrbitRegime.ts +1 -1
  484. package/src/enums/PassType.ts +1 -1
  485. package/src/enums/Sgp4OpsMode.ts +1 -1
  486. package/src/enums/index.ts +8 -7
  487. package/src/fetch/horizons-constants.ts +53 -0
  488. package/src/fetch/horizons-interfaces.ts +38 -0
  489. package/src/fetch/horizons.ts +300 -0
  490. package/src/force/AtmosphericDrag.ts +3 -3
  491. package/src/force/EarthGravity.ts +3 -3
  492. package/src/force/Force.ts +3 -5
  493. package/src/force/ForceModel.ts +9 -9
  494. package/src/force/Gravity.ts +3 -3
  495. package/src/force/SolarRadiationPressure.ts +4 -4
  496. package/src/force/ThirdBodyGravity.ts +3 -3
  497. package/src/force/Thrust.ts +3 -3
  498. package/src/force/index.ts +2 -1
  499. package/src/interfaces/BaseObjectParams.ts +2 -2
  500. package/src/interfaces/ClassicalElementsParams.ts +2 -2
  501. package/src/interfaces/EquinoctialElementsParams.ts +2 -2
  502. package/src/interfaces/GroundPositionParams.ts +2 -2
  503. package/src/interfaces/RfSensorParams.ts +2 -2
  504. package/src/interfaces/SatelliteParams.ts +2 -2
  505. package/src/interfaces/SensorParams.ts +3 -3
  506. package/src/interfaces/StarObjectParams.ts +1 -1
  507. package/src/interfaces/TimeVariables.ts +1 -1
  508. package/src/interfaces/index.ts +10 -9
  509. package/src/interpolator/ChebyshevCoefficients.ts +2 -2
  510. package/src/interpolator/ChebyshevInterpolator.ts +4 -4
  511. package/src/interpolator/CubicSpline.ts +2 -2
  512. package/src/interpolator/CubicSplineInterpolator.ts +4 -4
  513. package/src/interpolator/FieldInterpolator.ts +3 -5
  514. package/src/interpolator/Interpolator.ts +2 -2
  515. package/src/interpolator/LagrangeInterpolator.ts +3 -3
  516. package/src/interpolator/StateInterpolator.ts +4 -6
  517. package/src/interpolator/VerletBlendInterpolator.ts +5 -5
  518. package/src/main.ts +41 -20
  519. package/src/maneuver/TwoBurnOrbitTransfer.ts +3 -3
  520. package/src/maneuver/Waypoint.ts +8 -8
  521. package/src/objects/BaseObject.ts +3 -3
  522. package/src/objects/DetailedSatellite.ts +9 -9
  523. package/src/objects/DetailedSensor.ts +5 -5
  524. package/src/objects/GroundObject.ts +9 -9
  525. package/src/objects/LandObject.ts +3 -3
  526. package/src/objects/Marker.ts +2 -2
  527. package/src/objects/RfSensor.ts +2 -2
  528. package/src/objects/Satellite.ts +21 -21
  529. package/src/objects/Sensor.ts +7 -7
  530. package/src/objects/Star.ts +3 -3
  531. package/src/objects/index.ts +11 -10
  532. package/src/observation/Observation.ts +11 -23
  533. package/src/observation/ObservationOptical.ts +7 -7
  534. package/src/observation/ObservationRadar.ts +7 -7
  535. package/src/observation/ObservationUtils.ts +2 -2
  536. package/src/observation/PropagatorPairs.ts +2 -2
  537. package/src/observation/RAE.ts +9 -9
  538. package/src/observation/RadecGeocentric.ts +9 -9
  539. package/src/observation/RadecTopocentric.ts +13 -10
  540. package/src/observation/index.ts +6 -5
  541. package/src/operations/BoxMuller.ts +2 -2
  542. package/src/operations/EulerAngles.ts +2 -2
  543. package/src/operations/Matrix.ts +2 -2
  544. package/src/operations/Quaternion.ts +2 -2
  545. package/src/operations/Random.ts +1 -1
  546. package/src/operations/RandomGaussianSource.ts +3 -3
  547. package/src/operations/Vector.ts +2 -2
  548. package/src/operations/Vector3D.ts +6 -4
  549. package/src/operations/index.ts +5 -4
  550. package/src/operations/operations.ts +6 -5
  551. package/src/optimize/ChebyshevCompressor.ts +5 -5
  552. package/src/optimize/DownhillSimplex.ts +2 -2
  553. package/src/optimize/GoldenSection.ts +2 -2
  554. package/src/optimize/PolynomialRegression.ts +4 -4
  555. package/src/optimize/PolynomicalRegressionResult.ts +1 -1
  556. package/src/optimize/SimpleLinearRegression.ts +1 -1
  557. package/src/optimize/SimplexEntry.ts +2 -2
  558. package/src/orbit_determination/BatchLeastSquaresOD.ts +10 -10
  559. package/src/orbit_determination/BatchLeastSquaresResult.ts +3 -3
  560. package/src/orbit_determination/GaussIOD.ts +393 -0
  561. package/src/orbit_determination/GibbsIOD.ts +4 -4
  562. package/src/orbit_determination/GoodingIOD.ts +458 -160
  563. package/src/orbit_determination/HerrickGibbsIOD.ts +2 -2
  564. package/src/orbit_determination/LambertIOD.ts +2 -2
  565. package/src/orbit_determination/ModifiedGoodingIOD.ts +33 -22
  566. package/src/orbit_determination/index.ts +8 -7
  567. package/src/propagator/DormandPrince54Propagator.ts +2 -2
  568. package/src/propagator/KeplerPropagator.ts +7 -8
  569. package/src/propagator/Propagator.ts +6 -6
  570. package/src/propagator/RkCheckpoint.ts +2 -2
  571. package/src/propagator/RkResult.ts +2 -2
  572. package/src/propagator/RungeKutta4Propagator.ts +6 -6
  573. package/src/propagator/RungeKutta89Propagator.ts +2 -2
  574. package/src/propagator/RungeKuttaAdaptive.ts +62 -12
  575. package/src/propagator/Sgp4Propagator.ts +7 -7
  576. package/src/propagator/index.ts +4 -3
  577. package/src/sgp4/index.ts +3 -2
  578. package/src/sgp4/sgp4.ts +6 -6
  579. package/src/smoothing/ExponentialSmoothing.ts +2 -2
  580. package/src/time/Epoch.ts +3 -3
  581. package/src/time/EpochGPS.ts +5 -5
  582. package/src/time/EpochTAI.ts +2 -2
  583. package/src/time/EpochTDB.ts +2 -2
  584. package/src/time/EpochTT.ts +2 -2
  585. package/src/time/EpochUTC.ts +10 -10
  586. package/src/time/EpochWindow.ts +2 -2
  587. package/src/time/TimeStamped.ts +2 -2
  588. package/src/time/index.ts +9 -8
  589. package/src/transforms/TransformCache.ts +1 -1
  590. package/src/transforms/conversions.ts +2 -2
  591. package/src/transforms/index.ts +3 -2
  592. package/src/transforms/transforms.ts +4 -4
  593. package/src/types/types.ts +8 -3
  594. package/src/utils/constants.ts +2 -2
  595. package/src/utils/create-covariance-from-tle.ts +1 -1
  596. package/src/utils/functions.ts +10 -5
  597. package/src/utils/index.ts +6 -5
  598. package/src/utils/jacobian.ts +2 -2
  599. package/src/utils/linearDistance.ts +1 -1
@@ -0,0 +1,1025 @@
1
+ # OOTK Advanced Features Guide
2
+
3
+ ## Beyond SGP4: Unlocking the Full Power of OOTK
4
+
5
+ While OOTK provides excellent SGP4 propagation capabilities, the library offers a comprehensive suite of advanced orbital mechanics features that go far beyond simple TLE-based propagation. This guide showcases the unique capabilities that make OOTK a complete orbital mechanics toolkit.
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ 1. [High-Fidelity Numerical Propagation](#1-high-fidelity-numerical-propagation)
12
+ 2. [Initial Orbit Determination (IOD)](#2-initial-orbit-determination-iod)
13
+ 3. [Sensor Operations & Pass Prediction](#3-sensor-operations--pass-prediction)
14
+ 4. [Astronomical Calculations](#4-astronomical-calculations)
15
+ 5. [Advanced Coordinate Transformations](#5-advanced-coordinate-transformations)
16
+ 6. [Force Modeling](#6-force-modeling)
17
+ 7. [Maneuver Planning & Optimization](#7-maneuver-planning--optimization)
18
+ 8. [Covariance & Uncertainty Analysis](#8-covariance--uncertainty-analysis)
19
+ 9. [Multiple Time Systems](#9-multiple-time-systems)
20
+ 10. [Relative Motion Analysis](#10-relative-motion-analysis)
21
+
22
+ ---
23
+
24
+ ## 1. High-Fidelity Numerical Propagation
25
+
26
+ OOTK includes multiple numerical integrators for high-precision orbit propagation with customizable force models.
27
+
28
+ ### Available Propagators
29
+
30
+ - **KeplerPropagator** - Two-body Keplerian motion (fastest, ideal for short arcs)
31
+ - **RungeKutta4Propagator** - 4th order Runge-Kutta (good balance of speed/accuracy)
32
+ - **RungeKutta89Propagator** - 8th/9th order adaptive RK (high precision)
33
+ - **DormandPrince54Propagator** - 5th order adaptive RK with error control
34
+
35
+ ### Example: High-Fidelity Propagation
36
+
37
+ ```typescript
38
+ import {
39
+ RungeKutta89Propagator,
40
+ ForceModel,
41
+ EpochUTC,
42
+ Satellite,
43
+ TleLine1,
44
+ TleLine2,
45
+ } from 'ootk';
46
+
47
+ // Create satellite from TLE
48
+ const sat = new Satellite({
49
+ tle1: '1 25544U 98067A 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
50
+ tle2: '2 25544 51.6418 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
51
+ });
52
+
53
+ // Configure force model
54
+ const forceModel = new ForceModel();
55
+
56
+ // High-order Earth gravity (8x8 spherical harmonics)
57
+ forceModel.setEarthGravity(8, 8);
58
+
59
+ // Third-body perturbations (Sun and Moon)
60
+ forceModel.setThirdBodyGravity({
61
+ moon: true,
62
+ sun: true,
63
+ });
64
+
65
+ // Solar radiation pressure (mass: 1000 kg, area: 400 m²)
66
+ forceModel.setSolarRadiationPressure(1000, 400);
67
+
68
+ // Atmospheric drag (Harris-Priester model)
69
+ forceModel.setAtmosphericDrag(1000, 400);
70
+
71
+ // Create propagator with initial state
72
+ const start = new Date(2024, 0, 28, 0, 0, 0);
73
+ const propagator = new RungeKutta89Propagator(sat.toJ2000(start), forceModel);
74
+
75
+ // Propagate to target epoch
76
+ const stop = EpochUTC.fromDateTime(new Date(2024, 0, 29, 0, 0, 0));
77
+ const finalState = propagator.propagate(stop);
78
+
79
+ console.log('Position:', finalState.position);
80
+ console.log('Velocity:', finalState.velocity);
81
+ ```
82
+
83
+ ### When to Use Numerical Propagation
84
+
85
+ - **Long propagation arcs** where SGP4 accuracy degrades
86
+ - **High-precision applications** (collision avoidance, mission planning)
87
+ - **Maneuver modeling** with custom thrust profiles
88
+ - **Near-Earth objects** with significant perturbations
89
+ - **Research applications** requiring full force modeling
90
+
91
+ ---
92
+
93
+ ## 2. Initial Orbit Determination (IOD)
94
+
95
+ OOTK provides multiple IOD methods to determine orbits from observations - essential for tracking newly detected objects or recovering lost satellites.
96
+
97
+ ### Available Methods
98
+
99
+ #### Lambert's Problem
100
+ Solves for the orbit between two position vectors at known times.
101
+
102
+ ```typescript
103
+ import {
104
+ LambertIOD,
105
+ J2000,
106
+ Vector3D,
107
+ EpochUTC,
108
+ Kilometers,
109
+ KilometersPerSecond,
110
+ Tle,
111
+ } from 'ootk';
112
+
113
+ const lambert = new LambertIOD();
114
+
115
+ // Two position observations (ECI coordinates)
116
+ const p1 = new J2000(
117
+ EpochUTC.fromDateTime(new Date('2024-01-07T12:00:00Z')),
118
+ new Vector3D(-4901.845 as Kilometers, -3592.528 as Kilometers, 3322.876 as Kilometers),
119
+ Vector3D.origin as Vector3D<KilometersPerSecond>
120
+ );
121
+
122
+ const p2 = new J2000(
123
+ EpochUTC.fromDateTime(new Date('2024-01-07T12:00:10Z')),
124
+ new Vector3D(-4847.902 as Kilometers, -3631.425 as Kilometers, 3359.445 as Kilometers),
125
+ Vector3D.origin as Vector3D<KilometersPerSecond>
126
+ );
127
+
128
+ // Solve for orbit
129
+ const orbit = lambert.estimate(p1.position, p2.position, p1.epoch, p2.epoch);
130
+
131
+ // Convert to classical orbital elements or TLE
132
+ const classicalElements = orbit.toClassicalElements();
133
+ const tle = Tle.fromClassicalElements(classicalElements);
134
+
135
+ console.log(tle.line1);
136
+ console.log(tle.line2);
137
+ ```
138
+
139
+ #### Gibbs Method
140
+ Determines orbit from three coplanar position vectors.
141
+
142
+ ```typescript
143
+ import { GibbsIOD, J2000, Vector3D, Kilometers, KilometersPerSecond } from 'ootk';
144
+
145
+ const gibbs = new GibbsIOD();
146
+
147
+ // Three position observations
148
+ const p1 = new J2000(epoch1, new Vector3D(x1, y1, z1), Vector3D.origin);
149
+ const p2 = new J2000(epoch2, new Vector3D(x2, y2, z2), Vector3D.origin);
150
+ const p3 = new J2000(epoch3, new Vector3D(x3, y3, z3), Vector3D.origin);
151
+
152
+ const orbit = gibbs.solve(p1.position, p2.position, p3.position, p2.epoch, p3.epoch);
153
+ ```
154
+
155
+ #### Herrick-Gibbs Method
156
+ Improved method for closely-spaced observations.
157
+
158
+ ```typescript
159
+ import { HerrickGibbsIOD } from 'ootk';
160
+
161
+ const hgibbs = new HerrickGibbsIOD();
162
+
163
+ const orbit = hgibbs.solve(
164
+ p1.position, p1.epoch,
165
+ p2.position, p2.epoch,
166
+ p3.position, p3.epoch
167
+ );
168
+ ```
169
+
170
+ #### Gooding's Angles-Only IOD
171
+ Determines orbit from optical angle observations (right ascension/declination).
172
+
173
+ ```typescript
174
+ import { GoodingIOD, ModifiedGoodingIOD } from 'ootk';
175
+
176
+ // For optical observations where only angles are known
177
+ const gooding = new ModifiedGoodingIOD();
178
+ // Implementation for angle-only observations
179
+ ```
180
+
181
+ ### Converting Radar Observations to ECI
182
+
183
+ ```typescript
184
+ import { RAE, J2000, Vector3D, Degrees, Kilometers, lla2eci, calcGmst } from 'ootk';
185
+
186
+ // Radar observation: Range, Azimuth, Elevation
187
+ const observation = {
188
+ t: EpochUTC.fromDateTime(new Date('2024-01-07T12:00:00Z')),
189
+ rng: 1599.89 as Kilometers,
190
+ az: 174 as Degrees,
191
+ el: 13.6 as Degrees,
192
+ };
193
+
194
+ // Sensor location
195
+ const sensor = {
196
+ lat: (41.754785 * DEG2RAD) as Radians,
197
+ lon: (-70.539151 * DEG2RAD) as Radians,
198
+ alt: 0.085 as Kilometers,
199
+ };
200
+
201
+ // Convert sensor position to ECI
202
+ const gmst = calcGmst(observation.t.toDateTime());
203
+ const sensorEci = lla2eci(sensor, gmst.gmst);
204
+
205
+ // Convert RAE observation to ECI state vector
206
+ const rae = RAE.fromDegrees(observation.t, observation.rng, observation.az, observation.el);
207
+ const eciState = rae.toStateVector(
208
+ new J2000(
209
+ observation.t,
210
+ new Vector3D(sensorEci.x, sensorEci.y, sensorEci.z),
211
+ Vector3D.origin as Vector3D<KilometersPerSecond>
212
+ )
213
+ );
214
+ ```
215
+
216
+ ---
217
+
218
+ ## 3. Sensor Operations & Pass Prediction
219
+
220
+ OOTK includes comprehensive sensor modeling for ground-based tracking stations, radars, and telescopes.
221
+
222
+ ### Creating a Sensor
223
+
224
+ ```typescript
225
+ import { Sensor, SensorParams, SpaceObjectType, Degrees, Kilometers } from 'ootk';
226
+
227
+ const radar = new Sensor({
228
+ name: 'Cape Cod Radar',
229
+ lat: 41.754785 as Degrees,
230
+ lon: -70.539151 as Degrees,
231
+ alt: 0.060966 as Kilometers,
232
+ // Field of view constraints
233
+ minAz: 347 as Degrees,
234
+ maxAz: 227 as Degrees, // Wraps around (347° to 227° covers north)
235
+ minEl: 3 as Degrees,
236
+ maxEl: 85 as Degrees,
237
+ minRng: 0 as Kilometers,
238
+ maxRng: 5556 as Kilometers,
239
+ type: SpaceObjectType.PHASED_ARRAY_RADAR,
240
+ });
241
+
242
+ // Simple sensor without FOV constraints
243
+ const opticalSensor = new Sensor({
244
+ lat: 41 as Degrees,
245
+ lon: -71 as Degrees,
246
+ alt: 1 as Kilometers,
247
+ } as SensorParams);
248
+ ```
249
+
250
+ ### Calculating Satellite Position from Sensor
251
+
252
+ ```typescript
253
+ import { Satellite, TleLine1, TleLine2 } from 'ootk';
254
+
255
+ const sat = new Satellite({
256
+ tle1: '1 25544U 98067A 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
257
+ tle2: '2 25544 51.6418 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
258
+ });
259
+
260
+ const date = new Date('2024-01-28T12:00:00Z');
261
+
262
+ // Get range, azimuth, elevation from sensor to satellite
263
+ const rae = sat.rae(radar, date);
264
+
265
+ console.log(`Range: ${rae.rng} km`);
266
+ console.log(`Azimuth: ${rae.az}°`);
267
+ console.log(`Elevation: ${rae.el}°`);
268
+ ```
269
+
270
+ ### Checking Field of View
271
+
272
+ ```typescript
273
+ // Check if satellite is within sensor's field of view
274
+ const isVisible = radar.isSatInFov(sat, date);
275
+
276
+ if (isVisible) {
277
+ console.log('Satellite is visible from sensor');
278
+ }
279
+ ```
280
+
281
+ ### Pass Prediction
282
+
283
+ ```typescript
284
+ // Calculate all passes over a time period
285
+ const startDate = new Date('2024-01-28T00:00:00Z');
286
+ const endDate = new Date('2024-01-29T00:00:00Z');
287
+
288
+ const passes = radar.calculatePasses(sat, startDate, endDate, 60); // 60 second interval
289
+
290
+ passes.forEach(pass => {
291
+ console.log(`Pass Start: ${pass.start}`);
292
+ console.log(`Pass End: ${pass.end}`);
293
+ console.log(`Max Elevation: ${pass.maxEl}°`);
294
+ console.log(`AOS Azimuth: ${pass.azimuthStart}°`);
295
+ console.log(`LOS Azimuth: ${pass.azimuthEnd}°`);
296
+ });
297
+ ```
298
+
299
+ ### Doppler Shift Calculations
300
+
301
+ ```typescript
302
+ // Calculate Doppler shift for RF tracking
303
+ const doppler = sat.applyDoppler(radar, date, 2200); // 2200 MHz frequency
304
+
305
+ console.log(`Doppler shifted frequency: ${doppler.frequency} MHz`);
306
+ console.log(`Doppler shift: ${doppler.shift} MHz`);
307
+ ```
308
+
309
+ ---
310
+
311
+ ## 4. Astronomical Calculations
312
+
313
+ OOTK provides comprehensive astronomical calculations for the Sun, Moon, and Earth.
314
+
315
+ ### Sun Calculations
316
+
317
+ ```typescript
318
+ import { Sun, Degrees, Meters } from 'ootk';
319
+
320
+ const date = new Date('2024-06-21T12:00:00Z');
321
+ const latitude = 41 as Degrees;
322
+ const longitude = -71 as Degrees;
323
+ const altitude = 0 as Meters;
324
+
325
+ // Get all sun times for the day
326
+ const sunTimes = Sun.getTimes(date, latitude, longitude, altitude);
327
+
328
+ console.log('Sunrise:', sunTimes.sunrise);
329
+ console.log('Sunset:', sunTimes.sunset);
330
+ console.log('Solar Noon:', sunTimes.solarNoon);
331
+ console.log('Golden Hour (morning):', sunTimes.goldenHour);
332
+ console.log('Golden Hour End (evening):', sunTimes.goldenHourEnd);
333
+ console.log('Blue Hour (dawn):', sunTimes.blueHourDawn);
334
+ console.log('Blue Hour (dusk):', sunTimes.blueHourDusk);
335
+ console.log('Civil Dawn:', sunTimes.civilDawn);
336
+ console.log('Civil Dusk:', sunTimes.civilDusk);
337
+ console.log('Nautical Dawn:', sunTimes.nauticalDawn);
338
+ console.log('Nautical Dusk:', sunTimes.nauticalDusk);
339
+ console.log('Astronomical Dawn:', sunTimes.astronomicalDawn);
340
+ console.log('Astronomical Dusk:', sunTimes.astronomicalDusk);
341
+ ```
342
+
343
+ #### Sun Position
344
+
345
+ ```typescript
346
+ // Get Sun's position in ECI coordinates
347
+ const sunEci = Sun.eci(EpochUTC.fromDateTime(date));
348
+
349
+ console.log('Sun ECI Position:', sunEci.position);
350
+
351
+ // Get Sun's azimuth and elevation from observer
352
+ const sunPosition = Sun.azEl(date, latitude, longitude);
353
+
354
+ console.log(`Sun Azimuth: ${sunPosition.az}°`);
355
+ console.log(`Sun Elevation: ${sunPosition.el}°`);
356
+ ```
357
+
358
+ #### Solar Illumination
359
+
360
+ ```typescript
361
+ // Calculate satellite illumination
362
+ const illumination = Sun.getIllumination(sat, date);
363
+
364
+ console.log('Satellite in sunlight:', illumination.lit);
365
+ console.log('Illumination factor:', illumination.factor); // 0 = shadow, 1 = full sun
366
+ ```
367
+
368
+ ### Moon Calculations
369
+
370
+ ```typescript
371
+ import { Moon } from 'ootk';
372
+
373
+ // Get Moon's position in ECI coordinates
374
+ const moonEci = Moon.eci(EpochUTC.fromDateTime(date));
375
+
376
+ // Moon phase information
377
+ const moonPhase = Moon.getPhase(date);
378
+
379
+ console.log('Moon Phase:', moonPhase.phase); // 'new', 'waxing_crescent', 'first_quarter', etc.
380
+ console.log('Illumination:', moonPhase.illumination); // 0 to 1
381
+
382
+ // Moon rise and set times
383
+ const moonTimes = Moon.getTimes(date, latitude, longitude);
384
+
385
+ console.log('Moonrise:', moonTimes.rise);
386
+ console.log('Moonset:', moonTimes.set);
387
+ ```
388
+
389
+ ### Eclipse Predictions
390
+
391
+ ```typescript
392
+ // Check if satellite is in Earth's shadow
393
+ const inEclipse = sat.isInEclipse(date);
394
+
395
+ if (inEclipse) {
396
+ console.log('Satellite is in Earth shadow');
397
+ }
398
+ ```
399
+
400
+ ---
401
+
402
+ ## 5. Advanced Coordinate Transformations
403
+
404
+ OOTK supports 15+ coordinate systems with seamless transformations.
405
+
406
+ ### Coordinate Systems Overview
407
+
408
+ | System | Description | Use Case |
409
+ |--------|-------------|----------|
410
+ | **J2000** | ECI at J2000 epoch | Standard inertial reference |
411
+ | **TEME** | True Equator Mean Equinox | TLE propagation (SGP4) |
412
+ | **ITRF** | Earth-fixed coordinates | Ground station positions |
413
+ | **Geodetic** | Lat/Lon/Alt | Geographic locations |
414
+ | **RIC** | Radial-Intrack-Crosstrack | Relative orbital motion |
415
+ | **RAE** | Range-Azimuth-Elevation | Sensor observations |
416
+ | **ENU** | East-North-Up | Local tangent plane |
417
+ | **SEZ** | South-East-Zenith | Local coordinates |
418
+
419
+ ### Common Transformations
420
+
421
+ ```typescript
422
+ import {
423
+ Satellite,
424
+ eci2lla,
425
+ lla2eci,
426
+ ecf2eci,
427
+ eci2ecf,
428
+ rae2eci,
429
+ eci2rae,
430
+ calcGmst,
431
+ Degrees,
432
+ Kilometers,
433
+ Radians,
434
+ } from 'ootk';
435
+
436
+ const date = new Date('2024-01-28T12:00:00Z');
437
+ const sat = new Satellite({ tle1, tle2 });
438
+
439
+ // Satellite position in various frames
440
+ const j2000 = sat.toJ2000(date); // ECI (J2000)
441
+ const itrf = sat.toITRF(date); // Earth-fixed
442
+ const geodetic = sat.toGeodetic(date); // Lat/Lon/Alt
443
+ const classical = sat.toClassicalElements(date); // Orbital elements
444
+
445
+ console.log('Latitude:', geodetic.lat);
446
+ console.log('Longitude:', geodetic.lon);
447
+ console.log('Altitude:', geodetic.alt);
448
+
449
+ // Manual transformations
450
+ const { gmst } = calcGmst(date);
451
+
452
+ // ECI to Lat/Lon/Alt
453
+ const lla = eci2lla(j2000.position, gmst);
454
+
455
+ // Lat/Lon/Alt to ECI
456
+ const eciPos = lla2eci(
457
+ {
458
+ lat: 41.754785 as Radians,
459
+ lon: -70.539151 as Radians,
460
+ alt: 0.085 as Kilometers,
461
+ },
462
+ gmst
463
+ );
464
+
465
+ // ECI to Earth-fixed (ECF/ITRF)
466
+ const ecf = eci2ecf(j2000.position, gmst);
467
+
468
+ // Earth-fixed to ECI
469
+ const eci = ecf2eci(ecf, gmst);
470
+ ```
471
+
472
+ ### Sensor-Centric Transformations
473
+
474
+ ```typescript
475
+ import { Sensor, ecf2rae, rae2ecf, eci2rae } from 'ootk';
476
+
477
+ const sensor = new Sensor({
478
+ lat: 41 as Degrees,
479
+ lon: -71 as Degrees,
480
+ alt: 1 as Kilometers,
481
+ });
482
+
483
+ // Convert satellite position to Range-Azimuth-Elevation
484
+ const rae = eci2rae(date, sat.eci(date), sensor);
485
+
486
+ console.log(`Range: ${rae.rng} km`);
487
+ console.log(`Azimuth: ${rae.az}°`);
488
+ console.log(`Elevation: ${rae.el}°`);
489
+
490
+ // Convert RAE back to ECF coordinates
491
+ const ecf = rae2ecf(sensor.lla(), rae);
492
+ ```
493
+
494
+ ### Relative Motion Coordinates
495
+
496
+ ```typescript
497
+ // RIC (Radial-Intrack-Crosstrack) frame
498
+ const sat1 = new Satellite({ tle1: tle1a, tle2: tle2a });
499
+ const sat2 = new Satellite({ tle1: tle1b, tle2: tle2b });
500
+
501
+ // Get sat2's position relative to sat1 in RIC frame
502
+ const ricState = sat2.toRIC(sat1, date);
503
+
504
+ console.log('Radial offset:', ricState.position.x); // Along radius vector
505
+ console.log('In-track offset:', ricState.position.y); // Along velocity vector
506
+ console.log('Cross-track offset:', ricState.position.z); // Normal to orbit plane
507
+ ```
508
+
509
+ ---
510
+
511
+ ## 6. Force Modeling
512
+
513
+ OOTK includes high-fidelity force models for precise orbit propagation.
514
+
515
+ ### Available Force Models
516
+
517
+ ```typescript
518
+ import { ForceModel } from 'ootk';
519
+
520
+ const forces = new ForceModel();
521
+
522
+ // 1. Earth Gravity (Spherical Harmonics)
523
+ // Parameters: degree, order (up to 8x8 with EGM96 coefficients)
524
+ forces.setEarthGravity(8, 8); // High precision
525
+ forces.setEarthGravity(4, 4); // Medium precision
526
+ forces.setEarthGravity(2, 0); // J2 only (fastest)
527
+
528
+ // 2. Third-Body Gravity
529
+ forces.setThirdBodyGravity({
530
+ sun: true, // Solar perturbations
531
+ moon: true, // Lunar perturbations
532
+ });
533
+
534
+ // 3. Solar Radiation Pressure
535
+ // Parameters: mass (kg), area (m²)
536
+ forces.setSolarRadiationPressure(
537
+ 1000, // Satellite mass
538
+ 400 // Cross-sectional area
539
+ );
540
+
541
+ // 4. Atmospheric Drag (Harris-Priester model)
542
+ // Parameters: mass (kg), area (m²), Cd (drag coefficient)
543
+ forces.setAtmosphericDrag(
544
+ 1000, // Satellite mass
545
+ 400, // Cross-sectional area
546
+ 2.2 // Drag coefficient (optional, default: 2.2)
547
+ );
548
+
549
+ // 5. Custom Thrust Forces
550
+ import { Thrust, Vector3D } from 'ootk';
551
+
552
+ const thrust = new Thrust(
553
+ new Vector3D(0.001, 0, 0), // Thrust vector in km/s²
554
+ startEpoch,
555
+ endEpoch
556
+ );
557
+
558
+ forces.addThrust(thrust);
559
+ ```
560
+
561
+ ### Force Model Usage
562
+
563
+ ```typescript
564
+ import { RungeKutta89Propagator, ForceModel, Satellite } from 'ootk';
565
+
566
+ const sat = new Satellite({ tle1, tle2 });
567
+
568
+ // High-fidelity force model
569
+ const hiFiForces = new ForceModel();
570
+ hiFiForces.setEarthGravity(8, 8);
571
+ hiFiForces.setThirdBodyGravity({ sun: true, moon: true });
572
+ hiFiForces.setSolarRadiationPressure(1000, 400);
573
+ hiFiForces.setAtmosphericDrag(1000, 400);
574
+
575
+ const propagator = new RungeKutta89Propagator(
576
+ sat.toJ2000(startDate),
577
+ hiFiForces
578
+ );
579
+
580
+ // Propagate with full force model
581
+ const finalState = propagator.propagate(EpochUTC.fromDateTime(endDate));
582
+ ```
583
+
584
+ ### When to Use Each Force
585
+
586
+ | Force | Orbit Regime | Impact | Computational Cost |
587
+ |-------|--------------|--------|-------------------|
588
+ | **Earth Gravity (J2)** | All | High | Low |
589
+ | **Earth Gravity (8x8)** | All | Very High | Medium |
590
+ | **Third-Body (Moon)** | MEO/GEO | Medium | Medium |
591
+ | **Third-Body (Sun)** | GEO | Medium | Medium |
592
+ | **Atmospheric Drag** | LEO (<600 km) | Very High | Medium |
593
+ | **Solar Radiation** | GEO | Medium | Low |
594
+
595
+ ---
596
+
597
+ ## 7. Maneuver Planning & Optimization
598
+
599
+ OOTK provides tools for orbit maneuver design and trajectory optimization.
600
+
601
+ ### Two-Burn Orbit Transfers
602
+
603
+ ```typescript
604
+ import { TwoBurnOrbitTransfer, ClassicalElements, Kilometers } from 'ootk';
605
+
606
+ // Initial orbit (LEO)
607
+ const initialOrbit = new ClassicalElements({
608
+ a: 6778 as Kilometers, // Semi-major axis
609
+ e: 0.001, // Eccentricity
610
+ i: 51.6 as Radians, // Inclination
611
+ // ... other elements
612
+ });
613
+
614
+ // Target orbit (GEO)
615
+ const targetOrbit = new ClassicalElements({
616
+ a: 42164 as Kilometers,
617
+ e: 0.0001,
618
+ i: 0 as Radians,
619
+ // ... other elements
620
+ });
621
+
622
+ const transfer = new TwoBurnOrbitTransfer(initialOrbit, targetOrbit);
623
+
624
+ // Calculate Hohmann transfer
625
+ const hohmann = transfer.calculateHohmann();
626
+
627
+ console.log('First burn ΔV:', hohmann.deltaV1);
628
+ console.log('Second burn ΔV:', hohmann.deltaV2);
629
+ console.log('Total ΔV:', hohmann.deltaVTotal);
630
+ console.log('Transfer time:', hohmann.transferTime);
631
+
632
+ // Calculate bi-elliptic transfer (more efficient for large ratio changes)
633
+ const biElliptic = transfer.calculateBiElliptic();
634
+ ```
635
+
636
+ ### Waypoint Targeting with Optimization
637
+
638
+ ```typescript
639
+ import { Waypoint, Vector3D, Kilometers } from 'ootk';
640
+
641
+ // Define relative target position in RIC frame
642
+ const targetPosition = new Vector3D(
643
+ 0 as Kilometers, // Radial
644
+ 100 as Kilometers, // In-track
645
+ 0 as Kilometers // Cross-track
646
+ );
647
+
648
+ const waypoint = new Waypoint(
649
+ targetPosition,
650
+ targetEpoch,
651
+ currentState
652
+ );
653
+
654
+ // Optimize maneuver to reach waypoint
655
+ const maneuver = waypoint.optimize();
656
+
657
+ console.log('Optimal ΔV:', maneuver.deltaV);
658
+ console.log('Burn time:', maneuver.burnTime);
659
+ console.log('Burn direction:', maneuver.direction);
660
+ ```
661
+
662
+ ### Numerical Optimization Tools
663
+
664
+ ```typescript
665
+ import { DownhillSimplex, GoldenSection } from 'ootk';
666
+
667
+ // Nelder-Mead simplex optimization
668
+ const simplex = new DownhillSimplex(
669
+ objectiveFunction,
670
+ initialGuess,
671
+ tolerance
672
+ );
673
+
674
+ const optimum = simplex.optimize();
675
+
676
+ // Golden section search (1D optimization)
677
+ const golden = new GoldenSection(
678
+ objectiveFunction,
679
+ lowerBound,
680
+ upperBound,
681
+ tolerance
682
+ );
683
+
684
+ const minimum = golden.search();
685
+ ```
686
+
687
+ ---
688
+
689
+ ## 8. Covariance & Uncertainty Analysis
690
+
691
+ OOTK supports covariance matrices for uncertainty quantification and propagation.
692
+
693
+ ### Creating Covariance from TLE
694
+
695
+ ```typescript
696
+ import { StateCovariance, Satellite, TleLine1, TleLine2 } from 'ootk';
697
+
698
+ const sat = new Satellite({
699
+ tle1: '1 25544U 98067A 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
700
+ tle2: '2 25544 51.6418 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
701
+ });
702
+
703
+ const date = new Date('2024-01-28T12:00:00Z');
704
+
705
+ // Create covariance from TLE age and mean motion derivative
706
+ const covariance = StateCovariance.fromTle(sat, date);
707
+
708
+ console.log('Position uncertainty (1-sigma):', covariance.positionSigma);
709
+ console.log('Velocity uncertainty (1-sigma):', covariance.velocitySigma);
710
+
711
+ // Get full 6x6 covariance matrix
712
+ const covMatrix = covariance.matrix;
713
+ ```
714
+
715
+ ### Sample-Based Covariance
716
+
717
+ ```typescript
718
+ import { CovarianceSample, Vector3D, Kilometers, KilometersPerSecond } from 'ootk';
719
+
720
+ // Create sample generator
721
+ const sampler = new CovarianceSample(
722
+ nominalPosition,
723
+ nominalVelocity,
724
+ positionSigma, // 1-sigma uncertainty in position
725
+ velocitySigma // 1-sigma uncertainty in velocity
726
+ );
727
+
728
+ // Generate Monte Carlo samples
729
+ const samples = sampler.generate(1000); // 1000 samples
730
+
731
+ samples.forEach(sample => {
732
+ // Propagate each sample to quantify uncertainty
733
+ const propagated = propagator.propagate(sample, targetEpoch);
734
+ });
735
+ ```
736
+
737
+ ### Covariance in RIC Frame
738
+
739
+ ```typescript
740
+ // Convert covariance to Radial-Intrack-Crosstrack frame
741
+ const ricCovariance = covariance.toRIC(referenceOrbit);
742
+
743
+ console.log('Radial uncertainty:', ricCovariance.radialSigma);
744
+ console.log('In-track uncertainty:', ricCovariance.intrackSigma);
745
+ console.log('Cross-track uncertainty:', ricCovariance.crosstrackSigma);
746
+ ```
747
+
748
+ ---
749
+
750
+ ## 9. Multiple Time Systems
751
+
752
+ OOTK provides comprehensive support for different time standards used in astrodynamics.
753
+
754
+ ### Available Time Systems
755
+
756
+ ```typescript
757
+ import {
758
+ EpochUTC, // Coordinated Universal Time
759
+ EpochGPS, // GPS Time
760
+ EpochTAI, // International Atomic Time
761
+ EpochTDB, // Barycentric Dynamical Time
762
+ EpochTT, // Terrestrial Time
763
+ } from 'ootk';
764
+
765
+ const date = new Date('2024-01-28T12:00:00Z');
766
+
767
+ // Create epochs in different time systems
768
+ const utc = EpochUTC.fromDateTime(date);
769
+ const gps = EpochGPS.fromDateTime(date);
770
+ const tai = EpochTAI.fromDateTime(date);
771
+ const tdb = EpochTDB.fromDateTime(date);
772
+ const tt = EpochTT.fromDateTime(date);
773
+
774
+ // Convert between time systems
775
+ const utcFromGPS = gps.toUTC();
776
+ const taiFromUTC = utc.toTAI();
777
+ const ttFromUTC = utc.toTT();
778
+ ```
779
+
780
+ ### Leap Seconds
781
+
782
+ ```typescript
783
+ // OOTK includes historical leap second data
784
+ const leapSeconds = utc.getLeapSeconds();
785
+
786
+ console.log('Leap seconds at epoch:', leapSeconds);
787
+
788
+ // Time system offsets
789
+ console.log('TAI - UTC:', tai.toUTC().offset); // ~37 seconds (as of 2024)
790
+ console.log('GPS - UTC:', gps.toUTC().offset); // ~18 seconds
791
+ ```
792
+
793
+ ### Time Windows
794
+
795
+ ```typescript
796
+ import { EpochWindow, EpochUTC } from 'ootk';
797
+
798
+ const start = EpochUTC.fromDateTime(new Date('2024-01-28T00:00:00Z'));
799
+ const end = EpochUTC.fromDateTime(new Date('2024-01-29T00:00:00Z'));
800
+
801
+ const window = new EpochWindow(start, end);
802
+
803
+ console.log('Window duration:', window.duration); // in seconds
804
+
805
+ // Check if epoch is within window
806
+ const testEpoch = EpochUTC.fromDateTime(new Date('2024-01-28T12:00:00Z'));
807
+ const isInWindow = window.contains(testEpoch);
808
+ ```
809
+
810
+ ---
811
+
812
+ ## 10. Relative Motion Analysis
813
+
814
+ Analyze relative motion between satellites using specialized coordinate frames.
815
+
816
+ ### RIC (Radial-Intrack-Crosstrack) Frame
817
+
818
+ ```typescript
819
+ import { Satellite, TleLine1, TleLine2 } from 'ootk';
820
+
821
+ // Chief satellite
822
+ const chief = new Satellite({
823
+ tle1: '1 25544U 98067A 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
824
+ tle2: '2 25544 51.6418 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
825
+ });
826
+
827
+ // Deputy satellite
828
+ const deputy = new Satellite({
829
+ tle1: '1 25545U 98067B 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
830
+ tle2: '2 25545 51.6500 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
831
+ });
832
+
833
+ const date = new Date('2024-01-28T12:00:00Z');
834
+
835
+ // Get deputy's state in chief's RIC frame
836
+ const ricState = deputy.toRIC(chief, date);
837
+
838
+ console.log('Radial separation:', ricState.position.x, 'km');
839
+ console.log('In-track separation:', ricState.position.y, 'km');
840
+ console.log('Cross-track separation:', ricState.position.z, 'km');
841
+
842
+ console.log('Radial velocity:', ricState.velocity.x, 'km/s');
843
+ console.log('In-track velocity:', ricState.velocity.y, 'km/s');
844
+ console.log('Cross-track velocity:', ricState.velocity.z, 'km/s');
845
+ ```
846
+
847
+ ### Hill Frame
848
+
849
+ ```typescript
850
+ import { RIC } from 'ootk';
851
+
852
+ // Convert between RIC and Hill frames for relative motion analysis
853
+ const hillState = ricState.toHill();
854
+ ```
855
+
856
+ ### Relative Range and Range Rate
857
+
858
+ ```typescript
859
+ // Calculate range between satellites
860
+ const range = deputy.range(chief, date);
861
+
862
+ console.log('Separation distance:', range, 'km');
863
+
864
+ // Calculate range rate (closing velocity)
865
+ const rangeRate = deputy.rangeRate(chief, date);
866
+
867
+ console.log('Closing velocity:', rangeRate, 'km/s');
868
+ ```
869
+
870
+ ---
871
+
872
+ ## Complete Example: Multi-Feature Integration
873
+
874
+ Here's a comprehensive example that combines multiple advanced features:
875
+
876
+ ```typescript
877
+ import {
878
+ Satellite,
879
+ Sensor,
880
+ Sun,
881
+ RungeKutta89Propagator,
882
+ ForceModel,
883
+ StateCovariance,
884
+ EpochUTC,
885
+ SpaceObjectType,
886
+ Degrees,
887
+ Kilometers,
888
+ TleLine1,
889
+ TleLine2,
890
+ } from 'ootk';
891
+
892
+ // 1. Create satellite from TLE
893
+ const sat = new Satellite({
894
+ tle1: '1 25544U 98067A 24028.54545847 .00031576 00000-0 57240-3 0 9991' as TleLine1,
895
+ tle2: '2 25544 51.6418 292.2590 0002595 167.5319 252.0460 15.49326324436741' as TleLine2,
896
+ });
897
+
898
+ // 2. Create sensor
899
+ const radar = new Sensor({
900
+ name: 'Tracking Station',
901
+ lat: 41.754785 as Degrees,
902
+ lon: -70.539151 as Degrees,
903
+ alt: 0.060966 as Kilometers,
904
+ minAz: 0 as Degrees,
905
+ maxAz: 360 as Degrees,
906
+ minEl: 5 as Degrees,
907
+ maxEl: 90 as Degrees,
908
+ minRng: 0 as Kilometers,
909
+ maxRng: 5000 as Kilometers,
910
+ type: SpaceObjectType.PHASED_ARRAY_RADAR,
911
+ });
912
+
913
+ // 3. Calculate passes over next 24 hours
914
+ const startDate = new Date('2024-01-28T00:00:00Z');
915
+ const endDate = new Date('2024-01-29T00:00:00Z');
916
+ const passes = radar.calculatePasses(sat, startDate, endDate, 60);
917
+
918
+ console.log(`Found ${passes.length} passes in next 24 hours`);
919
+
920
+ passes.forEach((pass, i) => {
921
+ console.log(`\nPass ${i + 1}:`);
922
+ console.log(` Start: ${pass.start}`);
923
+ console.log(` End: ${pass.end}`);
924
+ console.log(` Max Elevation: ${pass.maxEl}°`);
925
+
926
+ // 4. Check if pass occurs during daylight
927
+ const sunTimes = Sun.getTimes(pass.start, radar.lat, radar.lon, radar.alt);
928
+ const isDaylight = pass.start > sunTimes.sunrise && pass.start < sunTimes.sunset;
929
+ console.log(` Daylight pass: ${isDaylight}`);
930
+
931
+ // 5. Get satellite position at max elevation
932
+ const midPassDate = new Date((pass.start.getTime() + pass.end.getTime()) / 2);
933
+ const rae = sat.rae(radar, midPassDate);
934
+ console.log(` Range at max elevation: ${rae.rng.toFixed(1)} km`);
935
+
936
+ // 6. Calculate Doppler shift
937
+ const doppler = sat.applyDoppler(radar, midPassDate, 2200);
938
+ console.log(` Doppler shift: ${doppler.shift.toFixed(3)} MHz`);
939
+ });
940
+
941
+ // 7. High-fidelity propagation for next orbit
942
+ const forceModel = new ForceModel();
943
+ forceModel.setEarthGravity(8, 8);
944
+ forceModel.setThirdBodyGravity({ sun: true, moon: true });
945
+ forceModel.setAtmosphericDrag(419725, 916); // ISS approximate mass and area
946
+
947
+ const propagator = new RungeKutta89Propagator(
948
+ sat.toJ2000(startDate),
949
+ forceModel
950
+ );
951
+
952
+ const oneOrbitLater = EpochUTC.fromDateTime(
953
+ new Date(startDate.getTime() + 92 * 60 * 1000) // ~92 minutes
954
+ );
955
+
956
+ const propagatedState = propagator.propagate(oneOrbitLater);
957
+
958
+ console.log('\nPropagated position (high-fidelity):');
959
+ console.log(` X: ${propagatedState.position.x.toFixed(3)} km`);
960
+ console.log(` Y: ${propagatedState.position.y.toFixed(3)} km`);
961
+ console.log(` Z: ${propagatedState.position.z.toFixed(3)} km`);
962
+
963
+ // 8. Compare with SGP4
964
+ const sgp4State = sat.eci(oneOrbitLater.toDateTime());
965
+
966
+ console.log('\nSGP4 position:');
967
+ console.log(` X: ${sgp4State.x.toFixed(3)} km`);
968
+ console.log(` Y: ${sgp4State.y.toFixed(3)} km`);
969
+ console.log(` Z: ${sgp4State.z.toFixed(3)} km`);
970
+
971
+ // 9. Uncertainty analysis
972
+ const covariance = StateCovariance.fromTle(sat, startDate);
973
+
974
+ console.log('\nPosition uncertainty (1-sigma):');
975
+ console.log(` ${covariance.positionSigma.toFixed(3)} km`);
976
+ ```
977
+
978
+ ---
979
+
980
+ ## Performance Considerations
981
+
982
+ ### When to Use Each Propagator
983
+
984
+ | Propagator | Speed | Accuracy | Best For |
985
+ |------------|-------|----------|----------|
986
+ | **SGP4** | Fastest | Good (< 7 days) | Real-time tracking, short arcs |
987
+ | **Kepler** | Very Fast | Basic | Quick estimates, two-body motion |
988
+ | **RK4** | Fast | Good | Balance of speed/accuracy |
989
+ | **RK89** | Slow | Excellent | High-precision, long arcs |
990
+ | **DP54** | Medium | Very Good | Adaptive step, general purpose |
991
+
992
+ ### Optimization Tips
993
+
994
+ 1. **Use appropriate force models** - Don't include drag for GEO satellites
995
+ 2. **Limit gravity field order** - 4x4 is often sufficient, 8x8 for high precision
996
+ 3. **Choose propagator wisely** - SGP4 for < 7 days, numerical for longer
997
+ 4. **Batch calculations** - Calculate multiple epochs in one propagation
998
+ 5. **Coordinate frame** - Minimize transformations between frames
999
+
1000
+ ---
1001
+
1002
+ ## Additional Resources
1003
+
1004
+ - **Examples Directory**: `/examples/` contains working code for all major features
1005
+ - **Type Safety**: OOTK uses TypeScript unit types (Kilometers, Radians, etc.) to prevent errors
1006
+ - **API Documentation**: Full API docs available in the repository
1007
+ - **Test Suite**: `/test/` directory shows comprehensive usage examples
1008
+
1009
+ ---
1010
+
1011
+ ## Conclusion
1012
+
1013
+ OOTK is far more than an SGP4 library. It's a complete orbital mechanics toolkit offering:
1014
+
1015
+ - **Professional-grade propagation** with multiple numerical integrators
1016
+ - **Initial orbit determination** from various observation types
1017
+ - **Sensor modeling** with pass prediction and FOV checking
1018
+ - **Astronomical calculations** for Sun, Moon, and celestial mechanics
1019
+ - **Comprehensive coordinate systems** with seamless transformations
1020
+ - **High-fidelity force modeling** including gravity harmonics, drag, and SRP
1021
+ - **Maneuver planning** and trajectory optimization
1022
+ - **Uncertainty quantification** with covariance analysis
1023
+ - **Multiple time systems** with leap second support
1024
+
1025
+ Whether you're building a satellite tracking application, conducting orbital analysis, planning missions, or developing space situational awareness systems, OOTK provides the tools you need for professional-grade orbital mechanics computations.