ootk 6.0.0-rc.4 → 6.0.0

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 (1008) hide show
  1. package/dist/main.cjs +29551 -0
  2. package/dist/main.d.cts +16961 -0
  3. package/dist/main.d.ts +16940 -32
  4. package/dist/main.js +29243 -35
  5. package/package.json +38 -25
  6. package/.claude/PROMPT.md +0 -13
  7. package/.claude/hooks/post-tool-use.ts +0 -33
  8. package/.claude/hooks/user-prompt-submit.ts +0 -138
  9. package/.claude/settings.local.json +0 -21
  10. package/.claude/skill-rules.json +0 -11
  11. package/.claude/skills/ootk-dev/SKILL.md +0 -16
  12. package/ADVANCED_FEATURES_GUIDE.md +0 -1025
  13. package/CHANGELOG.md +0 -511
  14. package/CLAUDE.md +0 -67
  15. package/FUTURE-WORK.md +0 -325
  16. package/dist/body/CelestialBody.d.ts +0 -155
  17. package/dist/body/CelestialBody.js +0 -207
  18. package/dist/body/CelestialBody.js.map +0 -1
  19. package/dist/body/CelestialBodyType.d.ts +0 -41
  20. package/dist/body/CelestialBodyType.js +0 -55
  21. package/dist/body/CelestialBodyType.js.map +0 -1
  22. package/dist/body/Earth.d.ts +0 -68
  23. package/dist/body/Earth.js +0 -198
  24. package/dist/body/Earth.js.map +0 -1
  25. package/dist/body/EphemerisBody.d.ts +0 -153
  26. package/dist/body/EphemerisBody.js +0 -235
  27. package/dist/body/EphemerisBody.js.map +0 -1
  28. package/dist/body/MoonBody.d.ts +0 -200
  29. package/dist/body/MoonBody.js +0 -414
  30. package/dist/body/MoonBody.js.map +0 -1
  31. package/dist/body/NutationAngles.d.ts +0 -38
  32. package/dist/body/NutationAngles.js +0 -24
  33. package/dist/body/NutationAngles.js.map +0 -1
  34. package/dist/body/PlanetBody.d.ts +0 -130
  35. package/dist/body/PlanetBody.js +0 -293
  36. package/dist/body/PlanetBody.js.map +0 -1
  37. package/dist/body/PrecessionAngles.d.ts +0 -29
  38. package/dist/body/PrecessionAngles.js +0 -24
  39. package/dist/body/PrecessionAngles.js.map +0 -1
  40. package/dist/body/SolarSystem.d.ts +0 -124
  41. package/dist/body/SolarSystem.js +0 -218
  42. package/dist/body/SolarSystem.js.map +0 -1
  43. package/dist/body/SunBody.d.ts +0 -253
  44. package/dist/body/SunBody.js +0 -433
  45. package/dist/body/SunBody.js.map +0 -1
  46. package/dist/body/index.d.ts +0 -36
  47. package/dist/body/index.js +0 -39
  48. package/dist/body/index.js.map +0 -1
  49. package/dist/comm/Antenna.d.ts +0 -112
  50. package/dist/comm/Antenna.js +0 -173
  51. package/dist/comm/Antenna.js.map +0 -1
  52. package/dist/comm/Beacon.d.ts +0 -141
  53. package/dist/comm/Beacon.js +0 -268
  54. package/dist/comm/Beacon.js.map +0 -1
  55. package/dist/comm/CommTypes.d.ts +0 -181
  56. package/dist/comm/CommTypes.js +0 -115
  57. package/dist/comm/CommTypes.js.map +0 -1
  58. package/dist/comm/CommunicationDevice.d.ts +0 -115
  59. package/dist/comm/CommunicationDevice.js +0 -142
  60. package/dist/comm/CommunicationDevice.js.map +0 -1
  61. package/dist/comm/Receiver.d.ts +0 -139
  62. package/dist/comm/Receiver.js +0 -219
  63. package/dist/comm/Receiver.js.map +0 -1
  64. package/dist/comm/Transmitter.d.ts +0 -136
  65. package/dist/comm/Transmitter.js +0 -273
  66. package/dist/comm/Transmitter.js.map +0 -1
  67. package/dist/comm/Transponder.d.ts +0 -154
  68. package/dist/comm/Transponder.js +0 -281
  69. package/dist/comm/Transponder.js.map +0 -1
  70. package/dist/comm/index.d.ts +0 -30
  71. package/dist/comm/index.js +0 -26
  72. package/dist/comm/index.js.map +0 -1
  73. package/dist/conjunction/CatalogScreener.d.ts +0 -134
  74. package/dist/conjunction/CatalogScreener.js +0 -213
  75. package/dist/conjunction/CatalogScreener.js.map +0 -1
  76. package/dist/conjunction/ConjunctionAssessment.d.ts +0 -149
  77. package/dist/conjunction/ConjunctionAssessment.js +0 -288
  78. package/dist/conjunction/ConjunctionAssessment.js.map +0 -1
  79. package/dist/conjunction/ConjunctionEvent.d.ts +0 -110
  80. package/dist/conjunction/ConjunctionEvent.js +0 -154
  81. package/dist/conjunction/ConjunctionEvent.js.map +0 -1
  82. package/dist/conjunction/CovarianceRealism.d.ts +0 -189
  83. package/dist/conjunction/CovarianceRealism.js +0 -348
  84. package/dist/conjunction/CovarianceRealism.js.map +0 -1
  85. package/dist/conjunction/ProbabilityOfCollision.d.ts +0 -102
  86. package/dist/conjunction/ProbabilityOfCollision.js +0 -242
  87. package/dist/conjunction/ProbabilityOfCollision.js.map +0 -1
  88. package/dist/conjunction/ScreeningFilter.d.ts +0 -112
  89. package/dist/conjunction/ScreeningFilter.js +0 -160
  90. package/dist/conjunction/ScreeningFilter.js.map +0 -1
  91. package/dist/conjunction/index.d.ts +0 -22
  92. package/dist/conjunction/index.js +0 -23
  93. package/dist/conjunction/index.js.map +0 -1
  94. package/dist/constellation/ConstellationGenerator.d.ts +0 -137
  95. package/dist/constellation/ConstellationGenerator.js +0 -270
  96. package/dist/constellation/ConstellationGenerator.js.map +0 -1
  97. package/dist/constellation/index.d.ts +0 -17
  98. package/dist/constellation/index.js +0 -18
  99. package/dist/constellation/index.js.map +0 -1
  100. package/dist/coordinate/ClassicalElements.d.ts +0 -170
  101. package/dist/coordinate/ClassicalElements.js +0 -334
  102. package/dist/coordinate/ClassicalElements.js.map +0 -1
  103. package/dist/coordinate/EquinoctialElements.d.ts +0 -114
  104. package/dist/coordinate/EquinoctialElements.js +0 -172
  105. package/dist/coordinate/EquinoctialElements.js.map +0 -1
  106. package/dist/coordinate/FormatTle.d.ts +0 -95
  107. package/dist/coordinate/FormatTle.js +0 -188
  108. package/dist/coordinate/FormatTle.js.map +0 -1
  109. package/dist/coordinate/Geodetic.d.ts +0 -110
  110. package/dist/coordinate/Geodetic.js +0 -164
  111. package/dist/coordinate/Geodetic.js.map +0 -1
  112. package/dist/coordinate/Hill.d.ts +0 -49
  113. package/dist/coordinate/Hill.js +0 -222
  114. package/dist/coordinate/Hill.js.map +0 -1
  115. package/dist/coordinate/ITRF.d.ts +0 -75
  116. package/dist/coordinate/ITRF.js +0 -135
  117. package/dist/coordinate/ITRF.js.map +0 -1
  118. package/dist/coordinate/J2000.d.ts +0 -65
  119. package/dist/coordinate/J2000.js +0 -120
  120. package/dist/coordinate/J2000.js.map +0 -1
  121. package/dist/coordinate/RIC.d.ts +0 -64
  122. package/dist/coordinate/RIC.js +0 -79
  123. package/dist/coordinate/RIC.js.map +0 -1
  124. package/dist/coordinate/RelativeState.d.ts +0 -70
  125. package/dist/coordinate/RelativeState.js +0 -79
  126. package/dist/coordinate/RelativeState.js.map +0 -1
  127. package/dist/coordinate/StateVector.d.ts +0 -76
  128. package/dist/coordinate/StateVector.js +0 -97
  129. package/dist/coordinate/StateVector.js.map +0 -1
  130. package/dist/coordinate/TEME.d.ts +0 -57
  131. package/dist/coordinate/TEME.js +0 -89
  132. package/dist/coordinate/TEME.js.map +0 -1
  133. package/dist/coordinate/Tle.d.ts +0 -429
  134. package/dist/coordinate/Tle.js +0 -866
  135. package/dist/coordinate/Tle.js.map +0 -1
  136. package/dist/coordinate/index.d.ts +0 -12
  137. package/dist/coordinate/index.js +0 -13
  138. package/dist/coordinate/index.js.map +0 -1
  139. package/dist/coordinate/tle-format-data.d.ts +0 -41
  140. package/dist/coordinate/tle-format-data.js +0 -46
  141. package/dist/coordinate/tle-format-data.js.map +0 -1
  142. package/dist/covariance/CovarianceSample.d.ts +0 -46
  143. package/dist/covariance/CovarianceSample.js +0 -221
  144. package/dist/covariance/CovarianceSample.js.map +0 -1
  145. package/dist/covariance/StateCovariance.d.ts +0 -42
  146. package/dist/covariance/StateCovariance.js +0 -65
  147. package/dist/covariance/StateCovariance.js.map +0 -1
  148. package/dist/covariance/index.d.ts +0 -2
  149. package/dist/covariance/index.js +0 -3
  150. package/dist/covariance/index.js.map +0 -1
  151. package/dist/data/DataHandler.d.ts +0 -66
  152. package/dist/data/DataHandler.js +0 -80
  153. package/dist/data/DataHandler.js.map +0 -1
  154. package/dist/data/values/Egm96Data.d.ts +0 -37
  155. package/dist/data/values/Egm96Data.js +0 -63
  156. package/dist/data/values/Egm96Data.js.map +0 -1
  157. package/dist/data/values/HpAtmosphereData.d.ts +0 -33
  158. package/dist/data/values/HpAtmosphereData.js +0 -58
  159. package/dist/data/values/HpAtmosphereData.js.map +0 -1
  160. package/dist/data/values/HpAtmosphereResult.d.ts +0 -29
  161. package/dist/data/values/HpAtmosphereResult.js +0 -38
  162. package/dist/data/values/HpAtmosphereResult.js.map +0 -1
  163. package/dist/data/values/Iau1980Data.d.ts +0 -36
  164. package/dist/data/values/Iau1980Data.js +0 -52
  165. package/dist/data/values/Iau1980Data.js.map +0 -1
  166. package/dist/data/values/LeapSecond.d.ts +0 -27
  167. package/dist/data/values/LeapSecond.js +0 -35
  168. package/dist/data/values/LeapSecond.js.map +0 -1
  169. package/dist/data/values/LeapSecondData.d.ts +0 -41
  170. package/dist/data/values/LeapSecondData.js +0 -103
  171. package/dist/data/values/LeapSecondData.js.map +0 -1
  172. package/dist/data/values/egm96.d.ts +0 -24
  173. package/dist/data/values/egm96.js +0 -726
  174. package/dist/data/values/egm96.js.map +0 -1
  175. package/dist/data/values/hpAtmosphere.d.ts +0 -24
  176. package/dist/data/values/hpAtmosphere.js +0 -76
  177. package/dist/data/values/hpAtmosphere.js.map +0 -1
  178. package/dist/data/values/iau1980.d.ts +0 -24
  179. package/dist/data/values/iau1980.js +0 -30
  180. package/dist/data/values/iau1980.js.map +0 -1
  181. package/dist/enums/AngularDiameterMethod.d.ts +0 -27
  182. package/dist/enums/AngularDiameterMethod.js +0 -29
  183. package/dist/enums/AngularDiameterMethod.js.map +0 -1
  184. package/dist/enums/AngularDistanceMethod.d.ts +0 -27
  185. package/dist/enums/AngularDistanceMethod.js +0 -29
  186. package/dist/enums/AngularDistanceMethod.js.map +0 -1
  187. package/dist/enums/CatalogSource.d.ts +0 -10
  188. package/dist/enums/CatalogSource.js +0 -12
  189. package/dist/enums/CatalogSource.js.map +0 -1
  190. package/dist/enums/CommLink.d.ts +0 -7
  191. package/dist/enums/CommLink.js +0 -9
  192. package/dist/enums/CommLink.js.map +0 -1
  193. package/dist/enums/FovFrame.d.ts +0 -25
  194. package/dist/enums/FovFrame.js +0 -27
  195. package/dist/enums/FovFrame.js.map +0 -1
  196. package/dist/enums/FovShape.d.ts +0 -25
  197. package/dist/enums/FovShape.js +0 -27
  198. package/dist/enums/FovShape.js.map +0 -1
  199. package/dist/enums/OrbitRegime.d.ts +0 -30
  200. package/dist/enums/OrbitRegime.js +0 -32
  201. package/dist/enums/OrbitRegime.js.map +0 -1
  202. package/dist/enums/PassType.d.ts +0 -28
  203. package/dist/enums/PassType.js +0 -30
  204. package/dist/enums/PassType.js.map +0 -1
  205. package/dist/enums/SensorType.d.ts +0 -33
  206. package/dist/enums/SensorType.js +0 -35
  207. package/dist/enums/SensorType.js.map +0 -1
  208. package/dist/enums/Sgp4OpsMode.d.ts +0 -26
  209. package/dist/enums/Sgp4OpsMode.js +0 -28
  210. package/dist/enums/Sgp4OpsMode.js.map +0 -1
  211. package/dist/enums/index.d.ts +0 -10
  212. package/dist/enums/index.js +0 -11
  213. package/dist/enums/index.js.map +0 -1
  214. package/dist/errors/index.d.ts +0 -153
  215. package/dist/errors/index.js +0 -179
  216. package/dist/errors/index.js.map +0 -1
  217. package/dist/force/AtmosphericDrag.d.ts +0 -50
  218. package/dist/force/AtmosphericDrag.js +0 -92
  219. package/dist/force/AtmosphericDrag.js.map +0 -1
  220. package/dist/force/EarthGravity.d.ts +0 -53
  221. package/dist/force/EarthGravity.js +0 -142
  222. package/dist/force/EarthGravity.js.map +0 -1
  223. package/dist/force/Force.d.ts +0 -26
  224. package/dist/force/Force.js +0 -22
  225. package/dist/force/Force.js.map +0 -1
  226. package/dist/force/ForceModel.d.ts +0 -45
  227. package/dist/force/ForceModel.js +0 -83
  228. package/dist/force/ForceModel.js.map +0 -1
  229. package/dist/force/Gravity.d.ts +0 -38
  230. package/dist/force/Gravity.js +0 -47
  231. package/dist/force/Gravity.js.map +0 -1
  232. package/dist/force/SolarRadiationPressure.d.ts +0 -26
  233. package/dist/force/SolarRadiationPressure.js +0 -45
  234. package/dist/force/SolarRadiationPressure.js.map +0 -1
  235. package/dist/force/ThirdBodyGravity.d.ts +0 -26
  236. package/dist/force/ThirdBodyGravity.js +0 -59
  237. package/dist/force/ThirdBodyGravity.js.map +0 -1
  238. package/dist/force/Thrust.d.ts +0 -34
  239. package/dist/force/Thrust.js +0 -58
  240. package/dist/force/Thrust.js.map +0 -1
  241. package/dist/force/index.d.ts +0 -8
  242. package/dist/force/index.js +0 -9
  243. package/dist/force/index.js.map +0 -1
  244. package/dist/interfaces/BaseObjectParams.d.ts +0 -30
  245. package/dist/interfaces/BaseObjectParams.js +0 -24
  246. package/dist/interfaces/BaseObjectParams.js.map +0 -1
  247. package/dist/interfaces/ClassicalElementsParams.d.ts +0 -33
  248. package/dist/interfaces/ClassicalElementsParams.js +0 -24
  249. package/dist/interfaces/ClassicalElementsParams.js.map +0 -1
  250. package/dist/interfaces/EquinoctialElementsParams.d.ts +0 -35
  251. package/dist/interfaces/EquinoctialElementsParams.js +0 -24
  252. package/dist/interfaces/EquinoctialElementsParams.js.map +0 -1
  253. package/dist/interfaces/GroundPositionParams.d.ts +0 -28
  254. package/dist/interfaces/GroundPositionParams.js +0 -24
  255. package/dist/interfaces/GroundPositionParams.js.map +0 -1
  256. package/dist/interfaces/OmmFormat.d.ts +0 -62
  257. package/dist/interfaces/OmmFormat.js +0 -2
  258. package/dist/interfaces/OmmFormat.js.map +0 -1
  259. package/dist/interfaces/OptionsParams.d.ts +0 -3
  260. package/dist/interfaces/OptionsParams.js +0 -2
  261. package/dist/interfaces/OptionsParams.js.map +0 -1
  262. package/dist/interfaces/SatelliteParams.d.ts +0 -38
  263. package/dist/interfaces/SatelliteParams.js +0 -2
  264. package/dist/interfaces/SatelliteParams.js.map +0 -1
  265. package/dist/interfaces/StarObjectParams.d.ts +0 -10
  266. package/dist/interfaces/StarObjectParams.js +0 -2
  267. package/dist/interfaces/StarObjectParams.js.map +0 -1
  268. package/dist/interfaces/TimeVariables.d.ts +0 -6
  269. package/dist/interfaces/TimeVariables.js +0 -2
  270. package/dist/interfaces/TimeVariables.js.map +0 -1
  271. package/dist/interfaces/index.d.ts +0 -7
  272. package/dist/interfaces/index.js +0 -2
  273. package/dist/interfaces/index.js.map +0 -1
  274. package/dist/interpolator/ChebyshevCoefficients.d.ts +0 -50
  275. package/dist/interpolator/ChebyshevCoefficients.js +0 -94
  276. package/dist/interpolator/ChebyshevCoefficients.js.map +0 -1
  277. package/dist/interpolator/ChebyshevInterpolator.d.ts +0 -38
  278. package/dist/interpolator/ChebyshevInterpolator.js +0 -71
  279. package/dist/interpolator/ChebyshevInterpolator.js.map +0 -1
  280. package/dist/interpolator/CubicSpline.d.ts +0 -35
  281. package/dist/interpolator/CubicSpline.js +0 -69
  282. package/dist/interpolator/CubicSpline.js.map +0 -1
  283. package/dist/interpolator/CubicSplineInterpolator.d.ts +0 -36
  284. package/dist/interpolator/CubicSplineInterpolator.js +0 -80
  285. package/dist/interpolator/CubicSplineInterpolator.js.map +0 -1
  286. package/dist/interpolator/FieldInterpolator.d.ts +0 -28
  287. package/dist/interpolator/FieldInterpolator.js +0 -24
  288. package/dist/interpolator/FieldInterpolator.js.map +0 -1
  289. package/dist/interpolator/Interpolator.d.ts +0 -22
  290. package/dist/interpolator/Interpolator.js +0 -47
  291. package/dist/interpolator/Interpolator.js.map +0 -1
  292. package/dist/interpolator/LagrangeInterpolator.d.ts +0 -40
  293. package/dist/interpolator/LagrangeInterpolator.js +0 -159
  294. package/dist/interpolator/LagrangeInterpolator.js.map +0 -1
  295. package/dist/interpolator/StateInterpolator.d.ts +0 -27
  296. package/dist/interpolator/StateInterpolator.js +0 -27
  297. package/dist/interpolator/StateInterpolator.js.map +0 -1
  298. package/dist/interpolator/VerletBlendInterpolator.d.ts +0 -43
  299. package/dist/interpolator/VerletBlendInterpolator.js +0 -118
  300. package/dist/interpolator/VerletBlendInterpolator.js.map +0 -1
  301. package/dist/interpolator/index.d.ts +0 -31
  302. package/dist/interpolator/index.js +0 -32
  303. package/dist/interpolator/index.js.map +0 -1
  304. package/dist/main.js.map +0 -1
  305. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +0 -41
  306. package/dist/maneuver/TwoBurnOrbitTransfer.js +0 -65
  307. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +0 -1
  308. package/dist/maneuver/Waypoint.d.ts +0 -91
  309. package/dist/maneuver/Waypoint.js +0 -179
  310. package/dist/maneuver/Waypoint.js.map +0 -1
  311. package/dist/maneuver/index.d.ts +0 -24
  312. package/dist/maneuver/index.js +0 -25
  313. package/dist/maneuver/index.js.map +0 -1
  314. package/dist/objects/AccessCalculator.d.ts +0 -112
  315. package/dist/objects/AccessCalculator.js +0 -268
  316. package/dist/objects/AccessCalculator.js.map +0 -1
  317. package/dist/objects/AccessWindow.d.ts +0 -95
  318. package/dist/objects/AccessWindow.js +0 -69
  319. package/dist/objects/AccessWindow.js.map +0 -1
  320. package/dist/objects/BaseObject.d.ts +0 -119
  321. package/dist/objects/BaseObject.js +0 -203
  322. package/dist/objects/BaseObject.js.map +0 -1
  323. package/dist/objects/CenterBody.d.ts +0 -41
  324. package/dist/objects/CenterBody.js +0 -85
  325. package/dist/objects/CenterBody.js.map +0 -1
  326. package/dist/objects/DynamicGroundObject.d.ts +0 -309
  327. package/dist/objects/DynamicGroundObject.js +0 -758
  328. package/dist/objects/DynamicGroundObject.js.map +0 -1
  329. package/dist/objects/EphemerisSatellite.d.ts +0 -209
  330. package/dist/objects/EphemerisSatellite.js +0 -480
  331. package/dist/objects/EphemerisSatellite.js.map +0 -1
  332. package/dist/objects/GroundObject.d.ts +0 -124
  333. package/dist/objects/GroundObject.js +0 -192
  334. package/dist/objects/GroundObject.js.map +0 -1
  335. package/dist/objects/GroundStation.d.ts +0 -60
  336. package/dist/objects/GroundStation.js +0 -113
  337. package/dist/objects/GroundStation.js.map +0 -1
  338. package/dist/objects/History.d.ts +0 -101
  339. package/dist/objects/History.js +0 -180
  340. package/dist/objects/History.js.map +0 -1
  341. package/dist/objects/InterpolatorType.d.ts +0 -39
  342. package/dist/objects/InterpolatorType.js +0 -41
  343. package/dist/objects/InterpolatorType.js.map +0 -1
  344. package/dist/objects/LandObject.d.ts +0 -38
  345. package/dist/objects/LandObject.js +0 -48
  346. package/dist/objects/LandObject.js.map +0 -1
  347. package/dist/objects/Marker.d.ts +0 -24
  348. package/dist/objects/Marker.js +0 -30
  349. package/dist/objects/Marker.js.map +0 -1
  350. package/dist/objects/ObjectTypes.d.ts +0 -60
  351. package/dist/objects/ObjectTypes.js +0 -18
  352. package/dist/objects/ObjectTypes.js.map +0 -1
  353. package/dist/objects/Satellite.d.ts +0 -443
  354. package/dist/objects/Satellite.js +0 -843
  355. package/dist/objects/Satellite.js.map +0 -1
  356. package/dist/objects/SpaceObject.d.ts +0 -205
  357. package/dist/objects/SpaceObject.js +0 -149
  358. package/dist/objects/SpaceObject.js.map +0 -1
  359. package/dist/objects/Star.d.ts +0 -44
  360. package/dist/objects/Star.js +0 -95
  361. package/dist/objects/Star.js.map +0 -1
  362. package/dist/objects/VisualizationHelpers.d.ts +0 -148
  363. package/dist/objects/VisualizationHelpers.js +0 -218
  364. package/dist/objects/VisualizationHelpers.js.map +0 -1
  365. package/dist/objects/index.d.ts +0 -24
  366. package/dist/objects/index.js +0 -16
  367. package/dist/objects/index.js.map +0 -1
  368. package/dist/observation/Observation.d.ts +0 -89
  369. package/dist/observation/Observation.js +0 -51
  370. package/dist/observation/Observation.js.map +0 -1
  371. package/dist/observation/ObservationOptical.d.ts +0 -48
  372. package/dist/observation/ObservationOptical.js +0 -105
  373. package/dist/observation/ObservationOptical.js.map +0 -1
  374. package/dist/observation/ObservationRadar.d.ts +0 -46
  375. package/dist/observation/ObservationRadar.js +0 -96
  376. package/dist/observation/ObservationRadar.js.map +0 -1
  377. package/dist/observation/ObservationUtils.d.ts +0 -22
  378. package/dist/observation/ObservationUtils.js +0 -46
  379. package/dist/observation/ObservationUtils.js.map +0 -1
  380. package/dist/observation/PropagatorPairs.d.ts +0 -32
  381. package/dist/observation/PropagatorPairs.js +0 -43
  382. package/dist/observation/PropagatorPairs.js.map +0 -1
  383. package/dist/observation/RAE.d.ts +0 -111
  384. package/dist/observation/RAE.js +0 -214
  385. package/dist/observation/RAE.js.map +0 -1
  386. package/dist/observation/RadecGeocentric.d.ts +0 -111
  387. package/dist/observation/RadecGeocentric.js +0 -169
  388. package/dist/observation/RadecGeocentric.js.map +0 -1
  389. package/dist/observation/RadecTopocentric.d.ts +0 -123
  390. package/dist/observation/RadecTopocentric.js +0 -200
  391. package/dist/observation/RadecTopocentric.js.map +0 -1
  392. package/dist/observation/index.d.ts +0 -26
  393. package/dist/observation/index.js +0 -27
  394. package/dist/observation/index.js.map +0 -1
  395. package/dist/operations/BoxMuller.d.ts +0 -46
  396. package/dist/operations/BoxMuller.js +0 -77
  397. package/dist/operations/BoxMuller.js.map +0 -1
  398. package/dist/operations/EulerAngles.d.ts +0 -105
  399. package/dist/operations/EulerAngles.js +0 -161
  400. package/dist/operations/EulerAngles.js.map +0 -1
  401. package/dist/operations/Matrix.d.ts +0 -170
  402. package/dist/operations/Matrix.js +0 -405
  403. package/dist/operations/Matrix.js.map +0 -1
  404. package/dist/operations/Quaternion.d.ts +0 -56
  405. package/dist/operations/Quaternion.js +0 -167
  406. package/dist/operations/Quaternion.js.map +0 -1
  407. package/dist/operations/Random.d.ts +0 -40
  408. package/dist/operations/Random.js +0 -50
  409. package/dist/operations/Random.js.map +0 -1
  410. package/dist/operations/RandomGaussianSource.d.ts +0 -24
  411. package/dist/operations/RandomGaussianSource.js +0 -43
  412. package/dist/operations/RandomGaussianSource.js.map +0 -1
  413. package/dist/operations/Vector.d.ts +0 -262
  414. package/dist/operations/Vector.js +0 -415
  415. package/dist/operations/Vector.js.map +0 -1
  416. package/dist/operations/Vector3D.d.ts +0 -80
  417. package/dist/operations/Vector3D.js +0 -224
  418. package/dist/operations/Vector3D.js.map +0 -1
  419. package/dist/operations/index.d.ts +0 -4
  420. package/dist/operations/index.js +0 -5
  421. package/dist/operations/index.js.map +0 -1
  422. package/dist/operations/operations.d.ts +0 -26
  423. package/dist/operations/operations.js +0 -27
  424. package/dist/operations/operations.js.map +0 -1
  425. package/dist/optimize/ChebyshevCompressor.d.ts +0 -80
  426. package/dist/optimize/ChebyshevCompressor.js +0 -128
  427. package/dist/optimize/ChebyshevCompressor.js.map +0 -1
  428. package/dist/optimize/DownhillSimplex.d.ts +0 -98
  429. package/dist/optimize/DownhillSimplex.js +0 -216
  430. package/dist/optimize/DownhillSimplex.js.map +0 -1
  431. package/dist/optimize/GoldenSection.d.ts +0 -177
  432. package/dist/optimize/GoldenSection.js +0 -202
  433. package/dist/optimize/GoldenSection.js.map +0 -1
  434. package/dist/optimize/PolynomialRegression.d.ts +0 -151
  435. package/dist/optimize/PolynomialRegression.js +0 -184
  436. package/dist/optimize/PolynomialRegression.js.map +0 -1
  437. package/dist/optimize/SimpleLinearRegression.d.ts +0 -153
  438. package/dist/optimize/SimpleLinearRegression.js +0 -212
  439. package/dist/optimize/SimpleLinearRegression.js.map +0 -1
  440. package/dist/optimize/index.d.ts +0 -5
  441. package/dist/optimize/index.js +0 -6
  442. package/dist/optimize/index.js.map +0 -1
  443. package/dist/optimize/internal/PolynomicalRegressionResult.d.ts +0 -118
  444. package/dist/optimize/internal/PolynomicalRegressionResult.js +0 -123
  445. package/dist/optimize/internal/PolynomicalRegressionResult.js.map +0 -1
  446. package/dist/optimize/internal/SimplexEntry.d.ts +0 -150
  447. package/dist/optimize/internal/SimplexEntry.js +0 -147
  448. package/dist/optimize/internal/SimplexEntry.js.map +0 -1
  449. package/dist/orbit-design/RepeatGroundTrack.d.ts +0 -184
  450. package/dist/orbit-design/RepeatGroundTrack.js +0 -359
  451. package/dist/orbit-design/RepeatGroundTrack.js.map +0 -1
  452. package/dist/orbit-design/index.d.ts +0 -18
  453. package/dist/orbit-design/index.js +0 -18
  454. package/dist/orbit-design/index.js.map +0 -1
  455. package/dist/orbit-determination/BatchLeastSquaresOD.d.ts +0 -69
  456. package/dist/orbit-determination/BatchLeastSquaresOD.js +0 -143
  457. package/dist/orbit-determination/BatchLeastSquaresOD.js.map +0 -1
  458. package/dist/orbit-determination/BatchLeastSquaresResult.d.ts +0 -31
  459. package/dist/orbit-determination/BatchLeastSquaresResult.js +0 -36
  460. package/dist/orbit-determination/BatchLeastSquaresResult.js.map +0 -1
  461. package/dist/orbit-determination/GaussIOD.d.ts +0 -98
  462. package/dist/orbit-determination/GaussIOD.js +0 -294
  463. package/dist/orbit-determination/GaussIOD.js.map +0 -1
  464. package/dist/orbit-determination/GibbsIOD.d.ts +0 -38
  465. package/dist/orbit-determination/GibbsIOD.js +0 -77
  466. package/dist/orbit-determination/GibbsIOD.js.map +0 -1
  467. package/dist/orbit-determination/GoodingIOD.d.ts +0 -155
  468. package/dist/orbit-determination/GoodingIOD.js +0 -492
  469. package/dist/orbit-determination/GoodingIOD.js.map +0 -1
  470. package/dist/orbit-determination/HerrickGibbsIOD.d.ts +0 -33
  471. package/dist/orbit-determination/HerrickGibbsIOD.js +0 -50
  472. package/dist/orbit-determination/HerrickGibbsIOD.js.map +0 -1
  473. package/dist/orbit-determination/LambertIOD.d.ts +0 -59
  474. package/dist/orbit-determination/LambertIOD.js +0 -213
  475. package/dist/orbit-determination/LambertIOD.js.map +0 -1
  476. package/dist/orbit-determination/LevenbergMarquardtOD.d.ts +0 -72
  477. package/dist/orbit-determination/LevenbergMarquardtOD.js +0 -202
  478. package/dist/orbit-determination/LevenbergMarquardtOD.js.map +0 -1
  479. package/dist/orbit-determination/LevenbergMarquardtResult.d.ts +0 -36
  480. package/dist/orbit-determination/LevenbergMarquardtResult.js +0 -43
  481. package/dist/orbit-determination/LevenbergMarquardtResult.js.map +0 -1
  482. package/dist/orbit-determination/ModifiedGoodingIOD.d.ts +0 -41
  483. package/dist/orbit-determination/ModifiedGoodingIOD.js +0 -94
  484. package/dist/orbit-determination/ModifiedGoodingIOD.js.map +0 -1
  485. package/dist/orbit-determination/index.d.ts +0 -9
  486. package/dist/orbit-determination/index.js +0 -10
  487. package/dist/orbit-determination/index.js.map +0 -1
  488. package/dist/parsers/CdmExporter.d.ts +0 -85
  489. package/dist/parsers/CdmExporter.js +0 -235
  490. package/dist/parsers/CdmExporter.js.map +0 -1
  491. package/dist/parsers/CdmParser.d.ts +0 -97
  492. package/dist/parsers/CdmParser.js +0 -396
  493. package/dist/parsers/CdmParser.js.map +0 -1
  494. package/dist/parsers/CdmTypes.d.ts +0 -240
  495. package/dist/parsers/CdmTypes.js +0 -18
  496. package/dist/parsers/CdmTypes.js.map +0 -1
  497. package/dist/parsers/HorizonsParser.d.ts +0 -128
  498. package/dist/parsers/HorizonsParser.js +0 -320
  499. package/dist/parsers/HorizonsParser.js.map +0 -1
  500. package/dist/parsers/OemParser.d.ts +0 -56
  501. package/dist/parsers/OemParser.js +0 -235
  502. package/dist/parsers/OemParser.js.map +0 -1
  503. package/dist/parsers/OemTypes.d.ts +0 -100
  504. package/dist/parsers/OemTypes.js +0 -18
  505. package/dist/parsers/OemTypes.js.map +0 -1
  506. package/dist/parsers/index.d.ts +0 -23
  507. package/dist/parsers/index.js +0 -24
  508. package/dist/parsers/index.js.map +0 -1
  509. package/dist/propagator/DormandPrince54Propagator.d.ts +0 -28
  510. package/dist/propagator/DormandPrince54Propagator.js +0 -64
  511. package/dist/propagator/DormandPrince54Propagator.js.map +0 -1
  512. package/dist/propagator/KeplerPropagator.d.ts +0 -35
  513. package/dist/propagator/KeplerPropagator.js +0 -83
  514. package/dist/propagator/KeplerPropagator.js.map +0 -1
  515. package/dist/propagator/Propagator.d.ts +0 -34
  516. package/dist/propagator/Propagator.js +0 -162
  517. package/dist/propagator/Propagator.js.map +0 -1
  518. package/dist/propagator/RkCheckpoint.d.ts +0 -22
  519. package/dist/propagator/RkCheckpoint.js +0 -27
  520. package/dist/propagator/RkCheckpoint.js.map +0 -1
  521. package/dist/propagator/RkResult.d.ts +0 -23
  522. package/dist/propagator/RkResult.js +0 -30
  523. package/dist/propagator/RkResult.js.map +0 -1
  524. package/dist/propagator/RungeKutta4Propagator.d.ts +0 -50
  525. package/dist/propagator/RungeKutta4Propagator.js +0 -141
  526. package/dist/propagator/RungeKutta4Propagator.js.map +0 -1
  527. package/dist/propagator/RungeKutta89Propagator.d.ts +0 -28
  528. package/dist/propagator/RungeKutta89Propagator.js +0 -126
  529. package/dist/propagator/RungeKutta89Propagator.js.map +0 -1
  530. package/dist/propagator/RungeKuttaAdaptive.d.ts +0 -51
  531. package/dist/propagator/RungeKuttaAdaptive.js +0 -199
  532. package/dist/propagator/RungeKuttaAdaptive.js.map +0 -1
  533. package/dist/propagator/Sgp4Propagator.d.ts +0 -76
  534. package/dist/propagator/Sgp4Propagator.js +0 -96
  535. package/dist/propagator/Sgp4Propagator.js.map +0 -1
  536. package/dist/propagator/index.d.ts +0 -9
  537. package/dist/propagator/index.js +0 -10
  538. package/dist/propagator/index.js.map +0 -1
  539. package/dist/scheduling/ContactScheduler.d.ts +0 -248
  540. package/dist/scheduling/ContactScheduler.js +0 -503
  541. package/dist/scheduling/ContactScheduler.js.map +0 -1
  542. package/dist/scheduling/ScheduledContact.d.ts +0 -155
  543. package/dist/scheduling/ScheduledContact.js +0 -189
  544. package/dist/scheduling/ScheduledContact.js.map +0 -1
  545. package/dist/scheduling/index.d.ts +0 -5
  546. package/dist/scheduling/index.js +0 -4
  547. package/dist/scheduling/index.js.map +0 -1
  548. package/dist/sensor/FieldOfView.d.ts +0 -250
  549. package/dist/sensor/FieldOfView.js +0 -470
  550. package/dist/sensor/FieldOfView.js.map +0 -1
  551. package/dist/sensor/LaserRangingSensor.d.ts +0 -122
  552. package/dist/sensor/LaserRangingSensor.js +0 -174
  553. package/dist/sensor/LaserRangingSensor.js.map +0 -1
  554. package/dist/sensor/MechanicalRadar.d.ts +0 -86
  555. package/dist/sensor/MechanicalRadar.js +0 -130
  556. package/dist/sensor/MechanicalRadar.js.map +0 -1
  557. package/dist/sensor/OpticalSensor.d.ts +0 -111
  558. package/dist/sensor/OpticalSensor.js +0 -164
  559. package/dist/sensor/OpticalSensor.js.map +0 -1
  560. package/dist/sensor/PassiveRFSensor.d.ts +0 -115
  561. package/dist/sensor/PassiveRFSensor.js +0 -168
  562. package/dist/sensor/PassiveRFSensor.js.map +0 -1
  563. package/dist/sensor/PhasedArrayRadar.d.ts +0 -170
  564. package/dist/sensor/PhasedArrayRadar.js +0 -290
  565. package/dist/sensor/PhasedArrayRadar.js.map +0 -1
  566. package/dist/sensor/RadarSensor.d.ts +0 -94
  567. package/dist/sensor/RadarSensor.js +0 -106
  568. package/dist/sensor/RadarSensor.js.map +0 -1
  569. package/dist/sensor/Sensor.d.ts +0 -271
  570. package/dist/sensor/Sensor.js +0 -343
  571. package/dist/sensor/Sensor.js.map +0 -1
  572. package/dist/sensor/index.d.ts +0 -74
  573. package/dist/sensor/index.js +0 -70
  574. package/dist/sensor/index.js.map +0 -1
  575. package/dist/sgp4/index.d.ts +0 -25
  576. package/dist/sgp4/index.js +0 -25
  577. package/dist/sgp4/index.js.map +0 -1
  578. package/dist/sgp4/sgp4-error.d.ts +0 -22
  579. package/dist/sgp4/sgp4-error.js +0 -44
  580. package/dist/sgp4/sgp4-error.js.map +0 -1
  581. package/dist/sgp4/sgp4.d.ts +0 -99
  582. package/dist/sgp4/sgp4.js +0 -3170
  583. package/dist/sgp4/sgp4.js.map +0 -1
  584. package/dist/smoothing/ExponentialSmoothing.d.ts +0 -37
  585. package/dist/smoothing/ExponentialSmoothing.js +0 -75
  586. package/dist/smoothing/ExponentialSmoothing.js.map +0 -1
  587. package/dist/time/Epoch.d.ts +0 -81
  588. package/dist/time/Epoch.js +0 -146
  589. package/dist/time/Epoch.js.map +0 -1
  590. package/dist/time/EpochGPS.d.ts +0 -106
  591. package/dist/time/EpochGPS.js +0 -134
  592. package/dist/time/EpochGPS.js.map +0 -1
  593. package/dist/time/EpochTAI.d.ts +0 -62
  594. package/dist/time/EpochTAI.js +0 -63
  595. package/dist/time/EpochTAI.js.map +0 -1
  596. package/dist/time/EpochTDB.d.ts +0 -72
  597. package/dist/time/EpochTDB.js +0 -73
  598. package/dist/time/EpochTDB.js.map +0 -1
  599. package/dist/time/EpochTT.d.ts +0 -75
  600. package/dist/time/EpochTT.js +0 -76
  601. package/dist/time/EpochTT.js.map +0 -1
  602. package/dist/time/EpochUTC.d.ts +0 -123
  603. package/dist/time/EpochUTC.js +0 -200
  604. package/dist/time/EpochUTC.js.map +0 -1
  605. package/dist/time/EpochWindow.d.ts +0 -28
  606. package/dist/time/EpochWindow.js +0 -31
  607. package/dist/time/EpochWindow.js.map +0 -1
  608. package/dist/time/TimeStamped.d.ts +0 -61
  609. package/dist/time/TimeStamped.js +0 -73
  610. package/dist/time/TimeStamped.js.map +0 -1
  611. package/dist/time/index.d.ts +0 -8
  612. package/dist/time/index.js +0 -9
  613. package/dist/time/index.js.map +0 -1
  614. package/dist/transforms/TransformCache.d.ts +0 -27
  615. package/dist/transforms/TransformCache.js +0 -41
  616. package/dist/transforms/TransformCache.js.map +0 -1
  617. package/dist/transforms/conversions.d.ts +0 -63
  618. package/dist/transforms/conversions.js +0 -89
  619. package/dist/transforms/conversions.js.map +0 -1
  620. package/dist/transforms/index.d.ts +0 -2
  621. package/dist/transforms/index.js +0 -3
  622. package/dist/transforms/index.js.map +0 -1
  623. package/dist/transforms/transforms.d.ts +0 -241
  624. package/dist/transforms/transforms.js +0 -479
  625. package/dist/transforms/transforms.js.map +0 -1
  626. package/dist/types/types.d.ts +0 -757
  627. package/dist/types/types.js +0 -90
  628. package/dist/types/types.js.map +0 -1
  629. package/dist/utils/constants.d.ts +0 -80
  630. package/dist/utils/constants.js +0 -87
  631. package/dist/utils/constants.js.map +0 -1
  632. package/dist/utils/create-covariance-from-tle.d.ts +0 -18
  633. package/dist/utils/create-covariance-from-tle.js +0 -57
  634. package/dist/utils/create-covariance-from-tle.js.map +0 -1
  635. package/dist/utils/functions.d.ts +0 -236
  636. package/dist/utils/functions.js +0 -501
  637. package/dist/utils/functions.js.map +0 -1
  638. package/dist/utils/index.d.ts +0 -5
  639. package/dist/utils/index.js +0 -6
  640. package/dist/utils/index.js.map +0 -1
  641. package/dist/utils/jacobian.d.ts +0 -17
  642. package/dist/utils/jacobian.js +0 -34
  643. package/dist/utils/jacobian.js.map +0 -1
  644. package/dist/utils/linearDistance.d.ts +0 -8
  645. package/dist/utils/linearDistance.js +0 -10
  646. package/dist/utils/linearDistance.js.map +0 -1
  647. package/docs/README.md +0 -151
  648. package/docs/getting-started.md +0 -792
  649. package/docs/lambert-satellite-integration-guide.md +0 -766
  650. package/docs/user-guide.md +0 -1935
  651. package/jest.config.mjs +0 -29
  652. package/src/body/CelestialBody.ts +0 -316
  653. package/src/body/CelestialBodyType.ts +0 -55
  654. package/src/body/Earth.ts +0 -260
  655. package/src/body/EphemerisBody.ts +0 -349
  656. package/src/body/MoonBody.ts +0 -552
  657. package/src/body/NutationAngles.ts +0 -40
  658. package/src/body/PlanetBody.ts +0 -354
  659. package/src/body/PrecessionAngles.ts +0 -31
  660. package/src/body/SolarSystem.ts +0 -276
  661. package/src/body/SunBody.ts +0 -538
  662. package/src/body/__tests__/Earth.test.ts +0 -135
  663. package/src/body/__tests__/EphemerisBody.test.ts +0 -323
  664. package/src/body/__tests__/MoonBody.test.ts +0 -198
  665. package/src/body/__tests__/PlanetBody.test.ts +0 -257
  666. package/src/body/__tests__/SolarSystem.test.ts +0 -237
  667. package/src/body/__tests__/SunBody.test.ts +0 -227
  668. package/src/body/__tests__/__snapshots__/Earth.test.ts.snap +0 -39
  669. package/src/body/index.ts +0 -64
  670. package/src/body/suncalc.LICENSE.md +0 -18
  671. package/src/comm/Antenna.ts +0 -213
  672. package/src/comm/Beacon.ts +0 -328
  673. package/src/comm/CommTypes.ts +0 -216
  674. package/src/comm/CommunicationDevice.ts +0 -199
  675. package/src/comm/Receiver.ts +0 -263
  676. package/src/comm/Transmitter.ts +0 -349
  677. package/src/comm/Transponder.ts +0 -360
  678. package/src/comm/__tests__/Antenna.test.ts +0 -155
  679. package/src/comm/__tests__/Beacon.test.ts +0 -333
  680. package/src/comm/__tests__/CommTypes.test.ts +0 -165
  681. package/src/comm/__tests__/Receiver.test.ts +0 -215
  682. package/src/comm/__tests__/Transmitter.test.ts +0 -164
  683. package/src/comm/__tests__/Transponder.test.ts +0 -181
  684. package/src/comm/index.ts +0 -60
  685. package/src/conjunction/CatalogScreener.ts +0 -322
  686. package/src/conjunction/ConjunctionAssessment.ts +0 -410
  687. package/src/conjunction/ConjunctionEvent.ts +0 -185
  688. package/src/conjunction/CovarianceRealism.ts +0 -472
  689. package/src/conjunction/ProbabilityOfCollision.ts +0 -302
  690. package/src/conjunction/ScreeningFilter.ts +0 -206
  691. package/src/conjunction/__tests__/CatalogScreener.test.ts +0 -280
  692. package/src/conjunction/__tests__/ConjunctionAssessment.basic.test.ts +0 -250
  693. package/src/conjunction/__tests__/ConjunctionAssessment.highfidelity.test.ts +0 -76
  694. package/src/conjunction/__tests__/CovarianceRealism.test.ts +0 -296
  695. package/src/conjunction/index.ts +0 -35
  696. package/src/constellation/ConstellationGenerator.ts +0 -377
  697. package/src/constellation/__tests__/ConstellationGenerator.test.ts +0 -446
  698. package/src/constellation/index.ts +0 -18
  699. package/src/coordinate/ClassicalElements.ts +0 -394
  700. package/src/coordinate/EquinoctialElements.ts +0 -189
  701. package/src/coordinate/FormatTle.ts +0 -219
  702. package/src/coordinate/Geodetic.ts +0 -191
  703. package/src/coordinate/Hill.ts +0 -326
  704. package/src/coordinate/ITRF.ts +0 -146
  705. package/src/coordinate/J2000.ts +0 -130
  706. package/src/coordinate/README.md +0 -788
  707. package/src/coordinate/RIC.ts +0 -87
  708. package/src/coordinate/RelativeState.ts +0 -101
  709. package/src/coordinate/StateVector.ts +0 -128
  710. package/src/coordinate/TEME.ts +0 -97
  711. package/src/coordinate/Tle.ts +0 -1025
  712. package/src/coordinate/__tests__/ClassicalElements.test.ts +0 -129
  713. package/src/coordinate/__tests__/EquinoctialElements.test.ts +0 -108
  714. package/src/coordinate/__tests__/FormatTle.test.ts +0 -92
  715. package/src/coordinate/__tests__/Geodetic.test.ts +0 -165
  716. package/src/coordinate/__tests__/Hill.test.ts +0 -195
  717. package/src/coordinate/__tests__/ITRF.test.ts +0 -231
  718. package/src/coordinate/__tests__/J2000.test.ts +0 -132
  719. package/src/coordinate/__tests__/RIC.test.ts +0 -107
  720. package/src/coordinate/__tests__/TEME.test.ts +0 -48
  721. package/src/coordinate/__tests__/Tle.test.ts +0 -185
  722. package/src/coordinate/__tests__/__snapshots__/ClassicalElements.test.ts.snap +0 -106
  723. package/src/coordinate/__tests__/__snapshots__/EquinoctialElements.test.ts.snap +0 -93
  724. package/src/coordinate/__tests__/__snapshots__/Geodetic.test.ts.snap +0 -54
  725. package/src/coordinate/__tests__/__snapshots__/ITRF.test.ts.snap +0 -321
  726. package/src/coordinate/__tests__/__snapshots__/J2000.test.ts.snap +0 -26
  727. package/src/coordinate/__tests__/__snapshots__/RIC.test.ts.snap +0 -79
  728. package/src/coordinate/__tests__/__snapshots__/TEME.test.ts.snap +0 -41
  729. package/src/coordinate/__tests__/__snapshots__/Tle.test.ts.snap +0 -180
  730. package/src/coordinate/index.ts +0 -13
  731. package/src/coordinate/tle-format-data.ts +0 -47
  732. package/src/covariance/CovarianceSample.ts +0 -292
  733. package/src/covariance/StateCovariance.ts +0 -69
  734. package/src/covariance/__tests__/CovarianceSample.test.ts +0 -143
  735. package/src/covariance/__tests__/StateCovariance.test.ts +0 -90
  736. package/src/covariance/index.ts +0 -3
  737. package/src/data/DataHandler.ts +0 -88
  738. package/src/data/values/Egm96Data.ts +0 -75
  739. package/src/data/values/HpAtmosphereData.ts +0 -76
  740. package/src/data/values/HpAtmosphereResult.ts +0 -41
  741. package/src/data/values/Iau1980Data.ts +0 -63
  742. package/src/data/values/LeapSecond.ts +0 -37
  743. package/src/data/values/LeapSecondData.ts +0 -113
  744. package/src/data/values/__tests__/Egm96Data.test.ts +0 -33
  745. package/src/data/values/__tests__/HpAtmosphereData.test.ts +0 -82
  746. package/src/data/values/__tests__/LeapSecondData.test.ts +0 -59
  747. package/src/data/values/egm96.ts +0 -728
  748. package/src/data/values/hpAtmosphere.ts +0 -79
  749. package/src/data/values/iau1980.ts +0 -32
  750. package/src/enums/AngularDiameterMethod.ts +0 -28
  751. package/src/enums/AngularDistanceMethod.ts +0 -28
  752. package/src/enums/CatalogSource.ts +0 -10
  753. package/src/enums/CommLink.ts +0 -7
  754. package/src/enums/FovFrame.ts +0 -26
  755. package/src/enums/FovShape.ts +0 -26
  756. package/src/enums/OrbitRegime.ts +0 -31
  757. package/src/enums/PassType.ts +0 -29
  758. package/src/enums/SensorType.ts +0 -34
  759. package/src/enums/Sgp4OpsMode.ts +0 -27
  760. package/src/enums/index.ts +0 -11
  761. package/src/errors/__tests__/errors.test.ts +0 -196
  762. package/src/errors/index.ts +0 -185
  763. package/src/fetch/horizons-constants.ts +0 -53
  764. package/src/fetch/horizons-interfaces.ts +0 -38
  765. package/src/fetch/horizons.ts +0 -300
  766. package/src/fetch/index.ts +0 -26
  767. package/src/force/AtmosphericDrag.ts +0 -120
  768. package/src/force/EarthGravity.ts +0 -182
  769. package/src/force/Force.ts +0 -31
  770. package/src/force/ForceModel.ts +0 -99
  771. package/src/force/Gravity.ts +0 -53
  772. package/src/force/README.md +0 -99
  773. package/src/force/SolarRadiationPressure.ts +0 -43
  774. package/src/force/ThirdBodyGravity.ts +0 -64
  775. package/src/force/Thrust.ts +0 -83
  776. package/src/force/__tests__/AtmosphericDrag.test.ts +0 -168
  777. package/src/force/__tests__/EarthGravity.test.ts +0 -115
  778. package/src/force/__tests__/ForceModel.test.ts +0 -188
  779. package/src/force/__tests__/Gravity.test.ts +0 -81
  780. package/src/force/__tests__/SolarRadiationPressure.test.ts +0 -115
  781. package/src/force/__tests__/ThirdBodyGravity.test.ts +0 -119
  782. package/src/force/__tests__/Thrust.test.ts +0 -132
  783. package/src/force/index.ts +0 -9
  784. package/src/interfaces/BaseObjectParams.ts +0 -32
  785. package/src/interfaces/ClassicalElementsParams.ts +0 -35
  786. package/src/interfaces/EquinoctialElementsParams.ts +0 -37
  787. package/src/interfaces/GroundPositionParams.ts +0 -30
  788. package/src/interfaces/OmmFormat.ts +0 -63
  789. package/src/interfaces/OptionsParams.ts +0 -3
  790. package/src/interfaces/SatelliteParams.ts +0 -57
  791. package/src/interfaces/StarObjectParams.ts +0 -11
  792. package/src/interfaces/TimeVariables.ts +0 -7
  793. package/src/interfaces/index.ts +0 -8
  794. package/src/interpolator/ChebyshevCoefficients.ts +0 -109
  795. package/src/interpolator/ChebyshevInterpolator.ts +0 -87
  796. package/src/interpolator/CubicSpline.ts +0 -72
  797. package/src/interpolator/CubicSplineInterpolator.ts +0 -90
  798. package/src/interpolator/FieldInterpolator.ts +0 -35
  799. package/src/interpolator/Interpolator.ts +0 -56
  800. package/src/interpolator/LagrangeInterpolator.ts +0 -192
  801. package/src/interpolator/StateInterpolator.ts +0 -37
  802. package/src/interpolator/VerletBlendInterpolator.ts +0 -146
  803. package/src/interpolator/__tests__/ChebyshevCoefficients.test.ts +0 -105
  804. package/src/interpolator/__tests__/ChebyshevInterpolator.test.ts +0 -81
  805. package/src/interpolator/__tests__/CubicSpline.test.ts +0 -80
  806. package/src/interpolator/__tests__/CubicSplineInterpolator.test.ts +0 -94
  807. package/src/interpolator/__tests__/FieldInterpolator.test.ts +0 -59
  808. package/src/interpolator/__tests__/Interpolator.test.ts +0 -131
  809. package/src/interpolator/__tests__/LagrangeInterpolator.test.ts +0 -121
  810. package/src/interpolator/__tests__/StateInterpolator.test.ts +0 -57
  811. package/src/interpolator/__tests__/VerletBlendInterpolator.test.ts +0 -116
  812. package/src/interpolator/index.ts +0 -32
  813. package/src/main.ts +0 -87
  814. package/src/maneuver/TwoBurnOrbitTransfer.ts +0 -79
  815. package/src/maneuver/Waypoint.ts +0 -267
  816. package/src/maneuver/__tests__/TwoBurnOrbitTransfer.test.ts +0 -90
  817. package/src/maneuver/__tests__/Waypoint.test.ts +0 -427
  818. package/src/maneuver/index.ts +0 -25
  819. package/src/objects/AccessCalculator.ts +0 -345
  820. package/src/objects/AccessWindow.ts +0 -129
  821. package/src/objects/BaseObject.ts +0 -242
  822. package/src/objects/CenterBody.ts +0 -88
  823. package/src/objects/DynamicGroundObject.ts +0 -975
  824. package/src/objects/EphemerisSatellite.ts +0 -629
  825. package/src/objects/GroundObject.ts +0 -246
  826. package/src/objects/GroundStation.ts +0 -130
  827. package/src/objects/History.ts +0 -228
  828. package/src/objects/InterpolatorType.ts +0 -42
  829. package/src/objects/LandObject.ts +0 -62
  830. package/src/objects/Marker.ts +0 -32
  831. package/src/objects/ObjectTypes.ts +0 -66
  832. package/src/objects/Satellite.ts +0 -1013
  833. package/src/objects/SpaceObject.ts +0 -304
  834. package/src/objects/Star.ts +0 -135
  835. package/src/objects/VisualizationHelpers.ts +0 -324
  836. package/src/objects/__tests__/AccessCalculator.test.ts +0 -499
  837. package/src/objects/__tests__/DynamicGroundObject.test.ts +0 -859
  838. package/src/objects/__tests__/EphemerisSatellite.test.ts +0 -589
  839. package/src/objects/__tests__/GroundStation.test.ts +0 -204
  840. package/src/objects/__tests__/Satellite.test.ts +0 -487
  841. package/src/objects/__tests__/SpaceObject.rae.test.ts +0 -156
  842. package/src/objects/__tests__/VisualizationHelpers.test.ts +0 -438
  843. package/src/objects/index.ts +0 -31
  844. package/src/observation/Observation.ts +0 -113
  845. package/src/observation/ObservationOptical.ts +0 -146
  846. package/src/observation/ObservationRadar.ts +0 -135
  847. package/src/observation/ObservationUtils.ts +0 -69
  848. package/src/observation/PropagatorPairs.ts +0 -45
  849. package/src/observation/RAE.ts +0 -261
  850. package/src/observation/RadecGeocentric.ts +0 -206
  851. package/src/observation/RadecTopocentric.ts +0 -247
  852. package/src/observation/__tests__/RAE.test.ts +0 -135
  853. package/src/observation/__tests__/RadecGeocentric.test.ts +0 -107
  854. package/src/observation/__tests__/RadecTopocentric.test.ts +0 -121
  855. package/src/observation/__tests__/__snapshots__/RAE.test.ts.snap +0 -91
  856. package/src/observation/__tests__/__snapshots__/RadecGeocentric.test.ts.snap +0 -71
  857. package/src/observation/__tests__/__snapshots__/RadecTopocentric.test.ts.snap +0 -71
  858. package/src/observation/index.ts +0 -28
  859. package/src/operations/BoxMuller.ts +0 -87
  860. package/src/operations/EulerAngles.ts +0 -183
  861. package/src/operations/Matrix.ts +0 -473
  862. package/src/operations/Quaternion.ts +0 -222
  863. package/src/operations/Random.ts +0 -54
  864. package/src/operations/RandomGaussianSource.ts +0 -51
  865. package/src/operations/Vector.ts +0 -484
  866. package/src/operations/Vector3D.ts +0 -272
  867. package/src/operations/__tests__/Matrix.test.ts +0 -277
  868. package/src/operations/__tests__/Random.test.ts +0 -24
  869. package/src/operations/__tests__/Vector.test.ts +0 -269
  870. package/src/operations/__tests__/Vector3D.test.ts +0 -100
  871. package/src/operations/__tests__/__snapshots__/Matrix.test.ts.snap +0 -161
  872. package/src/operations/__tests__/__snapshots__/Random.test.ts.snap +0 -7
  873. package/src/operations/__tests__/__snapshots__/Vector.test.ts.snap +0 -218
  874. package/src/operations/__tests__/__snapshots__/Vector3D.test.ts.snap +0 -138
  875. package/src/operations/index.ts +0 -5
  876. package/src/operations/operations.ts +0 -28
  877. package/src/optimize/ChebyshevCompressor.ts +0 -141
  878. package/src/optimize/DownhillSimplex.ts +0 -246
  879. package/src/optimize/GoldenSection.ts +0 -230
  880. package/src/optimize/PolynomialRegression.ts +0 -211
  881. package/src/optimize/README.md +0 -343
  882. package/src/optimize/SimpleLinearRegression.ts +0 -227
  883. package/src/optimize/__tests__/ChebyshevCompressor.test.ts +0 -40
  884. package/src/optimize/__tests__/DownhillSimplex.test.ts +0 -168
  885. package/src/optimize/__tests__/GoldenSection.test.ts +0 -21
  886. package/src/optimize/__tests__/PolynomialRegression.test.ts +0 -24
  887. package/src/optimize/__tests__/SimpleLinearRegression.test.ts +0 -31
  888. package/src/optimize/index.ts +0 -6
  889. package/src/optimize/internal/PolynomicalRegressionResult.ts +0 -126
  890. package/src/optimize/internal/SimplexEntry.ts +0 -169
  891. package/src/orbit-design/RepeatGroundTrack.ts +0 -516
  892. package/src/orbit-design/__tests__/RepeatGroundTrack.test.ts +0 -526
  893. package/src/orbit-design/index.ts +0 -23
  894. package/src/orbit-determination/BatchLeastSquaresOD.ts +0 -174
  895. package/src/orbit-determination/BatchLeastSquaresResult.ts +0 -33
  896. package/src/orbit-determination/GaussIOD.ts +0 -396
  897. package/src/orbit-determination/GibbsIOD.ts +0 -98
  898. package/src/orbit-determination/GoodingIOD.ts +0 -680
  899. package/src/orbit-determination/HerrickGibbsIOD.ts +0 -51
  900. package/src/orbit-determination/LambertIOD.ts +0 -260
  901. package/src/orbit-determination/LevenbergMarquardtOD.ts +0 -258
  902. package/src/orbit-determination/LevenbergMarquardtResult.ts +0 -42
  903. package/src/orbit-determination/ModifiedGoodingIOD.test.ts +0 -86
  904. package/src/orbit-determination/ModifiedGoodingIOD.ts +0 -145
  905. package/src/orbit-determination/README.md +0 -353
  906. package/src/orbit-determination/__tests__/BatchLeastSquaresOD.accuracy.test.ts +0 -320
  907. package/src/orbit-determination/__tests__/BatchLeastSquaresOD.observations.test.ts +0 -279
  908. package/src/orbit-determination/__tests__/BatchLeastSquaresOD.robustness.test.ts +0 -439
  909. package/src/orbit-determination/__tests__/GaussIOD.test.ts +0 -395
  910. package/src/orbit-determination/__tests__/GibbsIOD.test.ts +0 -423
  911. package/src/orbit-determination/__tests__/GoodingIOD.test.ts +0 -356
  912. package/src/orbit-determination/__tests__/HerrickGibbsIOD.test.ts +0 -501
  913. package/src/orbit-determination/__tests__/LambertIOD.test.ts +0 -643
  914. package/src/orbit-determination/__tests__/LevenbergMarquardtOD.test.ts +0 -1039
  915. package/src/orbit-determination/index.ts +0 -10
  916. package/src/parsers/CdmExporter.ts +0 -298
  917. package/src/parsers/CdmParser.ts +0 -474
  918. package/src/parsers/CdmTypes.ts +0 -259
  919. package/src/parsers/HorizonsParser.ts +0 -432
  920. package/src/parsers/OemParser.ts +0 -277
  921. package/src/parsers/OemTypes.ts +0 -111
  922. package/src/parsers/__tests__/CdmExporter.test.ts +0 -305
  923. package/src/parsers/__tests__/CdmParser.test.ts +0 -305
  924. package/src/parsers/__tests__/HorizonsParser.test.ts +0 -126
  925. package/src/parsers/__tests__/OemParser.test.ts +0 -398
  926. package/src/parsers/index.ts +0 -49
  927. package/src/propagator/DormandPrince54Propagator.ts +0 -73
  928. package/src/propagator/KeplerPropagator.ts +0 -101
  929. package/src/propagator/Propagator.ts +0 -253
  930. package/src/propagator/README.md +0 -241
  931. package/src/propagator/RkCheckpoint.ts +0 -25
  932. package/src/propagator/RkResult.ts +0 -26
  933. package/src/propagator/RungeKutta4Propagator.ts +0 -179
  934. package/src/propagator/RungeKutta89Propagator.ts +0 -132
  935. package/src/propagator/RungeKuttaAdaptive.ts +0 -282
  936. package/src/propagator/Sgp4Propagator.ts +0 -111
  937. package/src/propagator/__tests__/KeplerPropagator.test.ts +0 -250
  938. package/src/propagator/__tests__/Propagator.test.ts +0 -180
  939. package/src/propagator/__tests__/RungeKutta4Propagator.test.ts +0 -289
  940. package/src/propagator/__tests__/RungeKuttaAdaptive.test.ts +0 -244
  941. package/src/propagator/__tests__/Sgp4Propagator.test.ts +0 -144
  942. package/src/propagator/index.ts +0 -10
  943. package/src/scheduling/ContactScheduler.ts +0 -760
  944. package/src/scheduling/ScheduledContact.ts +0 -249
  945. package/src/scheduling/__tests__/ContactScheduler.test.ts +0 -389
  946. package/src/scheduling/__tests__/ScheduledContact.test.ts +0 -293
  947. package/src/scheduling/index.ts +0 -10
  948. package/src/sensor/FieldOfView.ts +0 -666
  949. package/src/sensor/LaserRangingSensor.ts +0 -210
  950. package/src/sensor/MechanicalRadar.ts +0 -156
  951. package/src/sensor/OpticalSensor.ts +0 -198
  952. package/src/sensor/PassiveRFSensor.ts +0 -205
  953. package/src/sensor/PhasedArrayRadar.ts +0 -352
  954. package/src/sensor/RadarSensor.ts +0 -150
  955. package/src/sensor/Sensor.ts +0 -487
  956. package/src/sensor/__tests__/Sensor.test.ts +0 -135
  957. package/src/sensor/index.ts +0 -81
  958. package/src/sensor/v2-docs/field-of-view-design-document.md +0 -466
  959. package/src/sgp4/index.ts +0 -27
  960. package/src/sgp4/sgp4-error.ts +0 -53
  961. package/src/sgp4/sgp4.LICENSE.md +0 -28
  962. package/src/sgp4/sgp4.ts +0 -3983
  963. package/src/smoothing/ExponentialSmoothing.ts +0 -83
  964. package/src/smoothing/__tests__/ExponentialSmoothing.test.ts +0 -108
  965. package/src/time/Epoch.ts +0 -165
  966. package/src/time/EpochGPS.ts +0 -141
  967. package/src/time/EpochTAI.ts +0 -63
  968. package/src/time/EpochTDB.ts +0 -73
  969. package/src/time/EpochTT.ts +0 -76
  970. package/src/time/EpochUTC.ts +0 -253
  971. package/src/time/EpochWindow.ts +0 -33
  972. package/src/time/README.md +0 -212
  973. package/src/time/TimeStamped.ts +0 -80
  974. package/src/time/__tests__/Epoch.test.ts +0 -250
  975. package/src/time/__tests__/EpochGPS.test.ts +0 -78
  976. package/src/time/__tests__/EpochUTC.test.ts +0 -149
  977. package/src/time/__tests__/EpochWindow.test.ts +0 -30
  978. package/src/time/__tests__/TimeStamped.test.ts +0 -62
  979. package/src/time/__tests__/__snapshots__/Epoch.test.ts.snap +0 -46
  980. package/src/time/__tests__/__snapshots__/EpochGPS.test.ts.snap +0 -13
  981. package/src/time/__tests__/__snapshots__/EpochUTC.test.ts.snap +0 -112
  982. package/src/time/__tests__/__snapshots__/TimeStamped.test.ts.snap +0 -10
  983. package/src/time/index.ts +0 -9
  984. package/src/transforms/TransformCache.ts +0 -46
  985. package/src/transforms/__tests__/__snapshots__/transforms.test.ts.snap +0 -16
  986. package/src/transforms/__tests__/__snapshots__/transforms2.test.ts.snap +0 -49
  987. package/src/transforms/__tests__/conversions.test.ts +0 -80
  988. package/src/transforms/__tests__/transforms.test.ts +0 -128
  989. package/src/transforms/__tests__/transforms2.test.ts +0 -275
  990. package/src/transforms/__tests__/transformsData.ts +0 -289
  991. package/src/transforms/conversions.ts +0 -99
  992. package/src/transforms/index.ts +0 -3
  993. package/src/transforms/transforms.ts +0 -614
  994. package/src/types/types.ts +0 -829
  995. package/src/utils/__tests__/__snapshots__/functions.test.ts.snap +0 -89
  996. package/src/utils/__tests__/__snapshots__/utils.test.ts.snap +0 -5
  997. package/src/utils/__tests__/create-covariance-from-tle.test.ts +0 -90
  998. package/src/utils/__tests__/functions.test.ts +0 -450
  999. package/src/utils/__tests__/jacobian.test.ts +0 -37
  1000. package/src/utils/__tests__/linearDistance.test.ts +0 -44
  1001. package/src/utils/__tests__/utils.test.ts +0 -164
  1002. package/src/utils/constants.ts +0 -113
  1003. package/src/utils/create-covariance-from-tle.ts +0 -75
  1004. package/src/utils/functions.ts +0 -590
  1005. package/src/utils/index.ts +0 -6
  1006. package/src/utils/jacobian.ts +0 -42
  1007. package/src/utils/linearDistance.ts +0 -11
  1008. /package/{LICENSE.md → LICENSE.MD} +0 -0
package/dist/sgp4/sgp4.js DELETED
@@ -1,3170 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek
3
- * @description Orbital Object ToolKit (ootk) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- * @license AGPL-3.0-or-later
6
- * @copyright (c) 2025 Kruczek Labs LLC
7
- *
8
- * This class was ported from the python-sgp4 library by Brandon Rhodes. That library
9
- * is licensed under the MIT license and he maintains the copyright for that work.
10
- *
11
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
- * terms of the GNU Affero General Public License as published by the Free Software
13
- * Foundation, either version 3 of the License, or (at your option) any later version.
14
- *
15
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
- * See the GNU Affero General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public License along with
20
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- // NOTE: This file is meant to maintain as much of the original format as possible.
23
- /* eslint-disable complexity */
24
- /* eslint-disable max-statements */
25
- /* eslint-disable max-lines-per-function */
26
- /* eslint-disable max-lines */
27
- /* eslint-disable @typescript-eslint/no-loss-of-precision */
28
- import { Sgp4OpsMode } from '../enums/Sgp4OpsMode';
29
- import { Tle } from '../main';
30
- import { DEG2RAD, PI, TAU, temp4, x2o3 } from '../utils/constants';
31
- import { Sgp4ErrorCode } from './sgp4-error';
32
- export var Sgp4GravConstants;
33
- (function (Sgp4GravConstants) {
34
- Sgp4GravConstants["wgs72old"] = "wgs72old";
35
- Sgp4GravConstants["wgs72"] = "wgs72";
36
- Sgp4GravConstants["wgs84"] = "wgs84";
37
- })(Sgp4GravConstants || (Sgp4GravConstants = {}));
38
- export var Sgp4Methods;
39
- (function (Sgp4Methods) {
40
- Sgp4Methods["NEAR_EARTH"] = "n";
41
- Sgp4Methods["DEEP_SPACE"] = "d";
42
- })(Sgp4Methods || (Sgp4Methods = {}));
43
- /** Ootk -- Some variables imported from outside the class at the top */
44
- const fasx2 = 0.13130908;
45
- const fasx4 = 2.8843198;
46
- const fasx6 = 0.37448087;
47
- const g22 = 5.7686396;
48
- const g32 = 0.95240898;
49
- const g44 = 1.8014998;
50
- const g52 = 1.050833;
51
- const g54 = 4.4108898;
52
- const rptim = 4.37526908801129966e-3; // Equates to 7.29211514668855e-5 rad/sec
53
- const stepp = 720.0;
54
- const stepn = -720.0;
55
- const step2 = 259200.0;
56
- /*
57
- * ----------------------------------------------------------------
58
- *
59
- * sgp4unit.cpp
60
- *
61
- * this file contains the sgp4 procedures for analytical propagation
62
- * of a satellite. the code was originally released in the 1980 and 1986
63
- * spacetrack papers. a detailed discussion of the theory and history
64
- * may be found in the 2006 aiaa paper by vallado, crawford, hujsak,
65
- * and kelso.
66
- *
67
- * companion code for
68
- * fundamentals of astrodynamics and applications
69
- * 2013
70
- * by david vallado
71
- *
72
- * (w) 719-573-2600, email dvallado@agi.com, davallado@gmail.com
73
- *
74
- * current :
75
- * 12 mar 20 david vallado
76
- * chg satnum to string for alpha 5 or 9-digit
77
- * changes :
78
- * 7 dec 15 david vallado
79
- * fix jd, jdfrac
80
- * 3 nov 14 david vallado
81
- * update to msvs2013 c++
82
- * 30 aug 10 david vallado
83
- * delete unused variables in initl
84
- * replace pow integer 2, 3 with multiplies for speed
85
- * 3 nov 08 david vallado
86
- * put returns in for error codes
87
- * 29 sep 08 david vallado
88
- * fix atime for faster operation in dspace
89
- * add operationmode for afspc (a) or improved (i)
90
- * performance mode
91
- * 16 jun 08 david vallado
92
- * update small eccentricity check
93
- * 16 nov 07 david vallado
94
- * misc fixes for better compliance
95
- * 20 apr 07 david vallado
96
- * misc fixes for constants
97
- * 11 aug 06 david vallado
98
- * chg lyddane choice back to strn3, constants, misc doc
99
- * 15 dec 05 david vallado
100
- * misc fixes
101
- * 26 jul 05 david vallado
102
- * fixes for paper
103
- * note that each fix is preceded by a
104
- * comment with "sgp4fix" and an explanation of
105
- * what was changed
106
- * 10 aug 04 david vallado
107
- * 2nd printing baseline working
108
- * 14 may 01 david vallado
109
- * 2nd edition baseline
110
- * 80 norad
111
- * original baseline
112
- * ----------------------------------------------------------------
113
- */
114
- export class Sgp4 {
115
- /*
116
- * -----------------------------------------------------------------------------
117
- *
118
- * procedure angle_SGP4
119
- *
120
- * this procedure calculates the angle between two vectors. the output is
121
- * set to 999999.1 to indicate an undefined value. be sure to check for
122
- * this at the output phase.
123
- *
124
- * author : david vallado 719-573-2600 1 mar 2001
125
- *
126
- * inputs description range / units
127
- * vec1 - vector number 1
128
- * vec2 - vector number 2
129
- *
130
- * outputs :
131
- * theta - angle between the two vectors -pi to pi
132
- *
133
- * locals :
134
- * temp - temporary real variable
135
- *
136
- * coupling :
137
- * dot dot product of two vectors
138
- * ---------------------------------------------------------------------------
139
- */
140
- static angle_(vec1, vec2) {
141
- const small = 0.00000001;
142
- const unknown = 999999.1; /** Ootk -- original 'undefined' is protected in JS */
143
- const magv1 = Sgp4.mag_(vec1);
144
- const magv2 = Sgp4.mag_(vec2);
145
- const magnitudeProduct = magv1 * magv2;
146
- if (magnitudeProduct > small * small) {
147
- let temp = Sgp4.dot_(vec1, vec2) / (magnitudeProduct);
148
- // Clamp to [-1, 1] to avoid NaN from floating point errors
149
- if (temp > 1.0) {
150
- temp = 1.0;
151
- }
152
- if (temp < -1.0) {
153
- temp = -1.0;
154
- }
155
- return Math.acos(temp);
156
- }
157
- return unknown;
158
- }
159
- /*
160
- * -----------------------------------------------------------------------------
161
- *
162
- * function asinh_SGP4
163
- *
164
- * this function evaluates the inverse hyperbolic sine function.
165
- *
166
- * author : david vallado 719-573-2600 1 mar 2001
167
- *
168
- * inputs description range / units
169
- * xval - angle value any real
170
- *
171
- * outputs :
172
- * arcsinh - result any real
173
- *
174
- * locals :
175
- * none.
176
- *
177
- * coupling :
178
- * none.
179
- * ---------------------------------------------------------------------------
180
- */
181
- static asinh_(xval) {
182
- return Math.log(xval + Math.sqrt(xval * xval + 1.0));
183
- }
184
- /*
185
- * -----------------------------------------------------------------------------
186
- *
187
- * function twoline2rv
188
- *
189
- * this function converts the two line element set character string data to
190
- * variables and initializes the sgp4 variables. several intermediate varaibles
191
- * and quantities are determined. note that the result is a structure so multiple
192
- * satellites can be processed simultaneously without having to reinitialize. the
193
- * verification mode is an important option that permits quick checks of any
194
- * changes to the underlying technical theory. this option works using a
195
- * modified tle file in which the start, stop, and delta time values are
196
- * included at the end of the second line of data. this only works with the
197
- * verification mode. the catalog mode simply propagates from -1440 to 1440 min
198
- * from epoch and is useful when performing entire catalog runs.
199
- *
200
- * author : david vallado 719-573-2600 1 mar 2001
201
- *
202
- * inputs :
203
- * longstr1 - first line of the tle
204
- * longstr2 - second line of the tle
205
- * typerun - type of run verification 'v', catalog 'c',
206
- * manual 'm'
207
- * typeinput - type of manual input mfe 'm', epoch 'e', dayofyr 'd'
208
- * opsmode - mode of operation afspc or improved 'a', 'i'
209
- * whichconst - which set of constants to use 72, 84
210
- *
211
- * outputs :
212
- * satrec - structure containing all the sgp4 satellite information
213
- *
214
- * coupling :
215
- * getgravconst-
216
- * days2mdhms - conversion of days to month, day, hour, minute, second
217
- * jday - convert day month year hour minute second into julian date
218
- * sgp4init - initialize the sgp4 variables
219
- *
220
- * references :
221
- * norad spacetrack report #3
222
- * vallado, crawford, hujsak, kelso 2006
223
- * ---------------------------------------------------------------------------
224
- */
225
- static createSatrec(tleLine1, tleLine2, whichconst = Sgp4GravConstants.wgs72, opsmode = Sgp4OpsMode.IMPROVED) {
226
- let year = 0;
227
- const satrec = {
228
- error: Sgp4ErrorCode.NO_ERROR,
229
- };
230
- /*
231
- * Sgp4fix no longer needed
232
- * getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 );
233
- */
234
- const xpdotp = 1440.0 / (2.0 * PI); // 229.1831180523293;
235
- satrec.satnum = tleLine1.substring(2, 7);
236
- satrec.epochyr = parseInt(tleLine1.substring(18, 20));
237
- satrec.epochdays = parseFloat(tleLine1.substring(20, 32));
238
- satrec.ndot = parseFloat(tleLine1.substring(33, 43));
239
- satrec.nddot = parseFloat(`${tleLine1.substring(44, 45)}.${tleLine1.substring(45, 50)}E${tleLine1.substring(50, 52)}`);
240
- satrec.bstar = parseFloat(`${tleLine1.substring(53, 54)}.${tleLine1.substring(54, 59)}E${tleLine1.substring(59, 61)}`);
241
- satrec.inclo = parseFloat(tleLine2.substring(8, 16));
242
- satrec.nodeo = parseFloat(tleLine2.substring(17, 25));
243
- satrec.ecco = parseFloat(`.${tleLine2.substring(26, 33)}`);
244
- satrec.argpo = parseFloat(tleLine2.substring(34, 42));
245
- satrec.mo = parseFloat(tleLine2.substring(43, 51));
246
- satrec.no = parseFloat(tleLine2.substring(52, 63));
247
- // ---- find no, ndot, nddot ----
248
- satrec.no /= xpdotp; // Rad/min
249
- /** Ootk -- nexp and ibexp are calculated above using template literals */
250
- /*
251
- * Satrec.nddot = satrec.nddot * Math.pow(10.0, nexp);
252
- * satrec.bstar = satrec.bstar * Math.pow(10.0, ibexp);
253
- */
254
- /*
255
- * ---- convert to sgp4 units ----
256
- * satrec.a = (satrec.no * tumin) ** (-2.0 / 3.0);
257
- */
258
- /** Ootk -- Not sure why the following two lines are added. 1st and 2nd derivatives aren't even used anymore */
259
- /*
260
- * Satrec.ndot /= xpdotp * 1440.0; // ? * minperday
261
- * satrec.nddot /= xpdotp * 1440.0 * 1440;
262
- */
263
- // ---- find standard orbital elements ----
264
- satrec.inclo *= DEG2RAD;
265
- satrec.nodeo *= DEG2RAD;
266
- satrec.argpo *= DEG2RAD;
267
- satrec.mo *= DEG2RAD;
268
- /*
269
- * Sgp4fix not needed here
270
- * satrec.alta = satrec.a * (1.0 + satrec.ecco) - 1.0;
271
- * satrec.altp = satrec.a * (1.0 - satrec.ecco) - 1.0;
272
- */
273
- /*
274
- * ----------------------------------------------------------------
275
- * find sgp4epoch time of element set
276
- * remember that sgp4 uses units of days from 0 jan 1950 (sgp4epoch)
277
- * and minutes from the epoch (time)
278
- * ----------------------------------------------------------------
279
- */
280
- /*
281
- * ---------------- temp fix for years from 1957-2056 -------------------
282
- * --------- correct fix will occur when year is 4-digit in tle ---------
283
- */
284
- if (satrec.epochyr < 57) {
285
- year = satrec.epochyr + 2000;
286
- }
287
- else {
288
- year = satrec.epochyr + 1900;
289
- }
290
- const { mon, day, hr, min, sec } = Sgp4.days2mdhms(year, satrec.epochdays);
291
- const jdayRes = Sgp4.jday(year, mon, day, hr, min, sec);
292
- satrec.jdsatepoch = jdayRes.jd + jdayRes.jdFrac;
293
- // ---------------- initialize the orbit at sgp4epoch -------------------
294
- Sgp4.sgp4init_(satrec, {
295
- whichconst,
296
- opsmode,
297
- satn: satrec.satnum,
298
- epoch: satrec.jdsatepoch - 2433281.5,
299
- xbstar: satrec.bstar,
300
- xecco: satrec.ecco,
301
- xargpo: satrec.argpo,
302
- xinclo: satrec.inclo,
303
- xndot: satrec.ndot,
304
- xnddot: satrec.nddot,
305
- xmo: satrec.mo,
306
- xno: satrec.no,
307
- xnodeo: satrec.nodeo,
308
- });
309
- return satrec;
310
- }
311
- static createSatrecFromOmm(omm, whichconst = Sgp4GravConstants.wgs72, opsmode = Sgp4OpsMode.IMPROVED) {
312
- let year = 0;
313
- const satrec = {
314
- error: Sgp4ErrorCode.NO_ERROR,
315
- };
316
- const xpdotp = 1440.0 / (2.0 * PI); // 229.1831180523293;
317
- satrec.error = Sgp4ErrorCode.NO_ERROR;
318
- satrec.satnum = omm.NORAD_CAT_ID;
319
- satrec.epochyr = parseInt(omm.epoch.year.toString().slice(-2));
320
- satrec.epochdays = omm.epoch.doy;
321
- satrec.ndot = parseFloat(omm.MEAN_MOTION_DOT);
322
- satrec.nddot = parseFloat(omm.MEAN_MOTION_DDOT);
323
- satrec.bstar = parseFloat(omm.BSTAR);
324
- satrec.inclo = parseFloat(omm.INCLINATION);
325
- satrec.nodeo = parseFloat(omm.RA_OF_ASC_NODE);
326
- satrec.ecco = parseFloat(omm.ECCENTRICITY);
327
- satrec.argpo = parseFloat(omm.ARG_OF_PERICENTER);
328
- satrec.mo = parseFloat(omm.MEAN_ANOMALY);
329
- satrec.no = parseFloat(omm.MEAN_MOTION);
330
- // ---- find no, ndot, nddot ----
331
- satrec.no /= xpdotp; // Rad/min
332
- /** Ootk -- nexp and ibexp are calculated above using template literals */
333
- /*
334
- * Satrec.nddot = satrec.nddot * Math.pow(10.0, nexp);
335
- * satrec.bstar = satrec.bstar * Math.pow(10.0, ibexp);
336
- */
337
- /*
338
- * ---- convert to sgp4 units ----
339
- * satrec.a = (satrec.no * tumin) ** (-2.0 / 3.0);
340
- */
341
- /** Ootk -- Not sure why the following two lines are added. 1st and 2nd derivatives aren't even used anymore */
342
- /*
343
- * Satrec.ndot /= xpdotp * 1440.0; // ? * minperday
344
- * satrec.nddot /= xpdotp * 1440.0 * 1440;
345
- */
346
- // ---- find standard orbital elements ----
347
- satrec.inclo *= DEG2RAD;
348
- satrec.nodeo *= DEG2RAD;
349
- satrec.argpo *= DEG2RAD;
350
- satrec.mo *= DEG2RAD;
351
- /*
352
- * Sgp4fix not needed here
353
- * satrec.alta = satrec.a * (1.0 + satrec.ecco) - 1.0;
354
- * satrec.altp = satrec.a * (1.0 - satrec.ecco) - 1.0;
355
- */
356
- /*
357
- * ----------------------------------------------------------------
358
- * find sgp4epoch time of element set
359
- * remember that sgp4 uses units of days from 0 jan 1950 (sgp4epoch)
360
- * and minutes from the epoch (time)
361
- * ----------------------------------------------------------------
362
- */
363
- /*
364
- * ---------------- temp fix for years from 1957-2056 -------------------
365
- * --------- correct fix will occur when year is 4-digit in tle ---------
366
- */
367
- if (satrec.epochyr < 57) {
368
- year = satrec.epochyr + 2000;
369
- }
370
- else {
371
- year = satrec.epochyr + 1900;
372
- }
373
- const { mon, day, hr, min, sec } = Sgp4.days2mdhms(year, satrec.epochdays);
374
- const jdayRes = Sgp4.jday(year, mon, day, hr, min, sec);
375
- satrec.jdsatepoch = jdayRes.jd + jdayRes.jdFrac;
376
- // ---------------- initialize the orbit at sgp4epoch -------------------
377
- Sgp4.sgp4init_(satrec, {
378
- whichconst,
379
- opsmode,
380
- satn: satrec.satnum,
381
- epoch: satrec.jdsatepoch - 2433281.5,
382
- xbstar: satrec.bstar,
383
- xecco: satrec.ecco,
384
- xargpo: satrec.argpo,
385
- xinclo: satrec.inclo,
386
- xndot: satrec.ndot,
387
- xnddot: satrec.nddot,
388
- xmo: satrec.mo,
389
- xno: satrec.no,
390
- xnodeo: satrec.nodeo,
391
- });
392
- return satrec;
393
- }
394
- /*
395
- * -----------------------------------------------------------------------------
396
- *
397
- * procedure cross_SGP4
398
- *
399
- * this procedure crosses two vectors.
400
- *
401
- * author : david vallado 719-573-2600 1 mar 2001
402
- *
403
- * inputs description range / units
404
- * vec1 - vector number 1
405
- * vec2 - vector number 2
406
- *
407
- * outputs :
408
- * outvec - vector result of a x b
409
- *
410
- * locals :
411
- * none.
412
- *
413
- * coupling :
414
- * mag magnitude of a vector
415
- * ----------------------------------------------------------------------------
416
- */
417
- static cross_(vec1, vec2) {
418
- return [
419
- vec1[1] * vec2[2] - vec1[2] * vec2[1],
420
- vec1[2] * vec2[0] - vec1[0] * vec2[2],
421
- vec1[0] * vec2[1] - vec1[1] * vec2[0],
422
- ];
423
- }
424
- /*
425
- * -----------------------------------------------------------------------------
426
- *
427
- * procedure days2mdhms
428
- *
429
- * this procedure converts the day of the year, days, to the equivalent month
430
- * day, hour, minute and second.
431
- *
432
- * algorithm : set up array for the number of days per month
433
- * find leap year - use 1900 because 2000 is a leap year
434
- * loop through a temp value while the value is < the days
435
- * perform int conversions to the correct day and month
436
- * convert remainder into h m s using type conversions
437
- *
438
- * author : david vallado 719-573-2600 1 mar 2001
439
- *
440
- * inputs description range / units
441
- * year - year 1900 .. 2100
442
- * days - julian day of the year 0.0 .. 366.0
443
- *
444
- * outputs :
445
- * mon - month 1 .. 12
446
- * day - day 1 .. 28,29,30,31
447
- * hr - hour 0 .. 23
448
- * min - minute 0 .. 59
449
- * sec - second 0.0 .. 59.999
450
- *
451
- * locals :
452
- * dayofyr - day of year
453
- * temp - temporary extended values
454
- * inttemp - temporary int value
455
- * i - index
456
- * lmonth[13] - int array containing the number of days per month
457
- *
458
- * coupling :
459
- * none.
460
- * ---------------------------------------------------------------------------
461
- */
462
- static days2mdhms(year, days) {
463
- const lmonth = [31, year % 4 === 0 ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
464
- const dayofyr = Math.floor(days);
465
- // ----------------- find month and day of month ----------------
466
- /** Ootk -- Incorporated in the above declaration */
467
- /*
468
- * If ((year % 4) == 0)
469
- * lmonth[2] = 29;
470
- */
471
- let i = 1;
472
- let inttemp = 0;
473
- while (dayofyr > inttemp + (lmonth[i - 1]) && i < 12) {
474
- inttemp += (lmonth[i - 1]);
475
- i += 1;
476
- }
477
- const mon = i;
478
- const day = dayofyr - inttemp;
479
- // ----------------- find hours minutes and seconds -------------
480
- let temp = (days - dayofyr) * 24.0;
481
- const hr = Math.floor(temp);
482
- temp = (temp - hr) * 60.0;
483
- const min = Math.floor(temp);
484
- const sec = (temp - min) * 60.0;
485
- return {
486
- mon,
487
- day,
488
- hr,
489
- min,
490
- sec,
491
- };
492
- }
493
- /*
494
- * -----------------------------------------------------------------------------
495
- *
496
- * function dot_SGP4
497
- *
498
- * this function finds the dot product of two vectors.
499
- *
500
- * author : david vallado 719-573-2600 1 mar 2001
501
- *
502
- * inputs description range / units
503
- * vec1 - vector number 1
504
- * vec2 - vector number 2
505
- *
506
- * outputs :
507
- * dot - result
508
- *
509
- * locals :
510
- * none.
511
- *
512
- * coupling :
513
- * none.
514
- * ---------------------------------------------------------------------------
515
- */
516
- static dot_(v1, v2) {
517
- return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
518
- }
519
- /*
520
- * -----------------------------------------------------------------------------
521
- *
522
- * function gstime
523
- *
524
- * this function finds the greenwich sidereal time.
525
- *
526
- * author : david vallado 719-573-2600 1 mar 2001
527
- *
528
- * inputs description range / units
529
- * jdut1 - julian date in ut1 days from 4713 bc
530
- *
531
- * outputs :
532
- * gstime - greenwich sidereal time 0 to 2PI rad
533
- *
534
- * locals :
535
- * temp - temporary variable for doubles rad
536
- * tut1 - julian centuries from the
537
- * jan 1, 2000 12 h epoch (ut1)
538
- *
539
- * coupling :
540
- * none
541
- *
542
- * references :
543
- * vallado 2004, 191, eq 3-45
544
- * ---------------------------------------------------------------------------
545
- */
546
- static gstime(jdut1) {
547
- const tut1 = (jdut1 - 2451545.0) / 36525.0;
548
- let temp = -6.2e-6 * tut1 * tut1 * tut1 + 0.093104 * tut1 * tut1 +
549
- (876600.0 * 3600 + 8640184.812866) * tut1 + 67310.54841; // Sec
550
- temp = ((temp * DEG2RAD) / 240.0) % TAU; // 360/86400 = 1/240, to deg, to rad
551
- // ------------------------ check quadrants ---------------------
552
- if (temp < 0.0) {
553
- temp += TAU;
554
- }
555
- return temp;
556
- }
557
- /*
558
- * -----------------------------------------------------------------------------
559
- *
560
- * procedure invjday
561
- *
562
- * this procedure finds the year, month, day, hour, minute and second
563
- * given the julian date. tu can be ut1, tdt, tdb, etc.
564
- *
565
- * algorithm : set up starting values
566
- * find leap year - use 1900 because 2000 is a leap year
567
- * find the elapsed days through the year in a loop
568
- * call routine to find each individual value
569
- *
570
- * author : david vallado 719-573-2600 1 mar 2001
571
- *
572
- * inputs description range / units
573
- * jd - julian date days from 4713 bc
574
- * jdfrac - julian date fraction into day days from 4713 bc
575
- *
576
- * outputs :
577
- * year - year 1900 .. 2100
578
- * mon - month 1 .. 12
579
- * day - day 1 .. 28,29,30,31
580
- * hr - hour 0 .. 23
581
- * min - minute 0 .. 59
582
- * sec - second 0.0 .. 59.999
583
- *
584
- * locals :
585
- * days - day of year plus fractional
586
- * portion of a day days
587
- * tu - julian centuries from 0 h
588
- * jan 0, 1900
589
- * temp - temporary double values
590
- * leapyrs - number of leap years from 1900
591
- *
592
- * coupling :
593
- * days2mdhms - finds month, day, hour, minute and second given days and year
594
- *
595
- * references :
596
- * vallado 2013, 203, alg 22, ex 3-13
597
- * ---------------------------------------------------------------------------
598
- */
599
- static invjday(jd, jdfrac) {
600
- let leapyrs;
601
- let days;
602
- // Check jdfrac for multiple days
603
- if (Math.abs(jdfrac) >= 1.0) {
604
- jd += Math.floor(jdfrac);
605
- jdfrac -= Math.floor(jdfrac);
606
- }
607
- // Check for fraction of a day included in the jd
608
- const dt = jd - Math.floor(jd) - 0.5;
609
- if (Math.abs(dt) > 0.00000001) {
610
- jd -= dt;
611
- jdfrac += dt;
612
- }
613
- /* --------------- find year and days of the year --------------- */
614
- const temp = jd - 2415019.5;
615
- const tu = temp / 365.25;
616
- let year = 1900 + Math.floor(tu);
617
- leapyrs = Math.floor((year - 1901) * 0.25);
618
- days = Math.floor(temp - ((year - 1900) * 365.0 + leapyrs));
619
- /* ------------ check for case of beginning of a year ----------- */
620
- if (days + jdfrac < 1.0) {
621
- year -= 1;
622
- leapyrs = Math.floor((year - 1901) * 0.25);
623
- days = Math.floor(temp - ((year - 1900) * 365.0 + leapyrs));
624
- }
625
- /* ----------------- find remaining data ------------------------- */
626
- const { mon, day, hr, min, sec } = Sgp4.days2mdhms(year, days + jdfrac);
627
- return {
628
- year,
629
- mon,
630
- day,
631
- hr,
632
- min,
633
- sec,
634
- };
635
- }
636
- /*
637
- * -----------------------------------------------------------------------------
638
- *
639
- * procedure jday
640
- *
641
- * this procedure finds the julian date given the year, month, day, and time.
642
- * the julian date is defined by each elapsed day since noon, jan 1, 4713 bc.
643
- *
644
- * algorithm : calculate the answer in one step for efficiency
645
- *
646
- * author : david vallado 719-573-2600 1 mar 2001
647
- *
648
- * inputs description range / units
649
- * year - year 1900 .. 2100
650
- * mon - month 1 .. 12
651
- * day - day 1 .. 28,29,30,31
652
- * hr - universal time hour 0 .. 23
653
- * min - universal time min 0 .. 59
654
- * sec - universal time sec 0.0 .. 59.999
655
- *
656
- * outputs :
657
- * jd - julian date days from 4713 bc
658
- * jdfrac - julian date fraction into day days from 4713 bc
659
- *
660
- * locals :
661
- * none.
662
- *
663
- * coupling :
664
- * none.
665
- *
666
- * references :
667
- * vallado 2013, 183, alg 14, ex 3-4
668
- *
669
- * ---------------------------------------------------------------------------
670
- */
671
- static jday(year, mon = 0, day = 0, hr = 0, min = 0, sec = 0, ms = 0) {
672
- if (year instanceof Date) {
673
- mon = year.getUTCMonth() + 1;
674
- day = year.getUTCDate();
675
- hr = year.getUTCHours();
676
- min = year.getUTCMinutes();
677
- sec = year.getUTCSeconds();
678
- ms = year.getUTCMilliseconds();
679
- year = year.getUTCFullYear();
680
- }
681
- let jd = 367.0 * year -
682
- Math.floor(7 * (year + Math.floor((mon + 9) / 12.0)) * 0.25) +
683
- Math.floor((275 * mon) / 9.0) +
684
- day +
685
- 1721013.5; // Use - 678987.0 to go to mjd directly
686
- let jdFrac = (ms / 1000 + sec + min * 60.0 + hr * 3600.0) / 86400.0;
687
- // Check that the day and fractional day are correct
688
- if (Math.abs(jdFrac) > 1.0) {
689
- const dtt = Math.floor(jdFrac);
690
- jd += dtt;
691
- jdFrac -= dtt;
692
- }
693
- // - 0.5*sgn(100.0*year + mon - 190002.5) + 0.5;
694
- return { jd, jdFrac };
695
- }
696
- /*
697
- * -----------------------------------------------------------------------------
698
- *
699
- * function mag
700
- *
701
- * this procedure finds the magnitude of a vector.
702
- *
703
- * author : david vallado 719-573-2600 1 mar 2001
704
- *
705
- * inputs description range / units
706
- * vec - vector
707
- *
708
- * outputs :
709
- * mag - answer
710
- *
711
- * locals :
712
- * none.
713
- *
714
- * coupling :
715
- * none.
716
- * ---------------------------------------------------------------------------
717
- */
718
- static mag_(v) {
719
- return Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
720
- }
721
- /*
722
- * -----------------------------------------------------------------------------
723
- *
724
- * function newtonnu_SGP4
725
- *
726
- * this function solves keplers equation when the true anomaly is known.
727
- * the mean and eccentric, parabolic, or hyperbolic anomaly is also found.
728
- * the parabolic limit at 168ø is arbitrary. the hyperbolic anomaly is also
729
- * limited. the hyperbolic sine is used because it's not double valued.
730
- *
731
- * author : david vallado 719-573-2600 27 may 2002
732
- *
733
- * revisions
734
- * vallado - fix small 24 sep 2002
735
- *
736
- * inputs description range / units
737
- * ecc - eccentricity 0.0 to
738
- * nu - true anomaly -2pi to 2pi rad
739
- *
740
- * outputs :
741
- * e0 - eccentric anomaly 0.0 to 2pi rad 153.02 ø
742
- * m - mean anomaly 0.0 to 2pi rad 151.7425 ø
743
- *
744
- * locals :
745
- * e1 - eccentric anomaly, next value rad
746
- * sine - sine of e
747
- * cose - cosine of e
748
- * ktr - index
749
- *
750
- * coupling :
751
- * asinh - arc hyperbolic sine
752
- *
753
- * references :
754
- * vallado 2013, 77, alg 5
755
- * ---------------------------------------------------------------------------
756
- */
757
- static newtonnu_(ecc, nu) {
758
- // --------------------- implementation ---------------------
759
- let e0 = 999999.9;
760
- let m = 999999.9;
761
- const small = 0.00000001;
762
- if (Math.abs(ecc) < small) {
763
- // --------------------------- circular ------------------------
764
- m = nu;
765
- e0 = nu;
766
- }
767
- else if (ecc < 1.0 - small) {
768
- // ---------------------- elliptical -----------------------
769
- const sine = (Math.sqrt(1.0 - ecc * ecc) * Math.sin(nu)) / (1.0 + ecc * Math.cos(nu));
770
- const cose = (ecc + Math.cos(nu)) / (1.0 + ecc * Math.cos(nu));
771
- e0 = Math.atan2(sine, cose);
772
- m = e0 - ecc * Math.sin(e0);
773
- }
774
- else if (ecc > 1.0 + small) {
775
- // -------------------- hyperbolic --------------------
776
- if (ecc > 1.0 && Math.abs(nu) + 0.00001 < PI - Math.acos(1.0 / ecc)) {
777
- const sine = (Math.sqrt(ecc * ecc - 1.0) * Math.sin(nu)) / (1.0 + ecc * Math.cos(nu));
778
- e0 = Sgp4.asinh_(sine);
779
- m = ecc * Sgp4.sinh_(e0) - e0;
780
- }
781
- }
782
- else if (Math.abs(nu) < (168.0 * PI) / 180.0) {
783
- // ----------------- parabolic ---------------------
784
- e0 = Math.tan(nu * 0.5);
785
- m = e0 + (e0 * e0 * e0) / 3.0;
786
- }
787
- if (ecc < 1.0) {
788
- m %= 2.0 * PI;
789
- if (m < 0.0) {
790
- m += 2.0 * PI;
791
- }
792
- e0 %= 2.0 * PI;
793
- }
794
- return {
795
- e0,
796
- m,
797
- };
798
- }
799
- /*
800
- *----------------------------------------------------------------------------
801
- *
802
- * procedure sgp4
803
- *
804
- * this procedure is the sgp4 prediction model from space command. this is an
805
- * updated and combined version of sgp4 and sdp4, which were originally
806
- * published separately in spacetrack report //3. this version follows the
807
- * methodology from the aiaa paper (2006) describing the history and
808
- * development of the code.
809
- *
810
- * author : david vallado 719-573-2600 28 jun 2005
811
- *
812
- * inputs :
813
- * satrec - initialised structure from sgp4init() call.
814
- * tsince - time since epoch (minutes)
815
- *
816
- * outputs :
817
- * r - position vector km
818
- * v - velocity km/sec
819
- * return code - non-zero on error.
820
- * 1 - mean elements, ecc >= 1.0 or ecc < -0.001 or a < 0.95 er
821
- * 2 - mean motion less than 0.0
822
- * 3 - pert elements, ecc < 0.0 or ecc > 1.0
823
- * 4 - semi-latus rectum < 0.0
824
- * 5 - epoch elements are sub-orbital
825
- * 6 - satellite has decayed
826
- *
827
- * locals :
828
- * am -
829
- * axnl, aynl -
830
- * betal -
831
- * cosim , sinim , cosomm , sinomm , cnod , snod , cos2u ,
832
- * sin2u , coseo1 , sineo1 , cosi , sini , cosip , sinip ,
833
- * cosisq , cossu , sinsu , cosu , sinu
834
- * delm -
835
- * delomg -
836
- * dndt -
837
- * eccm -
838
- * emsq -
839
- * ecose -
840
- * el2 -
841
- * eo1 -
842
- * eccp -
843
- * esine -
844
- * argpm -
845
- * argpp -
846
- * omgadf -
847
- * pl -
848
- * r -
849
- * rtemsq -
850
- * rdotl -
851
- * rl -
852
- * rvdot -
853
- * rvdotl -
854
- * su -
855
- * t2 , t3 , t4 , tc
856
- * tem5, temp , temp1 , temp2 , tempa , tempe , templ
857
- * u , ux , uy , uz , vx , vy , vz
858
- * inclm - inclination
859
- * mm - mean anomaly
860
- * nm - mean motion
861
- * nodem - right asc of ascending node
862
- * xinc -
863
- * xincp -
864
- * xl -
865
- * xlm -
866
- * mp -
867
- * xmdf -
868
- * xmx -
869
- * xmy -
870
- * nodedf -
871
- * xnode -
872
- * nodep -
873
- * np -
874
- *
875
- * coupling :
876
- * getgravconst-
877
- * dpper
878
- * dspace
879
- *
880
- * references :
881
- * hoots, roehrich, norad spacetrack report //3 1980
882
- * hoots, norad spacetrack report //6 1986
883
- * hoots, schumacher and glover 2004
884
- * vallado, crawford, hujsak, kelso 2006
885
- *----------------------------------------------------------------------------
886
- */
887
- static propagate(satrec, tsince) {
888
- /* ------------------ set mathematical constants --------------- */
889
- /*
890
- * Sgp4fix divisor for divide by zero check on inclination
891
- * the old check used 1.0 + cos(PI-1.0e-9), but then compared it to
892
- * 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency
893
- */
894
- /*
895
- * Sgp4fix identify constants and allow alternate values
896
- * getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 );
897
- */
898
- const { xke, j2, j3oj2, vkmpersec } = satrec;
899
- // --------------------- clear sgp4 error flag -----------------
900
- satrec.t = tsince;
901
- satrec.error = Sgp4ErrorCode.NO_ERROR;
902
- // ------- update for secular gravity and atmospheric drag -----
903
- const xmdf = satrec.mo + satrec.mdot * satrec.t;
904
- const argpdf = satrec.argpo + satrec.argpdot * satrec.t;
905
- const nodedf = satrec.nodeo + satrec.nodedot * satrec.t;
906
- let argpm = argpdf;
907
- let mm = xmdf;
908
- const t2 = satrec.t * satrec.t;
909
- let nodem = nodedf + satrec.nodecf * t2;
910
- let tempa = 1.0 - satrec.cc1 * satrec.t;
911
- let tempe = satrec.bstar * satrec.cc4 * satrec.t;
912
- let templ = satrec.t2cof * t2;
913
- if (!satrec.isimp) {
914
- const delomg = satrec.omgcof * satrec.t;
915
- // Sgp4fix use mutliply for speed instead of pow
916
- const delmtemp = 1.0 + satrec.eta * Math.cos(xmdf);
917
- const delm = satrec.xmcof * (delmtemp * delmtemp * delmtemp - satrec.delmo);
918
- const temp = delomg + delm;
919
- mm = xmdf + temp;
920
- argpm = argpdf - temp;
921
- const t3 = t2 * satrec.t;
922
- const t4 = t3 * satrec.t;
923
- tempa = tempa - satrec.d2 * t2 - satrec.d3 * t3 - satrec.d4 * t4;
924
- tempe += satrec.bstar * satrec.cc5 * (Math.sin(mm) - satrec.sinmao);
925
- templ = templ + satrec.t3cof * t3 + t4 * (satrec.t4cof + satrec.t * satrec.t5cof);
926
- }
927
- let nm = satrec.no;
928
- let em = satrec.ecco;
929
- let inclm = satrec.inclo;
930
- if (satrec.method === Sgp4Methods.DEEP_SPACE) {
931
- [em, argpm, inclm, mm, nodem, nm] = Sgp4.dspace_(em, argpm, inclm, mm, nodem, nm, satrec);
932
- }
933
- if (nm <= 0.0) {
934
- satrec.error = Sgp4ErrorCode.MEAN_MOTION_NEGATIVE;
935
- return { position: false, velocity: false };
936
- }
937
- const am = (xke / nm) ** x2o3 * tempa * tempa;
938
- nm = xke / am ** 1.5;
939
- em -= tempe;
940
- /*
941
- * Fix tolerance for error recognition
942
- * sgp4fix am is fixed from the previous nm check
943
- */
944
- /* istanbul ignore next | This is no longer possible*/
945
- if (em >= 1.0 || em < -0.001) {
946
- satrec.error = Sgp4ErrorCode.MEAN_MOTION_NEGATIVE;
947
- return { position: false, velocity: false };
948
- }
949
- // Sgp4fix fix tolerance to avoid a divide by zero
950
- if (em < 1.0e-6) {
951
- em = 1.0e-6;
952
- }
953
- mm += satrec.no * templ;
954
- let xlm = mm + argpm + nodem;
955
- nodem %= TAU;
956
- argpm %= TAU;
957
- xlm %= TAU;
958
- mm = (xlm - argpm - nodem) % TAU;
959
- /*
960
- * Sgp4fix recover singly averaged mean elements
961
- * satrec.am = am;
962
- * satrec.em = em;
963
- * satrec.im = inclm;
964
- * satrec.Om = nodem;
965
- * satrec.om = argpm;
966
- * satrec.mm = mm;
967
- * satrec.nm = nm;
968
- */
969
- // ----------------- compute extra mean quantities -------------
970
- const sinim = Math.sin(inclm);
971
- const cosim = Math.cos(inclm);
972
- // -------------------- add lunar-solar periodics --------------
973
- let ep = em;
974
- let xincp = inclm;
975
- let argpp = argpm;
976
- let nodep = nodem;
977
- let mp = mm;
978
- let sinip = sinim;
979
- let cosip = cosim;
980
- if (satrec.method === Sgp4Methods.DEEP_SPACE) {
981
- const dpperParameters = {
982
- inclo: satrec.inclo,
983
- init: false,
984
- ep,
985
- inclp: xincp,
986
- nodep,
987
- argpp,
988
- mp,
989
- opsmode: satrec.operationmode,
990
- satrec,
991
- };
992
- ({ ep, nodep, argpp, mp, inclp: xincp } = Sgp4.dpper_(dpperParameters));
993
- if (xincp < 0.0) {
994
- xincp = -xincp;
995
- nodep += PI;
996
- argpp -= PI;
997
- }
998
- if (ep < 0.0 || ep > 1.0) {
999
- satrec.error = Sgp4ErrorCode.PERT_ELEMENTS_INVALID;
1000
- return { position: false, velocity: false };
1001
- }
1002
- }
1003
- // -------------------- long period periodics ------------------
1004
- if (satrec.method === Sgp4Methods.DEEP_SPACE) {
1005
- sinip = Math.sin(xincp);
1006
- cosip = Math.cos(xincp);
1007
- satrec.aycof = -0.5 * j3oj2 * sinip;
1008
- // Sgp4fix for divide by zero for xincp = 180 deg
1009
- if (Math.abs(cosip + 1.0) > 1.5e-12) {
1010
- satrec.xlcof = (-0.25 * j3oj2 * sinip * (3.0 + 5.0 * cosip)) / (1.0 + cosip);
1011
- }
1012
- else {
1013
- satrec.xlcof = (-0.25 * j3oj2 * sinip * (3.0 + 5.0 * cosip)) / temp4;
1014
- }
1015
- }
1016
- const axnl = ep * Math.cos(argpp);
1017
- let temp = 1.0 / (am * (1.0 - ep * ep));
1018
- const aynl = ep * Math.sin(argpp) + temp * satrec.aycof;
1019
- const xl = mp + argpp + nodep + temp * satrec.xlcof * axnl;
1020
- // --------------------- solve kepler's equation ---------------
1021
- const u = (xl - nodep) % TAU;
1022
- let eo1 = u;
1023
- let tem5 = 9999.9;
1024
- let ktr = 1;
1025
- /*
1026
- * Sgp4fix for kepler iteration
1027
- * the following iteration needs better limits on corrections
1028
- */
1029
- let coseo1 = 0;
1030
- let sineo1 = 0;
1031
- while (Math.abs(tem5) >= 1.0e-12 && ktr <= 10) {
1032
- sineo1 = Math.sin(eo1);
1033
- coseo1 = Math.cos(eo1);
1034
- tem5 = 1.0 - coseo1 * axnl - sineo1 * aynl;
1035
- tem5 = (u - aynl * coseo1 + axnl * sineo1 - eo1) / tem5;
1036
- if (Math.abs(tem5) >= 0.95) {
1037
- if (tem5 > 0.0) {
1038
- tem5 = 0.95;
1039
- }
1040
- else {
1041
- tem5 = -0.95;
1042
- }
1043
- }
1044
- eo1 += tem5;
1045
- ktr += 1;
1046
- }
1047
- // ------------- short period preliminary quantities -----------
1048
- const ecose = axnl * coseo1 + aynl * sineo1;
1049
- const esine = axnl * sineo1 - aynl * coseo1;
1050
- const el2 = axnl * axnl + aynl * aynl;
1051
- const pl = am * (1.0 - el2);
1052
- if (pl < 0.0) {
1053
- satrec.error = Sgp4ErrorCode.SEMI_LATUS_RECTUM_NEGATIVE;
1054
- return { position: false, velocity: false };
1055
- }
1056
- const rl = am * (1.0 - ecose);
1057
- const rdotl = (Math.sqrt(am) * esine) / rl;
1058
- const rvdotl = Math.sqrt(pl) / rl;
1059
- const betal = Math.sqrt(1.0 - el2);
1060
- temp = esine / (1.0 + betal);
1061
- const sinu = (am / rl) * (sineo1 - aynl - axnl * temp);
1062
- const cosu = (am / rl) * (coseo1 - axnl + aynl * temp);
1063
- let su = Math.atan2(sinu, cosu);
1064
- const sin2u = (cosu + cosu) * sinu;
1065
- const cos2u = 1.0 - 2.0 * sinu * sinu;
1066
- temp = 1.0 / pl;
1067
- const temp1 = 0.5 * j2 * temp;
1068
- const temp2 = temp1 * temp;
1069
- // -------------- update for short period periodics ------------
1070
- if (satrec.method === Sgp4Methods.DEEP_SPACE) {
1071
- const cosisq = cosip * cosip;
1072
- satrec.con41 = 3.0 * cosisq - 1.0;
1073
- satrec.x1mth2 = 1.0 - cosisq;
1074
- satrec.x7thm1 = 7.0 * cosisq - 1.0;
1075
- }
1076
- const mrt = rl * (1.0 - 1.5 * temp2 * betal * satrec.con41) + 0.5 * temp1 * satrec.x1mth2 * cos2u;
1077
- /** Moved this up to reduce unnecessary computation if you are going to return false anyway */
1078
- // Sgp4fix for decaying satellites
1079
- if (mrt < 1.0) {
1080
- satrec.error = Sgp4ErrorCode.SATELLITE_DECAYED;
1081
- return {
1082
- position: false,
1083
- velocity: false,
1084
- };
1085
- }
1086
- su -= 0.25 * temp2 * satrec.x7thm1 * sin2u;
1087
- const xnode = nodep + 1.5 * temp2 * cosip * sin2u;
1088
- const xinc = xincp + 1.5 * temp2 * cosip * sinip * cos2u;
1089
- const mvt = rdotl - (nm * temp1 * satrec.x1mth2 * sin2u) / xke;
1090
- const rvdot = rvdotl + (nm * temp1 * (satrec.x1mth2 * cos2u + 1.5 * satrec.con41)) / xke;
1091
- // --------------------- orientation vectors -------------------
1092
- const sinsu = Math.sin(su);
1093
- const cossu = Math.cos(su);
1094
- const snod = Math.sin(xnode);
1095
- const cnod = Math.cos(xnode);
1096
- const sini = Math.sin(xinc);
1097
- const cosi = Math.cos(xinc);
1098
- const xmx = -snod * cosi;
1099
- const xmy = cnod * cosi;
1100
- const ux = xmx * sinsu + cnod * cossu;
1101
- const uy = xmy * sinsu + snod * cossu;
1102
- const uz = sini * sinsu;
1103
- const vx = xmx * cossu - cnod * sinsu;
1104
- const vy = xmy * cossu - snod * sinsu;
1105
- const vz = sini * cossu;
1106
- // --------- position and velocity (in km and km/sec) ----------
1107
- const r = {
1108
- x: mrt * ux * satrec.radiusearthkm,
1109
- y: mrt * uy * satrec.radiusearthkm,
1110
- z: mrt * uz * satrec.radiusearthkm,
1111
- };
1112
- const v = {
1113
- x: (mvt * ux + rvdot * vx) * vkmpersec,
1114
- y: (mvt * uy + rvdot * vy) * vkmpersec,
1115
- z: (mvt * uz + rvdot * vz) * vkmpersec,
1116
- };
1117
- return {
1118
- position: r,
1119
- velocity: v,
1120
- };
1121
- }
1122
- /*
1123
- * -----------------------------------------------------------------------------
1124
- *
1125
- * function rv2coe_SGP4
1126
- *
1127
- * this function finds the classical orbital elements given the geocentric
1128
- * equatorial position and velocity vectors.
1129
- *
1130
- * author : david vallado 719-573-2600 21 jun 2002
1131
- *
1132
- * revisions
1133
- * vallado - fix special cases 5 sep 2002
1134
- * vallado - delete extra check in inclination code 16 oct 2002
1135
- * vallado - add constant file use 29 jun 2003
1136
- * vallado - add mu 2 apr 2007
1137
- *
1138
- * inputs description range / units
1139
- * r - ijk position vector km
1140
- * v - ijk velocity vector km / s
1141
- * mu - gravitational parameter km3 / s2
1142
- *
1143
- * outputs :
1144
- * p - semilatus rectum km
1145
- * a - semimajor axis km
1146
- * ecc - eccentricity
1147
- * incl - inclination 0.0 to pi rad
1148
- * omega - right ascension of ascending node 0.0 to 2pi rad
1149
- * argp - argument of perigee 0.0 to 2pi rad
1150
- * nu - true anomaly 0.0 to 2pi rad
1151
- * m - mean anomaly 0.0 to 2pi rad
1152
- * arglat - argument of latitude (ci) 0.0 to 2pi rad
1153
- * truelon - true longitude (ce) 0.0 to 2pi rad
1154
- * lonper - longitude of periapsis (ee) 0.0 to 2pi rad
1155
- *
1156
- * locals :
1157
- * hbar - angular momentum h vector km2 / s
1158
- * ebar - eccentricity e vector
1159
- * nbar - line of nodes n vector
1160
- * c1 - v**2 - u/r
1161
- * rdotv - r dot v
1162
- * hk - hk unit vector
1163
- * sme - specfic mechanical energy km2 / s2
1164
- * i - index
1165
- * e - eccentric, parabolic,
1166
- * hyperbolic anomaly rad
1167
- * temp - temporary variable
1168
- * typeorbit - type of orbit ee, ei, ce, ci
1169
- *
1170
- * coupling :
1171
- * mag - magnitude of a vector
1172
- * cross - cross product of two vectors
1173
- * angle - find the angle between two vectors
1174
- * newtonnu - find the mean anomaly
1175
- *
1176
- * references :
1177
- * vallado 2013, 113, alg 9, ex 2-5
1178
- * ---------------------------------------------------------------------------
1179
- */
1180
- static rv2coe(r, v, mus) {
1181
- const nbar = [0, 0, 0];
1182
- const ebar = [0, 0, 0];
1183
- let p;
1184
- let a;
1185
- let ecc;
1186
- let incl;
1187
- let omega;
1188
- let argp;
1189
- let nu;
1190
- let m = 0;
1191
- let arglat;
1192
- let truelon;
1193
- let lonper;
1194
- let rdotv;
1195
- let magn;
1196
- let hk;
1197
- let sme;
1198
- let i;
1199
- /*
1200
- * Switch this to an integer msvs seems to have probelms with this and strncpy_s
1201
- * char typeorbit[2];
1202
- */
1203
- let typeorbit;
1204
- /*
1205
- * Here
1206
- * typeorbit = 1 = 'ei'
1207
- * typeorbit = 2 = 'ce'
1208
- * typeorbit = 3 = 'ci'
1209
- * typeorbit = 4 = 'ee'
1210
- */
1211
- const halfpi = 0.5 * PI;
1212
- const small = 0.00000001;
1213
- const unknown = 999999.1; /** Ootk -- original undefined is illegal in JS */
1214
- const infinite = 999999.9;
1215
- // ------------------------- implementation -----------------
1216
- const magr = Sgp4.mag_(r);
1217
- const magv = Sgp4.mag_(v);
1218
- // ------------------ find h n and e vectors ----------------
1219
- const hbar = Sgp4.cross_(r, v);
1220
- const magh = Sgp4.mag_(hbar);
1221
- if (magh > small) {
1222
- nbar[0] = -hbar[1];
1223
- nbar[1] = hbar[0];
1224
- nbar[2] = 0.0;
1225
- magn = Sgp4.mag_(nbar);
1226
- const c1 = magv * magv - mus / magr;
1227
- rdotv = Sgp4.dot_(r, v);
1228
- for (i = 0; i <= 2; i++) {
1229
- ebar[i] = (c1 * (r[i]) - rdotv * (v[i])) / mus;
1230
- }
1231
- ecc = Sgp4.mag_(ebar);
1232
- // ------------ find a e and semi-latus rectum ----------
1233
- sme = magv * magv * 0.5 - mus / magr;
1234
- if (Math.abs(sme) > small) {
1235
- a = -mus / (2.0 * sme);
1236
- }
1237
- else {
1238
- a = infinite;
1239
- }
1240
- p = (magh * magh) / mus;
1241
- // ----------------- find inclination -------------------
1242
- hk = hbar[2] / magh;
1243
- incl = Math.acos(hk);
1244
- /*
1245
- * -------- determine type of orbit for later use --------
1246
- * ------ elliptical, parabolic, hyperbolic inclined -------
1247
- */
1248
- typeorbit = 1;
1249
- if (ecc < small) {
1250
- // ---------------- circular equatorial ---------------
1251
- if (incl < small || Math.abs(incl - PI) < small) {
1252
- typeorbit = 2;
1253
- }
1254
- else {
1255
- // -------------- circular inclined ---------------
1256
- typeorbit = 3;
1257
- }
1258
- // - elliptical, parabolic, hyperbolic equatorial --
1259
- }
1260
- else if (incl < small || Math.abs(incl - PI) < small) {
1261
- typeorbit = 4;
1262
- }
1263
- // ---------- find right ascension of the ascending node ------------
1264
- if (magn > small) {
1265
- let temp = nbar[0] / magn;
1266
- if (Math.abs(temp) > 1.0) {
1267
- temp = Sgp4.sgn_(temp);
1268
- }
1269
- omega = Math.acos(temp);
1270
- if (nbar[1] < 0.0) {
1271
- omega = TAU - omega;
1272
- }
1273
- }
1274
- else {
1275
- omega = unknown;
1276
- }
1277
- // ---------------- find argument of perigee ---------------
1278
- if (typeorbit === 1) {
1279
- argp = Sgp4.angle_(nbar, ebar);
1280
- if (ebar[2] < 0.0) {
1281
- argp = TAU - argp;
1282
- }
1283
- }
1284
- else {
1285
- argp = unknown;
1286
- }
1287
- // ------------ find true anomaly at epoch -------------
1288
- if (typeorbit === 1 || typeorbit === 4) {
1289
- nu = Sgp4.angle_(ebar, r);
1290
- if (rdotv < 0.0) {
1291
- nu = TAU - nu;
1292
- }
1293
- }
1294
- else {
1295
- nu = unknown;
1296
- }
1297
- // ---- find argument of latitude - circular inclined -----
1298
- if (typeorbit === 3) {
1299
- arglat = Sgp4.angle_(nbar, r);
1300
- if (r[2] < 0.0) {
1301
- arglat = TAU - arglat;
1302
- }
1303
- m = arglat;
1304
- }
1305
- else {
1306
- arglat = unknown;
1307
- }
1308
- if (ecc > small && typeorbit === 4) {
1309
- let temp = ebar[0] / ecc;
1310
- if (Math.abs(temp) > 1.0) {
1311
- temp = Sgp4.sgn_(temp);
1312
- }
1313
- lonper = Math.acos(temp);
1314
- if (ebar[1] < 0.0) {
1315
- lonper = TAU - lonper;
1316
- }
1317
- if (incl > halfpi) {
1318
- lonper = TAU - lonper;
1319
- }
1320
- }
1321
- else {
1322
- lonper = unknown;
1323
- }
1324
- // -------- find true longitude - circular equatorial ------
1325
- if (magr > small && typeorbit === 2) {
1326
- let temp = r[0] / magr;
1327
- if (Math.abs(temp) > 1.0) {
1328
- temp = Sgp4.sgn_(temp);
1329
- }
1330
- truelon = Math.acos(temp);
1331
- if (r[1] < 0.0) {
1332
- truelon = TAU - truelon;
1333
- }
1334
- if (incl > halfpi) {
1335
- truelon = TAU - truelon;
1336
- }
1337
- m = truelon;
1338
- }
1339
- else {
1340
- truelon = unknown;
1341
- }
1342
- // ------------ find mean anomaly for all orbits -----------
1343
- if (typeorbit === 1 || typeorbit === 4) {
1344
- m = Sgp4.newtonnu_(ecc, nu).m;
1345
- }
1346
- }
1347
- else {
1348
- p = unknown;
1349
- a = unknown;
1350
- ecc = unknown;
1351
- incl = unknown;
1352
- omega = unknown;
1353
- argp = unknown;
1354
- nu = unknown;
1355
- m = unknown;
1356
- arglat = unknown;
1357
- truelon = unknown;
1358
- lonper = unknown;
1359
- }
1360
- return {
1361
- p,
1362
- a,
1363
- ecc,
1364
- incl,
1365
- omega,
1366
- argp,
1367
- nu,
1368
- m,
1369
- arglat,
1370
- truelon,
1371
- lonper,
1372
- };
1373
- }
1374
- /**
1375
- * Determines the sign of a given number.
1376
- * @param x - The input number to evaluate.
1377
- * @returns `-1.0` if the input number is less than `0.0`, otherwise `1.0`.
1378
- */
1379
- static sgn_(x) {
1380
- if (x < 0.0) {
1381
- return -1.0;
1382
- }
1383
- return 1.0;
1384
- }
1385
- /**
1386
- * Computes the hyperbolic sine of a given number.
1387
- *
1388
- * The hyperbolic sine is calculated using the formula:
1389
- * sinh(x) = (e^x - e^(-x)) / 2
1390
- * @param x - The input number for which to calculate the hyperbolic sine.
1391
- * @returns The hyperbolic sine of the input number.
1392
- */
1393
- static sinh_(x) {
1394
- return (Math.exp(x) - Math.exp(-x)) / 2;
1395
- }
1396
- /*
1397
- * -----------------------------------------------------------------------------
1398
- *
1399
- * procedure dpper
1400
- *
1401
- * this procedure provides deep space long period periodic contributions
1402
- * to the mean elements. by design, these periodics are zero at epoch.
1403
- * this used to be dscom which included initialization, but it's really a
1404
- * recurring function.
1405
- *
1406
- * author : david vallado 719-573-2600 28 jun 2005
1407
- *
1408
- * inputs :
1409
- * e3 -
1410
- * ee2 -
1411
- * peo -
1412
- * pgho -
1413
- * pho -
1414
- * PInco -
1415
- * plo -
1416
- * se2 , se3 , sgh2, sgh3, sgh4, sh2, sh3, si2, si3, sl2, sl3, sl4 -
1417
- * t -
1418
- * xh2, xh3, xi2, xi3, xl2, xl3, xl4 -
1419
- * zmol -
1420
- * zmos -
1421
- * ep - eccentricity 0.0 - 1.0
1422
- * inclo - inclination - needed for lyddane modification
1423
- * nodep - right ascension of ascending node
1424
- * argpp - argument of perigee
1425
- * mp - mean anomaly
1426
- *
1427
- * outputs :
1428
- * ep - eccentricity 0.0 - 1.0
1429
- * inclp - inclination
1430
- * nodep - right ascension of ascending node
1431
- * argpp - argument of perigee
1432
- * mp - mean anomaly
1433
- *
1434
- * locals :
1435
- * alfdp -
1436
- * betdp -
1437
- * cosip , sinip , cosop , sinop ,
1438
- * dalf -
1439
- * dbet -
1440
- * dls -
1441
- * f2, f3 -
1442
- * pe -
1443
- * pgh -
1444
- * ph -
1445
- * PInc -
1446
- * pl -
1447
- * sel , ses , sghl , sghs , shl , shs , sil , sinzf , sis ,
1448
- * sll , sls
1449
- * xls -
1450
- * xnoh -
1451
- * zf -
1452
- * zm -
1453
- *
1454
- * coupling :
1455
- * none.
1456
- *
1457
- * references :
1458
- * hoots, roehrich, norad spacetrack report #3 1980
1459
- * hoots, norad spacetrack report #6 1986
1460
- * hoots, schumacher and glover 2004
1461
- * vallado, crawford, hujsak, kelso 2006
1462
- * ----------------------------------------------------------------------------
1463
- */
1464
- static dpper_(options) {
1465
- const { e3, ee2, peo, pgho, pho, PInco, plo, se2, se3, sgh2, sgh3, sgh4, sh2, sh3, si2, si3, sl2, sl3, sl4, t, xgh2, xgh3, xgh4, xh2, xh3, xi2, xi3, xl2, xl3, xl4, zmol, zmos, } = options.satrec;
1466
- let { ep, inclp, nodep, argpp, mp } = options;
1467
- const { opsmode = Sgp4OpsMode.IMPROVED, init } = options;
1468
- // ---------------------- constants -----------------------------
1469
- /** Ootk -- Some variables imported from outside the class at the top */
1470
- const zns = 1.19459e-5;
1471
- const zes = 0.01675;
1472
- const znl = 1.5835218e-4;
1473
- const zel = 0.0549;
1474
- // --------------- calculate time varying periodics -----------
1475
- let zm = zmos + zns * t;
1476
- // Be sure that the initial call has time set to zero
1477
- if (init) {
1478
- zm = zmos;
1479
- }
1480
- let zf = zm + 2.0 * zes * Math.sin(zm);
1481
- let sinzf = Math.sin(zf);
1482
- let f2 = 0.5 * sinzf * sinzf - 0.25;
1483
- let f3 = -0.5 * sinzf * Math.cos(zf);
1484
- const ses = se2 * f2 + se3 * f3;
1485
- const sis = si2 * f2 + si3 * f3;
1486
- const sls = sl2 * f2 + sl3 * f3 + sl4 * sinzf;
1487
- const sghs = sgh2 * f2 + sgh3 * f3 + sgh4 * sinzf;
1488
- const shs = sh2 * f2 + sh3 * f3;
1489
- zm = zmol + znl * t;
1490
- if (init) {
1491
- zm = zmol;
1492
- }
1493
- zf = zm + 2.0 * zel * Math.sin(zm);
1494
- sinzf = Math.sin(zf);
1495
- f2 = 0.5 * sinzf * sinzf - 0.25;
1496
- f3 = -0.5 * sinzf * Math.cos(zf);
1497
- const sel = ee2 * f2 + e3 * f3;
1498
- const sil = xi2 * f2 + xi3 * f3;
1499
- const sll = xl2 * f2 + xl3 * f3 + xl4 * sinzf;
1500
- const sghl = xgh2 * f2 + xgh3 * f3 + xgh4 * sinzf;
1501
- const shll = xh2 * f2 + xh3 * f3;
1502
- let pe = ses + sel;
1503
- let PInc = sis + sil;
1504
- let pl = sls + sll;
1505
- let pgh = sghs + sghl;
1506
- let ph = shs + shll;
1507
- if (!init) {
1508
- pe -= peo;
1509
- PInc -= PInco;
1510
- pl -= plo;
1511
- pgh -= pgho;
1512
- ph -= pho;
1513
- inclp += PInc;
1514
- ep += pe;
1515
- const sinip = Math.sin(inclp);
1516
- const cosip = Math.cos(inclp);
1517
- /* ----------------- apply periodics directly ------------ */
1518
- /*
1519
- * Sgp4fix for lyddane choice
1520
- * strn3 used original inclination - this is technically feasible
1521
- * gsfc used perturbed inclination - also technically feasible
1522
- * probably best to readjust the 0.2 limit value and limit discontinuity
1523
- * 0.2 rad = 11.45916 deg
1524
- * use next line for original strn3 approach and original inclination
1525
- * if (inclo >= 0.2)
1526
- * use next line for gsfc version and perturbed inclination
1527
- */
1528
- if (inclp >= 0.2) {
1529
- ph /= sinip;
1530
- pgh -= cosip * ph;
1531
- argpp += pgh;
1532
- nodep += ph;
1533
- mp += pl;
1534
- }
1535
- else {
1536
- // ---- apply periodics with lyddane modification ----
1537
- const sinop = Math.sin(nodep);
1538
- const cosop = Math.cos(nodep);
1539
- let alfdp = sinip * sinop;
1540
- let betdp = sinip * cosop;
1541
- const dalf = ph * cosop + PInc * cosip * sinop;
1542
- const dbet = -ph * sinop + PInc * cosip * cosop;
1543
- alfdp += dalf;
1544
- betdp += dbet;
1545
- nodep %= TAU;
1546
- /*
1547
- * Sgp4fix for afspc written intrinsic functions
1548
- * nodep used without a trigonometric function ahead
1549
- */
1550
- /* istanbul ignore next */
1551
- if (nodep < 0.0 && opsmode === 'a') {
1552
- nodep += TAU;
1553
- }
1554
- let xls = mp + argpp + cosip * nodep;
1555
- const dls = pl + pgh - PInc * nodep * sinip;
1556
- xls += dls;
1557
- const xnoh = nodep;
1558
- nodep = Math.atan2(alfdp, betdp);
1559
- /*
1560
- * Sgp4fix for afspc written intrinsic functions
1561
- * nodep used without a trigonometric function ahead
1562
- */
1563
- /* istanbul ignore next */
1564
- if (nodep < 0.0 && opsmode === 'a') {
1565
- nodep += TAU;
1566
- }
1567
- if (Math.abs(xnoh - nodep) > PI) {
1568
- /* istanbul ignore next */
1569
- if (nodep < xnoh) {
1570
- nodep += TAU;
1571
- }
1572
- else {
1573
- nodep -= TAU;
1574
- }
1575
- }
1576
- mp += pl;
1577
- argpp = xls - mp - cosip * nodep;
1578
- }
1579
- } // If !init
1580
- return {
1581
- ep,
1582
- inclp,
1583
- nodep,
1584
- argpp,
1585
- mp,
1586
- };
1587
- }
1588
- /*
1589
- *-----------------------------------------------------------------------------
1590
- *
1591
- * procedure dscom
1592
- *
1593
- * this procedure provides deep space common items used by both the secular
1594
- * and periodics subroutines. input is provided as shown. this routine
1595
- * used to be called dpper, but the functions inside weren't well organized.
1596
- *
1597
- * author : david vallado 719-573-2600 28 jun 2005
1598
- *
1599
- * inputs :
1600
- * epoch -
1601
- * ep - eccentricity
1602
- * argpp - argument of perigee
1603
- * tc -
1604
- * inclp - inclination
1605
- * nodep - right ascension of ascending node
1606
- * np - mean motion
1607
- *
1608
- * outputs :
1609
- * sinim , cosim , sinomm , cosomm , snodm , cnodm
1610
- * day -
1611
- * e3 -
1612
- * ee2 -
1613
- * em - eccentricity
1614
- * emsq - eccentricity squared
1615
- * gam -
1616
- * peo -
1617
- * pgho -
1618
- * pho -
1619
- * PInco -
1620
- * plo -
1621
- * rtemsq -
1622
- * se2, se3 -
1623
- * sgh2, sgh3, sgh4 -
1624
- * sh2, sh3, si2, si3, sl2, sl3, sl4 -
1625
- * s1, s2, s3, s4, s5, s6, s7 -
1626
- * ss1, ss2, ss3, ss4, ss5, ss6, ss7, sz1, sz2, sz3 -
1627
- * sz11, sz12, sz13, sz21, sz22, sz23, sz31, sz32, sz33 -
1628
- * xgh2, xgh3, xgh4, xh2, xh3, xi2, xi3, xl2, xl3, xl4 -
1629
- * nm - mean motion
1630
- * z1, z2, z3, z11, z12, z13, z21, z22, z23, z31, z32, z33 -
1631
- * zmol -
1632
- * zmos -
1633
- *
1634
- * locals :
1635
- * a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 -
1636
- * betasq -
1637
- * cc -
1638
- * ctem, stem -
1639
- * x1, x2, x3, x4, x5, x6, x7, x8 -
1640
- * xnodce -
1641
- * xnoi -
1642
- * zcosg , zsing , zcosgl , zsingl , zcosh , zsinh , zcoshl , zsinhl ,
1643
- * zcosi , zsini , zcosil , zsinil ,
1644
- * zx -
1645
- * zy -
1646
- *
1647
- * coupling :
1648
- * none.
1649
- *
1650
- * references :
1651
- * hoots, roehrich, norad spacetrack report #3 1980
1652
- * hoots, norad spacetrack report #6 1986
1653
- * hoots, schumacher and glover 2004
1654
- * vallado, crawford, hujsak, kelso 2006
1655
- *----------------------------------------------------------------------------
1656
- */
1657
- static dscom_(options) {
1658
- const { epoch, ep, argpp, tc, inclp, nodep, np } = options;
1659
- // -------------------------- constants -------------------------
1660
- /** Ootk -- Some variables imported from outside the class at the top */
1661
- const zes = 0.01675;
1662
- const zel = 0.0549;
1663
- const c1ss = 2.9864797e-6;
1664
- const c1l = 4.7968065e-7;
1665
- const zsinis = 0.39785416;
1666
- const zcosis = 0.91744867;
1667
- const zcosgs = 0.1945905;
1668
- const zsings = -0.98088458;
1669
- // --------------------- local variables ------------------------
1670
- let s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, ss1 = 0, ss2 = 0, ss3 = 0, ss4 = 0, ss5 = 0, ss6 = 0, ss7 = 0, sz1 = 0, sz11 = 0, sz12 = 0, sz13 = 0, sz2 = 0, sz21 = 0, sz22 = 0, sz23 = 0, sz3 = 0, sz31 = 0, sz32 = 0, sz33 = 0, z1 = 0, z11 = 0, z12 = 0, z13 = 0, z2 = 0, z21 = 0, z22 = 0, z23 = 0, z3 = 0, z31 = 0, z32 = 0, z33 = 0;
1671
- const nm = np;
1672
- const em = ep;
1673
- const snodm = Math.sin(nodep);
1674
- const cnodm = Math.cos(nodep);
1675
- const sinomm = Math.sin(argpp);
1676
- const cosomm = Math.cos(argpp);
1677
- const sinim = Math.sin(inclp);
1678
- const cosim = Math.cos(inclp);
1679
- const emsq = em * em;
1680
- const betasq = 1.0 - emsq;
1681
- const rtemsq = Math.sqrt(betasq);
1682
- // ----------------- initialize lunar solar terms ---------------
1683
- const peo = 0.0;
1684
- const PInco = 0.0;
1685
- const plo = 0.0;
1686
- const pgho = 0.0;
1687
- const pho = 0.0;
1688
- const day = epoch + 18261.5 + tc / 1440.0;
1689
- const xnodce = (4.523602 - 9.2422029e-4 * day) % TAU;
1690
- const stem = Math.sin(xnodce);
1691
- const ctem = Math.cos(xnodce);
1692
- const zcosil = 0.91375164 - 0.03568096 * ctem;
1693
- const zsinil = Math.sqrt(1.0 - zcosil * zcosil);
1694
- const zsinhl = (0.089683511 * stem) / zsinil;
1695
- const zcoshl = Math.sqrt(1.0 - zsinhl * zsinhl);
1696
- const gam = 5.8351514 + 0.001944368 * day;
1697
- let zx = (0.39785416 * stem) / zsinil;
1698
- const zy = zcoshl * ctem + 0.91744867 * zsinhl * stem;
1699
- zx = Math.atan2(zx, zy);
1700
- zx += gam - xnodce;
1701
- const zcosgl = Math.cos(zx);
1702
- const zsingl = Math.sin(zx);
1703
- // ------------------------- do solar terms ---------------------
1704
- let zcosg = zcosgs;
1705
- let zsing = zsings;
1706
- let zcosi = zcosis;
1707
- let zsini = zsinis;
1708
- let zcosh = cnodm;
1709
- let zsinh = snodm;
1710
- let cc = c1ss;
1711
- const xnoi = 1.0 / nm;
1712
- for (let lsflg = 1; lsflg <= 2; lsflg++) {
1713
- const a1 = zcosg * zcosh + zsing * zcosi * zsinh;
1714
- const a3 = -zsing * zcosh + zcosg * zcosi * zsinh;
1715
- const a7 = -zcosg * zsinh + zsing * zcosi * zcosh;
1716
- const a8 = zsing * zsini;
1717
- const a9 = zsing * zsinh + zcosg * zcosi * zcosh;
1718
- const a10 = zcosg * zsini;
1719
- const a2 = cosim * a7 + sinim * a8;
1720
- const a4 = cosim * a9 + sinim * a10;
1721
- const a5 = -sinim * a7 + cosim * a8;
1722
- const a6 = -sinim * a9 + cosim * a10;
1723
- const x1 = a1 * cosomm + a2 * sinomm;
1724
- const x2 = a3 * cosomm + a4 * sinomm;
1725
- const x3 = -a1 * sinomm + a2 * cosomm;
1726
- const x4 = -a3 * sinomm + a4 * cosomm;
1727
- const x5 = a5 * sinomm;
1728
- const x6 = a6 * sinomm;
1729
- const x7 = a5 * cosomm;
1730
- const x8 = a6 * cosomm;
1731
- z31 = 12.0 * x1 * x1 - 3.0 * x3 * x3;
1732
- z32 = 24.0 * x1 * x2 - 6.0 * x3 * x4;
1733
- z33 = 12.0 * x2 * x2 - 3.0 * x4 * x4;
1734
- z1 = 3.0 * (a1 * a1 + a2 * a2) + z31 * emsq;
1735
- z2 = 6.0 * (a1 * a3 + a2 * a4) + z32 * emsq;
1736
- z3 = 3.0 * (a3 * a3 + a4 * a4) + z33 * emsq;
1737
- z11 = -6.0 * a1 * a5 + emsq * (-24.0 * x1 * x7 - 6.0 * x3 * x5);
1738
- z12 = -6.0 * (a1 * a6 + a3 * a5) + emsq * (-24.0 * (x2 * x7 + x1 * x8) + -6.0 * (x3 * x6 + x4 * x5));
1739
- z13 = -6.0 * a3 * a6 + emsq * (-24.0 * x2 * x8 - 6.0 * x4 * x6);
1740
- z21 = 6.0 * a2 * a5 + emsq * (24.0 * x1 * x5 - 6.0 * x3 * x7);
1741
- z22 = 6.0 * (a4 * a5 + a2 * a6) + emsq * (24.0 * (x2 * x5 + x1 * x6) - 6.0 * (x4 * x7 + x3 * x8));
1742
- z23 = 6.0 * a4 * a6 + emsq * (24.0 * x2 * x6 - 6.0 * x4 * x8);
1743
- z1 = z1 + z1 + betasq * z31;
1744
- z2 = z2 + z2 + betasq * z32;
1745
- z3 = z3 + z3 + betasq * z33;
1746
- s3 = cc * xnoi;
1747
- s2 = (-0.5 * s3) / rtemsq;
1748
- s4 = s3 * rtemsq;
1749
- s1 = -15.0 * em * s4;
1750
- s5 = x1 * x3 + x2 * x4;
1751
- s6 = x2 * x3 + x1 * x4;
1752
- s7 = x2 * x4 - x1 * x3;
1753
- // ----------------------- do lunar terms -------------------
1754
- if (lsflg === 1) {
1755
- ss1 = s1;
1756
- ss2 = s2;
1757
- ss3 = s3;
1758
- ss4 = s4;
1759
- ss5 = s5;
1760
- ss6 = s6;
1761
- ss7 = s7;
1762
- sz1 = z1;
1763
- sz2 = z2;
1764
- sz3 = z3;
1765
- sz11 = z11;
1766
- sz12 = z12;
1767
- sz13 = z13;
1768
- sz21 = z21;
1769
- sz22 = z22;
1770
- sz23 = z23;
1771
- sz31 = z31;
1772
- sz32 = z32;
1773
- sz33 = z33;
1774
- zcosg = zcosgl;
1775
- zsing = zsingl;
1776
- zcosi = zcosil;
1777
- zsini = zsinil;
1778
- zcosh = zcoshl * cnodm + zsinhl * snodm;
1779
- zsinh = snodm * zcoshl - cnodm * zsinhl;
1780
- cc = c1l;
1781
- }
1782
- }
1783
- const zmol = (4.7199672 + (0.2299715 * day - gam)) % TAU;
1784
- const zmos = (6.2565837 + 0.017201977 * day) % TAU;
1785
- // ------------------------ do solar terms ----------------------
1786
- const se2 = 2.0 * ss1 * ss6;
1787
- const se3 = 2.0 * ss1 * ss7;
1788
- const si2 = 2.0 * ss2 * sz12;
1789
- const si3 = 2.0 * ss2 * (sz13 - sz11);
1790
- const sl2 = -2.0 * ss3 * sz2;
1791
- const sl3 = -2.0 * ss3 * (sz3 - sz1);
1792
- const sl4 = -2.0 * ss3 * (-21.0 - 9.0 * emsq) * zes;
1793
- const sgh2 = 2.0 * ss4 * sz32;
1794
- const sgh3 = 2.0 * ss4 * (sz33 - sz31);
1795
- const sgh4 = -18.0 * ss4 * zes;
1796
- const sh2 = -2.0 * ss2 * sz22;
1797
- const sh3 = -2.0 * ss2 * (sz23 - sz21);
1798
- // ------------------------ do lunar terms ----------------------
1799
- const ee2 = 2.0 * s1 * s6;
1800
- const e3 = 2.0 * s1 * s7;
1801
- const xi2 = 2.0 * s2 * z12;
1802
- const xi3 = 2.0 * s2 * (z13 - z11);
1803
- const xl2 = -2.0 * s3 * z2;
1804
- const xl3 = -2.0 * s3 * (z3 - z1);
1805
- const xl4 = -2.0 * s3 * (-21.0 - 9.0 * emsq) * zel;
1806
- const xgh2 = 2.0 * s4 * z32;
1807
- const xgh3 = 2.0 * s4 * (z33 - z31);
1808
- const xgh4 = -18.0 * s4 * zel;
1809
- const xh2 = -2.0 * s2 * z22;
1810
- const xh3 = -2.0 * s2 * (z23 - z21);
1811
- return {
1812
- snodm,
1813
- cnodm,
1814
- sinim,
1815
- cosim,
1816
- sinomm,
1817
- cosomm,
1818
- day,
1819
- e3,
1820
- ee2,
1821
- em,
1822
- emsq,
1823
- gam,
1824
- peo,
1825
- pgho,
1826
- pho,
1827
- PInco,
1828
- plo,
1829
- rtemsq,
1830
- se2,
1831
- se3,
1832
- sgh2,
1833
- sgh3,
1834
- sgh4,
1835
- sh2,
1836
- sh3,
1837
- si2,
1838
- si3,
1839
- sl2,
1840
- sl3,
1841
- sl4,
1842
- s1,
1843
- s2,
1844
- s3,
1845
- s4,
1846
- s5,
1847
- s6,
1848
- s7,
1849
- ss1,
1850
- ss2,
1851
- ss3,
1852
- ss4,
1853
- ss5,
1854
- ss6,
1855
- ss7,
1856
- sz1,
1857
- sz2,
1858
- sz3,
1859
- sz11,
1860
- sz12,
1861
- sz13,
1862
- sz21,
1863
- sz22,
1864
- sz23,
1865
- sz31,
1866
- sz32,
1867
- sz33,
1868
- xgh2,
1869
- xgh3,
1870
- xgh4,
1871
- xh2,
1872
- xh3,
1873
- xi2,
1874
- xi3,
1875
- xl2,
1876
- xl3,
1877
- xl4,
1878
- nm,
1879
- z1,
1880
- z2,
1881
- z3,
1882
- z11,
1883
- z12,
1884
- z13,
1885
- z21,
1886
- z22,
1887
- z23,
1888
- z31,
1889
- z32,
1890
- z33,
1891
- zmol,
1892
- zmos,
1893
- };
1894
- }
1895
- /*
1896
- *-----------------------------------------------------------------------------
1897
- *
1898
- * procedure dsinit
1899
- *
1900
- * this procedure provides deep space contributions to mean motion dot due
1901
- * to geopotential resonance with half day and one day orbits.
1902
- *
1903
- * author : david vallado 719-573-2600 28 jun 2005
1904
- *
1905
- * inputs :
1906
- * cosim, sinim-
1907
- * emsq - eccentricity squared
1908
- * argpo - argument of perigee
1909
- * s1, s2, s3, s4, s5 -
1910
- * ss1, ss2, ss3, ss4, ss5 -
1911
- * sz1, sz3, sz11, sz13, sz21, sz23, sz31, sz33 -
1912
- * t - time
1913
- * tc -
1914
- * gsto - greenwich sidereal time rad
1915
- * mo - mean anomaly
1916
- * mdot - mean anomaly dot (rate)
1917
- * no - mean motion
1918
- * nodeo - right ascension of ascending node
1919
- * nodedot - right ascension of ascending node dot (rate)
1920
- * xPIdot -
1921
- * z1, z3, z11, z13, z21, z23, z31, z33 -
1922
- * eccm - eccentricity
1923
- * argpm - argument of perigee
1924
- * inclm - inclination
1925
- * mm - mean anomaly
1926
- * xn - mean motion
1927
- * nodem - right ascension of ascending node
1928
- *
1929
- * outputs :
1930
- * em - eccentricity
1931
- * argpm - argument of perigee
1932
- * inclm - inclination
1933
- * mm - mean anomaly
1934
- * nm - mean motion
1935
- * nodem - right ascension of ascending node
1936
- * irez - flag for resonance 0-none, 1-one day, 2-half day
1937
- * atime -
1938
- * d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433 -
1939
- * dedt -
1940
- * didt -
1941
- * dmdt -
1942
- * dndt -
1943
- * dnodt -
1944
- * domdt -
1945
- * del1, del2, del3 -
1946
- * ses , sghl , sghs , sgs , shl , shs , sis , sls
1947
- * theta -
1948
- * xfact -
1949
- * xlamo -
1950
- * xli -
1951
- * xni
1952
- *
1953
- * locals :
1954
- * ainv2 -
1955
- * aonv -
1956
- * cosisq -
1957
- * eoc -
1958
- * f220, f221, f311, f321, f322, f330, f441, f442, f522, f523, f542, f543 -
1959
- * g200, g201, g211, g300, g310, g322, g410, g422, g520, g521, g532, g533 -
1960
- * sini2 -
1961
- * temp -
1962
- * temp1 -
1963
- * theta -
1964
- * xno2 -
1965
- *
1966
- * coupling :
1967
- * getgravconst
1968
- *
1969
- * references :
1970
- * hoots, roehrich, norad spacetrack report #3 1980
1971
- * hoots, norad spacetrack report #6 1986
1972
- * hoots, schumacher and glover 2004
1973
- * vallado, crawford, hujsak, kelso 2006
1974
- *----------------------------------------------------------------------------
1975
- */
1976
- static dsinit_(options) {
1977
- /*
1978
- * Sgp4fix just send in xke as a constant and eliminate getgravconst call
1979
- * gravconsttype whichconst,
1980
- */
1981
- const { xke, cosim, argpo, s1, s2, s3, s4, s5, sinim, ss1, ss2, ss3, ss4, ss5, sz1, sz3, sz11, sz13, sz21, sz23, sz31, sz33, t, tc, gsto, mo, mdot, no, nodeo, nodedot, xPIdot, z1, z3, z11, z13, z21, z23, z31, z33, ecco, eccsq, } = options;
1982
- let { emsq, em, argpm, inclm, mm, nm, nodem, atime, d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433, del1, del2, del3, xfact, xlamo, xli, xni, } = options;
1983
- /* --------------------- local variables ------------------------ */
1984
- /** Ootk -- Some variables imported from outside the class at the top */
1985
- const q22 = 1.7891679e-6;
1986
- const q31 = 2.1460748e-6;
1987
- const q33 = 2.2123015e-7;
1988
- const root22 = 1.7891679e-6;
1989
- const root44 = 7.3636953e-9;
1990
- const root54 = 2.1765803e-9;
1991
- const rptim = 4.37526908801129966e-3; // Equates to 7.29211514668855e-5 rad/sec
1992
- const root32 = 3.7393792e-7;
1993
- const root52 = 1.1428639e-7;
1994
- const x2o3 = 2.0 / 3.0;
1995
- const znl = 1.5835218e-4;
1996
- const zns = 1.19459e-5;
1997
- /*
1998
- * Sgp4fix identify constants and allow alternate values
1999
- * just xke is used here so pass it in rather than have multiple calls
2000
- * getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 );
2001
- */
2002
- // -------------------- deep space initialization ------------
2003
- let irez = 0;
2004
- if (nm < 0.0052359877 && nm > 0.0034906585) {
2005
- irez = 1;
2006
- }
2007
- if (nm >= 8.26e-3 && nm <= 9.24e-3 && em >= 0.5) {
2008
- irez = 2;
2009
- }
2010
- // ------------------------ do solar terms -------------------
2011
- const ses = ss1 * zns * ss5;
2012
- const sis = ss2 * zns * (sz11 + sz13);
2013
- const sls = -zns * ss3 * (sz1 + sz3 - 14.0 - 6.0 * emsq);
2014
- const sghs = ss4 * zns * (sz31 + sz33 - 6.0);
2015
- let shs = -zns * ss2 * (sz21 + sz23);
2016
- // Sgp4fix for 180 deg incl
2017
- if (inclm < 5.2359877e-2 || inclm > PI - 5.2359877e-2) {
2018
- shs = 0.0;
2019
- }
2020
- if (sinim !== 0.0) {
2021
- shs /= sinim;
2022
- }
2023
- const sgs = sghs - cosim * shs;
2024
- // ------------------------- do lunar terms ------------------
2025
- const dedt = ses + s1 * znl * s5;
2026
- const didt = sis + s2 * znl * (z11 + z13);
2027
- const dmdt = sls - znl * s3 * (z1 + z3 - 14.0 - 6.0 * emsq);
2028
- const sghl = s4 * znl * (z31 + z33 - 6.0);
2029
- let shll = -znl * s2 * (z21 + z23);
2030
- // Sgp4fix for 180 deg incl
2031
- if (inclm < 5.2359877e-2 || inclm > PI - 5.2359877e-2) {
2032
- shll = 0.0;
2033
- }
2034
- let domdt = sgs + sghl;
2035
- let dnodt = shs;
2036
- if (sinim !== 0.0) {
2037
- domdt -= (cosim / sinim) * shll;
2038
- dnodt += shll / sinim;
2039
- }
2040
- // ----------- calculate deep space resonance effects --------
2041
- const dndt = 0.0;
2042
- const theta = (gsto + tc * rptim) % TAU;
2043
- em += dedt * t;
2044
- inclm += didt * t;
2045
- argpm += domdt * t;
2046
- nodem += dnodt * t;
2047
- mm += dmdt * t;
2048
- /*
2049
- * Sgp4fix for negative inclinations
2050
- * the following if statement should be commented out
2051
- * if (inclm < 0.0)
2052
- * {
2053
- * inclm = -inclm;
2054
- * argpm = argpm - PI;
2055
- * nodem = nodem + PI;
2056
- * }
2057
- */
2058
- // -------------- initialize the resonance terms -------------
2059
- if (irez !== 0) {
2060
- const aonv = (nm / xke) ** x2o3;
2061
- // ---------- geopotential resonance for 12 hour orbits ------
2062
- if (irez === 2) {
2063
- const cosisq = cosim * cosim;
2064
- const emo = em;
2065
- em = ecco;
2066
- const emsqo = emsq;
2067
- emsq = eccsq;
2068
- const eoc = em * emsq;
2069
- const g201 = -0.306 - (em - 0.64) * 0.44;
2070
- let g211, g310, g322, g410, g422, g520, g521, g532, g533;
2071
- if (em <= 0.65) {
2072
- g211 = 3.616 - 13.247 * em + 16.29 * emsq;
2073
- g310 = -19.302 + 117.39 * em - 228.419 * emsq + 156.591 * eoc;
2074
- g322 = -18.9068 + 109.7927 * em - 214.6334 * emsq + 146.5816 * eoc;
2075
- g410 = -41.122 + 242.694 * em - 471.094 * emsq + 313.953 * eoc;
2076
- g422 = -146.407 + 841.88 * em - 1629.014 * emsq + 1083.435 * eoc;
2077
- g520 = -532.114 + 3017.977 * em - 5740.032 * emsq + 3708.276 * eoc;
2078
- }
2079
- else {
2080
- g211 = -72.099 + 331.819 * em - 508.738 * emsq + 266.724 * eoc;
2081
- g310 = -346.844 + 1582.851 * em - 2415.925 * emsq + 1246.113 * eoc;
2082
- g322 = -342.585 + 1554.908 * em - 2366.899 * emsq + 1215.972 * eoc;
2083
- g410 = -1052.797 + 4758.686 * em - 7193.992 * emsq + 3651.957 * eoc;
2084
- g422 = -3581.69 + 16178.11 * em - 24462.77 * emsq + 12422.52 * eoc;
2085
- if (em > 0.715) {
2086
- g520 = -5149.66 + 29936.92 * em - 54087.36 * emsq + 31324.56 * eoc;
2087
- }
2088
- else {
2089
- g520 = 1464.74 - 4664.75 * em + 3763.64 * emsq;
2090
- }
2091
- }
2092
- if (em < 0.7) {
2093
- g533 = -919.2277 + 4988.61 * em - 9064.77 * emsq + 5542.21 * eoc;
2094
- g521 = -822.71072 + 4568.6173 * em - 8491.4146 * emsq + 5337.524 * eoc;
2095
- g532 = -853.666 + 4690.25 * em - 8624.77 * emsq + 5341.4 * eoc;
2096
- }
2097
- else {
2098
- g533 = -37995.78 + 161616.52 * em - 229838.2 * emsq + 109377.94 * eoc;
2099
- g521 = -51752.104 + 218913.95 * em - 309468.16 * emsq + 146349.42 * eoc;
2100
- g532 = -40023.88 + 170470.89 * em - 242699.48 * emsq + 115605.82 * eoc;
2101
- }
2102
- const sini2 = sinim * sinim;
2103
- const f220 = 0.75 * (1.0 + 2.0 * cosim + cosisq);
2104
- const f221 = 1.5 * sini2;
2105
- const f321 = 1.875 * sinim * (1.0 - 2.0 * cosim - 3.0 * cosisq);
2106
- const f322 = -1.875 * sinim * (1.0 + 2.0 * cosim - 3.0 * cosisq);
2107
- const f441 = 35.0 * sini2 * f220;
2108
- const f442 = 39.375 * sini2 * sini2;
2109
- const f522 = 9.84375 *
2110
- sinim *
2111
- (sini2 * (1.0 - 2.0 * cosim - 5.0 * cosisq) + 0.33333333 * (-2.0 + 4.0 * cosim + 6.0 * cosisq));
2112
- const f523 = sinim *
2113
- (4.92187512 * sini2 * (-2.0 - 4.0 * cosim + 10.0 * cosisq) + 6.56250012 * (1.0 + 2.0 * cosim - 3.0 * cosisq));
2114
- const f542 = 29.53125 * sinim * (2.0 - 8.0 * cosim + cosisq * (-12.0 + 8.0 * cosim + 10.0 * cosisq));
2115
- const f543 = 29.53125 * sinim * (-2.0 - 8.0 * cosim + cosisq * (12.0 + 8.0 * cosim - 10.0 * cosisq));
2116
- const xno2 = nm * nm;
2117
- const ainv2 = aonv * aonv;
2118
- let temp1 = 3.0 * xno2 * ainv2;
2119
- let temp = temp1 * root22;
2120
- d2201 = temp * f220 * g201;
2121
- d2211 = temp * f221 * g211;
2122
- temp1 *= aonv;
2123
- temp = temp1 * root32;
2124
- d3210 = temp * f321 * g310;
2125
- d3222 = temp * f322 * g322;
2126
- temp1 *= aonv;
2127
- temp = 2.0 * temp1 * root44;
2128
- d4410 = temp * f441 * g410;
2129
- d4422 = temp * f442 * g422;
2130
- temp1 *= aonv;
2131
- temp = temp1 * root52;
2132
- d5220 = temp * f522 * g520;
2133
- d5232 = temp * f523 * g532;
2134
- temp = 2.0 * temp1 * root54;
2135
- d5421 = temp * f542 * g521;
2136
- d5433 = temp * f543 * g533;
2137
- xlamo = (mo + nodeo + nodeo - (theta + theta)) % TAU;
2138
- xfact = mdot + dmdt + 2.0 * (nodedot + dnodt - rptim) - no;
2139
- em = emo;
2140
- emsq = emsqo;
2141
- }
2142
- // ---------------- synchronous resonance terms --------------
2143
- if (irez === 1) {
2144
- const g200 = 1.0 + emsq * (-2.5 + 0.8125 * emsq);
2145
- const g310 = 1.0 + 2.0 * emsq;
2146
- const g300 = 1.0 + emsq * (-6.0 + 6.60937 * emsq);
2147
- const f220 = 0.75 * (1.0 + cosim) * (1.0 + cosim);
2148
- const f311 = 0.9375 * sinim * sinim * (1.0 + 3.0 * cosim) - 0.75 * (1.0 + cosim);
2149
- let f330 = 1.0 + cosim;
2150
- f330 *= 1.875 * f330 * f330;
2151
- del1 = 3.0 * nm * nm * aonv * aonv;
2152
- del2 = 2.0 * del1 * f220 * g200 * q22;
2153
- del3 = 3.0 * del1 * f330 * g300 * q33 * aonv;
2154
- del1 = del1 * f311 * g310 * q31 * aonv;
2155
- xlamo = (mo + nodeo + argpo - theta) % TAU;
2156
- xfact = mdot + xPIdot + dmdt + domdt + dnodt - (no + rptim);
2157
- }
2158
- // ------------ for sgp4, initialize the integrator ----------
2159
- xli = xlamo;
2160
- xni = no;
2161
- atime = 0.0;
2162
- nm = no + dndt;
2163
- }
2164
- return {
2165
- em,
2166
- argpm,
2167
- inclm,
2168
- mm,
2169
- nm,
2170
- nodem,
2171
- irez,
2172
- atime,
2173
- d2201,
2174
- d2211,
2175
- d3210,
2176
- d3222,
2177
- d4410,
2178
- d4422,
2179
- d5220,
2180
- d5232,
2181
- d5421,
2182
- d5433,
2183
- dedt,
2184
- didt,
2185
- dmdt,
2186
- dndt,
2187
- dnodt,
2188
- domdt,
2189
- del1,
2190
- del2,
2191
- del3,
2192
- xfact,
2193
- xlamo,
2194
- xli,
2195
- xni,
2196
- };
2197
- }
2198
- /*
2199
- *-----------------------------------------------------------------------------
2200
- *
2201
- * procedure dspace
2202
- *
2203
- * this procedure provides deep space contributions to mean elements for
2204
- * perturbing third body. these effects have been averaged over one
2205
- * revolution of the sun and moon. for earth resonance effects, the
2206
- * effects have been averaged over no revolutions of the satellite.
2207
- * (mean motion)
2208
- *
2209
- * author : david vallado 719-573-2600 28 jun 2005
2210
- *
2211
- * inputs :
2212
- * d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433 -
2213
- * dedt -
2214
- * del1, del2, del3 -
2215
- * didt -
2216
- * dmdt -
2217
- * dnodt -
2218
- * domdt -
2219
- * irez - flag for resonance 0-none, 1-one day, 2-half day
2220
- * argpo - argument of perigee
2221
- * argpdot - argument of perigee dot (rate)
2222
- * t - time
2223
- * tc -
2224
- * gsto - gst
2225
- * xfact -
2226
- * xlamo -
2227
- * no - mean motion
2228
- * atime -
2229
- * em - eccentricity
2230
- * ft -
2231
- * argpm - argument of perigee
2232
- * inclm - inclination
2233
- * xli -
2234
- * mm - mean anomaly
2235
- * xni - mean motion
2236
- * nodem - right ascension of ascending node
2237
- *
2238
- * outputs :
2239
- * atime -
2240
- * em - eccentricity
2241
- * argpm - argument of perigee
2242
- * inclm - inclination
2243
- * xli -
2244
- * mm - mean anomaly
2245
- * xni -
2246
- * nodem - right ascension of ascending node
2247
- * dndt -
2248
- * nm - mean motion
2249
- *
2250
- * locals :
2251
- * delt -
2252
- * ft -
2253
- * theta -
2254
- * x2li -
2255
- * x2omi -
2256
- * xl -
2257
- * xldot -
2258
- * xnddt -
2259
- * xndt -
2260
- * xomi -
2261
- *
2262
- * coupling :
2263
- * none -
2264
- *
2265
- * references :
2266
- * hoots, roehrich, norad spacetrack report #3 1980
2267
- * hoots, norad spacetrack report #6 1986
2268
- * hoots, schumacher and glover 2004
2269
- * vallado, crawford, hujsak, kelso 2006
2270
- *----------------------------------------------------------------------------
2271
- */
2272
- static dspace_(em, argpm, inclm, mm, nodem, nm, satrec) {
2273
- let { atime, xli, xni, } = satrec;
2274
- const { dedt, didt, dmdt, dnodt, domdt, irez, d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433, xfact, xlamo, gsto, argpo, t, no, argpdot, del1, del2, del3, } = satrec;
2275
- // ----------- calculate deep space resonance effects -----------
2276
- let dndt = 0.0;
2277
- const theta = (gsto + t * rptim) % TAU;
2278
- // Apply time-dependent perturbations
2279
- em += dedt * t;
2280
- inclm += didt * t;
2281
- argpm += domdt * t;
2282
- nodem += dnodt * t;
2283
- mm += dmdt * t;
2284
- if (irez !== 0) {
2285
- // Simplified deep space resonance handling
2286
- if (atime === 0.0 || t * atime <= 0.0 || Math.abs(t) < Math.abs(atime)) {
2287
- atime = 0.0;
2288
- xni = no;
2289
- xli = xlamo;
2290
- }
2291
- const delt = t > 0.0 ? stepp : stepn;
2292
- let ft = 0;
2293
- let x2li = 0;
2294
- let x2omi = 0;
2295
- let xldot = 0;
2296
- let xnddt = 0;
2297
- let xndt = 0;
2298
- let xomi = 0;
2299
- let iretn = true; // Added for do loop
2300
- while (iretn) {
2301
- /*
2302
- * ------------------- dot terms calculated -------------
2303
- * ----------- near - synchronous resonance terms -------
2304
- */
2305
- if (irez !== 2) {
2306
- xndt =
2307
- del1 * Math.sin(xli - fasx2) + del2 * Math.sin(2.0 * (xli - fasx4)) + del3 * Math.sin(3.0 * (xli - fasx6));
2308
- xldot = xni + xfact;
2309
- xnddt =
2310
- del1 * Math.cos(xli - fasx2) +
2311
- 2.0 * del2 * Math.cos(2.0 * (xli - fasx4)) +
2312
- 3.0 * del3 * Math.cos(3.0 * (xli - fasx6));
2313
- xnddt *= xldot;
2314
- }
2315
- else {
2316
- // --------- near - half-day resonance terms --------
2317
- xomi = argpo + argpdot * atime;
2318
- x2omi = xomi + xomi;
2319
- x2li = xli + xli;
2320
- xndt =
2321
- d2201 * Math.sin(x2omi + xli - g22) +
2322
- d2211 * Math.sin(xli - g22) +
2323
- d3210 * Math.sin(xomi + xli - g32) +
2324
- d3222 * Math.sin(-xomi + xli - g32) +
2325
- d4410 * Math.sin(x2omi + x2li - g44) +
2326
- d4422 * Math.sin(x2li - g44) +
2327
- d5220 * Math.sin(xomi + xli - g52) +
2328
- d5232 * Math.sin(-xomi + xli - g52) +
2329
- d5421 * Math.sin(xomi + x2li - g54) +
2330
- d5433 * Math.sin(-xomi + x2li - g54);
2331
- xldot = xni + xfact;
2332
- xnddt =
2333
- d2201 * Math.cos(x2omi + xli - g22) +
2334
- d2211 * Math.cos(xli - g22) +
2335
- d3210 * Math.cos(xomi + xli - g32) +
2336
- d3222 * Math.cos(-xomi + xli - g32) +
2337
- d5220 * Math.cos(xomi + xli - g52) +
2338
- d5232 * Math.cos(-xomi + xli - g52) +
2339
- 2.0 *
2340
- (d4410 * Math.cos(x2omi + x2li - g44) +
2341
- d4422 * Math.cos(x2li - g44) +
2342
- d5421 * Math.cos(xomi + x2li - g54) +
2343
- d5433 * Math.cos(-xomi + x2li - g54));
2344
- xnddt *= xldot;
2345
- }
2346
- /*
2347
- * ----------------------- integrator -------------------
2348
- * sgp4fix move end checks to end of routine
2349
- */
2350
- if (Math.abs(t - atime) < stepp) {
2351
- ft = t - atime;
2352
- iretn = false;
2353
- }
2354
- else {
2355
- xli += xldot * delt + xndt * step2;
2356
- xni += xndt * delt + xnddt * step2;
2357
- atime += delt;
2358
- }
2359
- }
2360
- nm = xni + xndt * ft + xnddt * ft * ft * 0.5;
2361
- const xl = xli + xldot * ft + xndt * ft * ft * 0.5;
2362
- if (irez !== 1) {
2363
- mm = xl - 2.0 * nodem + 2.0 * theta;
2364
- dndt = nm - no;
2365
- }
2366
- else {
2367
- mm = xl - nodem - argpm + theta;
2368
- dndt = nm - no;
2369
- }
2370
- nm = no + dndt;
2371
- }
2372
- return [em, argpm, inclm, mm, nodem, nm];
2373
- }
2374
- /*
2375
- * -----------------------------------------------------------------------------
2376
- *
2377
- * function getgravconst
2378
- *
2379
- * this function gets constants for the propagator. note that mu is identified to
2380
- * facilitiate comparisons with newer models. the common useage is wgs72.
2381
- *
2382
- * author : david vallado 719-573-2600 21 jul 2006
2383
- *
2384
- * inputs :
2385
- * whichconst - which set of constants to use wgs72old, wgs72, wgs84
2386
- *
2387
- * outputs :
2388
- * tumin - minutes in one time unit
2389
- * mu - earth gravitational parameter
2390
- * radiusearthkm - radius of the earth in km
2391
- * xke - reciprocal of tumin
2392
- * j2, j3, j4 - un-normalized zonal harmonic values
2393
- * j3oj2 - j3 divided by j2
2394
- *
2395
- * locals :
2396
- *
2397
- * coupling :
2398
- * none
2399
- *
2400
- * references :
2401
- * norad spacetrack report #3
2402
- * vallado, crawford, hujsak, kelso 2006
2403
- * ---------------------------------------------------------------------------
2404
- */
2405
- static getgravconst_(whichconst) {
2406
- let j2, j3, j3oj2, j4, mus, radiusearthkm, tumin, xke;
2407
- switch (whichconst) {
2408
- // -- wgs-72 low precision str#3 constants --
2409
- case 'wgs72old':
2410
- mus = 398600.79964; // In km3 / s2
2411
- radiusearthkm = 6378.135; // Km
2412
- xke = 0.0743669161; // Reciprocal of tumin
2413
- tumin = 1.0 / xke;
2414
- j2 = 0.001082616;
2415
- j3 = -0.00000253881;
2416
- j4 = -0.00000165597;
2417
- j3oj2 = j3 / j2;
2418
- break;
2419
- // ------------ wgs-72 constants ------------
2420
- case 'wgs72':
2421
- mus = 398600.8; // In km3 / s2
2422
- radiusearthkm = 6378.135; // Km
2423
- xke = 60.0 / Math.sqrt((radiusearthkm * radiusearthkm * radiusearthkm) / mus);
2424
- tumin = 1.0 / xke;
2425
- j2 = 0.001082616;
2426
- j3 = -0.00000253881;
2427
- j4 = -0.00000165597;
2428
- j3oj2 = j3 / j2;
2429
- break;
2430
- case 'wgs84':
2431
- // ------------ wgs-84 constants ------------
2432
- mus = 398600.5; // In km3 / s2
2433
- radiusearthkm = 6378.137; // Km
2434
- xke = 60.0 / Math.sqrt((radiusearthkm * radiusearthkm * radiusearthkm) / mus);
2435
- tumin = 1.0 / xke;
2436
- j2 = 0.00108262998905;
2437
- j3 = -0.00000253215306;
2438
- j4 = -0.00000161098761;
2439
- j3oj2 = j3 / j2;
2440
- break;
2441
- default:
2442
- throw new Error(`unknown gravity option ${whichconst}`);
2443
- }
2444
- return {
2445
- tumin,
2446
- mus,
2447
- radiusearthkm,
2448
- xke,
2449
- j2,
2450
- j3,
2451
- j4,
2452
- j3oj2,
2453
- };
2454
- }
2455
- /*
2456
- *-----------------------------------------------------------------------------
2457
- *
2458
- * procedure initl
2459
- *
2460
- * this procedure initializes the sgp4 propagator. all the initialization is
2461
- * consolidated here instead of having multiple loops inside other routines.
2462
- *
2463
- * author : david vallado 719-573-2600 28 jun 2005
2464
- *
2465
- * inputs :
2466
- * satn - satellite number - not needed, placed in satrec
2467
- * xke - reciprocal of tumin
2468
- * j2 - j2 zonal harmonic
2469
- * ecco - eccentricity 0.0 - 1.0
2470
- * epoch - epoch time in days from jan 0, 1950. 0 hr
2471
- * inclo - inclination of satellite
2472
- * no - mean motion of satellite
2473
- *
2474
- * outputs :
2475
- * ainv - 1.0 / a
2476
- * ao - semi major axis
2477
- * con41 -
2478
- * con42 - 1.0 - 5.0 cos(i)
2479
- * cosio - cosine of inclination
2480
- * cosio2 - cosio squared
2481
- * eccsq - eccentricity squared
2482
- * method - flag for deep space 'd', 'n'
2483
- * omeosq - 1.0 - ecco * ecco
2484
- * posq - semi-parameter squared
2485
- * rp - radius of perigee
2486
- * rteosq - square root of (1.0 - ecco*ecco)
2487
- * sinio - sine of inclination
2488
- * gsto - gst at time of observation rad
2489
- * no - mean motion of satellite
2490
- *
2491
- * locals :
2492
- * ak -
2493
- * d1 -
2494
- * del -
2495
- * adel -
2496
- * po -
2497
- *
2498
- * coupling :
2499
- * getgravconst- no longer used
2500
- * gstime - find greenwich sidereal time from the julian date
2501
- *
2502
- * references :
2503
- * hoots, roehrich, norad spacetrack report #3 1980
2504
- * hoots, norad spacetrack report #6 1986
2505
- * hoots, schumacher and glover 2004
2506
- * vallado, crawford, hujsak, kelso 2006
2507
- *----------------------------------------------------------------------------
2508
- */
2509
- static initl_(satrec, epoch) {
2510
- /*
2511
- * Sgp4fix satn not needed. include in satrec in case needed later
2512
- * int satn,
2513
- * sgp4fix just pass in xke and j2
2514
- * gravconsttype whichconst,
2515
- */
2516
- const { operationmode, ecco, inclo, xke, j2 } = satrec;
2517
- let { no } = satrec;
2518
- /* --------------------- local variables ------------------------ */
2519
- const x2o3 = 2.0 / 3.0;
2520
- // Sgp4fix use old way of finding gst
2521
- /** Ootk -- Some variables imported from outside the class at the top */
2522
- /*
2523
- * ----------------------- earth constants ---------------------
2524
- * sgp4fix identify constants and allow alternate values
2525
- * only xke and j2 are used here so pass them in directly
2526
- * getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 )
2527
- */
2528
- // ------------- calculate auxillary epoch quantities ----------
2529
- const eccsq = ecco * ecco;
2530
- const omeosq = 1.0 - eccsq;
2531
- const rteosq = Math.sqrt(omeosq);
2532
- const cosio = Math.cos(inclo);
2533
- const cosio2 = cosio * cosio;
2534
- // ------------------ un-kozai the mean motion -----------------
2535
- const ak = (xke / no) ** x2o3;
2536
- const d1 = (0.75 * j2 * (3.0 * cosio2 - 1.0)) / (rteosq * omeosq);
2537
- let delPrime = d1 / (ak * ak);
2538
- const adel = ak * (1.0 - delPrime * delPrime - delPrime * (1.0 / 3.0 + (134.0 * delPrime * delPrime) / 81.0));
2539
- delPrime = d1 / (adel * adel);
2540
- no /= 1.0 + delPrime;
2541
- const ao = (xke / no) ** x2o3;
2542
- const sinio = Math.sin(inclo);
2543
- const po = ao * omeosq;
2544
- const con42 = 1.0 - 5.0 * cosio2;
2545
- const con41 = -con42 - cosio2 - cosio2;
2546
- const ainv = 1.0 / ao;
2547
- const posq = po * po;
2548
- const rp = ao * (1.0 - ecco);
2549
- // Sgp4fix modern approach to finding sidereal time
2550
- /** Ootk -- Continue allowing AFSPC mode for SGP4 Validation */
2551
- let gsto;
2552
- if (operationmode === Sgp4OpsMode.AFSPC) {
2553
- /*
2554
- * Sgp4fix use old way of finding gst
2555
- * count integer number of days from 0 jan 1970
2556
- */
2557
- const ts70 = epoch - 7305.0;
2558
- const ds70 = Math.floor(ts70 + 1.0e-8);
2559
- const tfrac = ts70 - ds70;
2560
- // Find greenwich location at epoch
2561
- const c1 = 1.72027916940703639e-2;
2562
- const thgr70 = 1.7321343856509374;
2563
- const fk5r = 5.07551419432269442e-15;
2564
- const c1p2p = c1 + TAU;
2565
- gsto = (thgr70 + c1 * ds70 + c1p2p * tfrac + ts70 * ts70 * fk5r) % TAU;
2566
- /* istanbul ignore next | This is no longer possible*/
2567
- if (gsto < 0.0) {
2568
- gsto += TAU;
2569
- }
2570
- }
2571
- else {
2572
- const jdut1 = epoch + 2433281.5;
2573
- const tut1 = (jdut1 - 2451545.0) / 36525.0;
2574
- gsto = -6.2e-6 * tut1 * tut1 * tut1 + 0.093104 * tut1 * tut1 +
2575
- (876600.0 * 3600 + 8640184.812866) * tut1 + 67310.54841; // Sec
2576
- gsto = ((gsto * DEG2RAD) / 240.0) % TAU; // 360/86400 = 1/240, to deg, to rad
2577
- // ------------------------ check quadrants ---------------------
2578
- if (gsto < 0.0) {
2579
- gsto += TAU;
2580
- }
2581
- }
2582
- return {
2583
- no,
2584
- ainv,
2585
- ao,
2586
- con41,
2587
- con42,
2588
- cosio,
2589
- cosio2,
2590
- eccsq,
2591
- omeosq,
2592
- posq,
2593
- rp,
2594
- rteosq,
2595
- sinio,
2596
- gsto,
2597
- };
2598
- }
2599
- /*
2600
- *-----------------------------------------------------------------------------
2601
- *
2602
- * procedure sgp4init
2603
- *
2604
- * this procedure initializes variables for sgp4.
2605
- *
2606
- * author : david vallado 719-573-2600 28 jun 2005
2607
- *
2608
- * inputs :
2609
- * opsmode - mode of operation afspc or improved 'a', 'i'
2610
- * whichconst - which set of constants to use 72, 84
2611
- * satn - satellite number
2612
- * bstar - sgp4 type drag coefficient kg/m2er
2613
- * ecco - eccentricity
2614
- * epoch - epoch time in days from jan 0, 1950. 0 hr
2615
- * argpo - argument of perigee (output if ds)
2616
- * inclo - inclination
2617
- * mo - mean anomaly (output if ds)
2618
- * no - mean motion
2619
- * nodeo - right ascension of ascending node
2620
- *
2621
- * outputs :
2622
- * rec - common values for subsequent calls
2623
- * return code - non-zero on error.
2624
- * 1 - mean elements, ecc >= 1.0 or ecc < -0.001 or a < 0.95 er
2625
- * 2 - mean motion less than 0.0
2626
- * 3 - pert elements, ecc < 0.0 or ecc > 1.0
2627
- * 4 - semi-latus rectum < 0.0
2628
- * 5 - epoch elements are sub-orbital
2629
- * 6 - satellite has decayed
2630
- *
2631
- * locals :
2632
- * cnodm , snodm , cosim , sinim , cosomm , sinomm
2633
- * cc1sq , cc2 , cc3
2634
- * coef , coef1
2635
- * cosio4 -
2636
- * day -
2637
- * dndt -
2638
- * em - eccentricity
2639
- * emsq - eccentricity squared
2640
- * eeta -
2641
- * etasq -
2642
- * gam -
2643
- * argpm - argument of perigee
2644
- * nodem -
2645
- * inclm - inclination
2646
- * mm - mean anomaly
2647
- * nm - mean motion
2648
- * perige - perigee
2649
- * PInvsq -
2650
- * psisq -
2651
- * qzms24 -
2652
- * rtemsq -
2653
- * s1, s2, s3, s4, s5, s6, s7 -
2654
- * sfour -
2655
- * ss1, ss2, ss3, ss4, ss5, ss6, ss7 -
2656
- * sz1, sz2, sz3
2657
- * sz11, sz12, sz13, sz21, sz22, sz23, sz31, sz32, sz33 -
2658
- * tc -
2659
- * temp -
2660
- * temp1, temp2, temp3 -
2661
- * tsi -
2662
- * xPIdot -
2663
- * xhdot1 -
2664
- * z1, z2, z3 -
2665
- * z11, z12, z13, z21, z22, z23, z31, z32, z33 -
2666
- *
2667
- * coupling :
2668
- * getgravconst-
2669
- * initl -
2670
- * dscom -
2671
- * dpper -
2672
- * dsinit -
2673
- * sgp4 -
2674
- *
2675
- * references :
2676
- * hoots, roehrich, norad spacetrack report #3 1980
2677
- * hoots, norad spacetrack report #6 1986
2678
- * hoots, schumacher and glover 2004
2679
- * vallado, crawford, hujsak, kelso 2006
2680
- *----------------------------------------------------------------------------
2681
- */
2682
- static sgp4init_(satrec, options) {
2683
- const { whichconst = Sgp4GravConstants.wgs72, opsmode = Sgp4OpsMode.IMPROVED, satn = satrec.satnum, epoch, xbstar, xecco, xargpo, xinclo, xndot, xnddot, xmo, xno, xnodeo, } = options;
2684
- /* ------------------------ initialization --------------------- */
2685
- /*
2686
- * Sgp4fix divisor for divide by zero check on inclination
2687
- * the old check used 1.0 + Math.cos(PI-1.0e-9), but then compared it to
2688
- * 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency
2689
- */
2690
- // ----------- set all near earth variables to zero ------------
2691
- satrec.isimp = false;
2692
- satrec.method = Sgp4Methods.NEAR_EARTH;
2693
- satrec.aycof = 0.0;
2694
- satrec.con41 = 0.0;
2695
- satrec.cc1 = 0.0;
2696
- satrec.cc4 = 0.0;
2697
- satrec.cc5 = 0.0;
2698
- satrec.d2 = 0.0;
2699
- satrec.d3 = 0.0;
2700
- satrec.d4 = 0.0;
2701
- satrec.delmo = 0.0;
2702
- satrec.eta = 0.0;
2703
- satrec.argpdot = 0.0;
2704
- satrec.omgcof = 0.0;
2705
- satrec.sinmao = 0.0;
2706
- satrec.t = 0.0;
2707
- satrec.t2cof = 0.0;
2708
- satrec.t3cof = 0.0;
2709
- satrec.t4cof = 0.0;
2710
- satrec.t5cof = 0.0;
2711
- satrec.x1mth2 = 0.0;
2712
- satrec.x7thm1 = 0.0;
2713
- satrec.mdot = 0.0;
2714
- satrec.nodedot = 0.0;
2715
- satrec.xlcof = 0.0;
2716
- satrec.xmcof = 0.0;
2717
- satrec.nodecf = 0.0;
2718
- // ----------- set all deep space variables to zero ------------
2719
- satrec.irez = 0;
2720
- satrec.d2201 = 0.0;
2721
- satrec.d2211 = 0.0;
2722
- satrec.d3210 = 0.0;
2723
- satrec.d3222 = 0.0;
2724
- satrec.d4410 = 0.0;
2725
- satrec.d4422 = 0.0;
2726
- satrec.d5220 = 0.0;
2727
- satrec.d5232 = 0.0;
2728
- satrec.d5421 = 0.0;
2729
- satrec.d5433 = 0.0;
2730
- satrec.dedt = 0.0;
2731
- satrec.del1 = 0.0;
2732
- satrec.del2 = 0.0;
2733
- satrec.del3 = 0.0;
2734
- satrec.didt = 0.0;
2735
- satrec.dmdt = 0.0;
2736
- satrec.dnodt = 0.0;
2737
- satrec.domdt = 0.0;
2738
- satrec.e3 = 0.0;
2739
- satrec.ee2 = 0.0;
2740
- satrec.peo = 0.0;
2741
- satrec.pgho = 0.0;
2742
- satrec.pho = 0.0;
2743
- satrec.PInco = 0.0;
2744
- satrec.plo = 0.0;
2745
- satrec.se2 = 0.0;
2746
- satrec.se3 = 0.0;
2747
- satrec.sgh2 = 0.0;
2748
- satrec.sgh3 = 0.0;
2749
- satrec.sgh4 = 0.0;
2750
- satrec.sh2 = 0.0;
2751
- satrec.sh3 = 0.0;
2752
- satrec.si2 = 0.0;
2753
- satrec.si3 = 0.0;
2754
- satrec.sl2 = 0.0;
2755
- satrec.sl3 = 0.0;
2756
- satrec.sl4 = 0.0;
2757
- satrec.gsto = 0.0;
2758
- satrec.xfact = 0.0;
2759
- satrec.xgh2 = 0.0;
2760
- satrec.xgh3 = 0.0;
2761
- satrec.xgh4 = 0.0;
2762
- satrec.xh2 = 0.0;
2763
- satrec.xh3 = 0.0;
2764
- satrec.xi2 = 0.0;
2765
- satrec.xi3 = 0.0;
2766
- satrec.xl2 = 0.0;
2767
- satrec.xl3 = 0.0;
2768
- satrec.xl4 = 0.0;
2769
- satrec.xlamo = 0.0;
2770
- satrec.zmol = 0.0;
2771
- satrec.zmos = 0.0;
2772
- satrec.atime = 0.0;
2773
- satrec.xli = 0.0;
2774
- satrec.xni = 0.0;
2775
- /* ------------------------ earth constants ----------------------- */
2776
- /*
2777
- * Sgp4fix identify constants and allow alternate values
2778
- * this is now the only call for the constants
2779
- */
2780
- const gravResults = Sgp4.getgravconst_(whichconst);
2781
- satrec.tumin = gravResults.tumin;
2782
- satrec.mus = gravResults.mus;
2783
- satrec.radiusearthkm = gravResults.radiusearthkm;
2784
- satrec.xke = gravResults.xke;
2785
- satrec.j2 = gravResults.j2;
2786
- satrec.j3 = gravResults.j3;
2787
- satrec.j4 = gravResults.j4;
2788
- satrec.j3oj2 = gravResults.j3oj2;
2789
- satrec.vkmpersec = (satrec.radiusearthkm * satrec.xke) / 60.0;
2790
- const { j2 } = gravResults;
2791
- const { j4 } = gravResults;
2792
- const { xke } = gravResults;
2793
- const { j3oj2 } = gravResults;
2794
- // -------------------------------------------------------------------------
2795
- satrec.error = Sgp4ErrorCode.NO_ERROR;
2796
- satrec.operationmode = opsmode;
2797
- // New alpha5 or 9-digit number
2798
- /**
2799
- * Ootk -- Using JS code for string manipulation but same effect
2800
- * Ex. A2525 = 102525
2801
- * Ex. Z1234 = 351234
2802
- */
2803
- satrec.satnum = Tle.convertA5to6Digit(satn);
2804
- /*
2805
- * Sgp4fix - note the following variables are also passed directly via satrec.
2806
- * it is possible to streamline the sgp4init call by deleting the "x"
2807
- * variables, but the user would need to set the satrec.* values first. we
2808
- * include the additional assignments in case twoline2rv is not used.
2809
- */
2810
- satrec.bstar = xbstar;
2811
- // Sgp4fix allow additional parameters in the struct
2812
- satrec.ndot = xndot;
2813
- satrec.nddot = xnddot;
2814
- satrec.ecco = xecco;
2815
- satrec.argpo = xargpo;
2816
- satrec.inclo = xinclo;
2817
- satrec.mo = xmo;
2818
- // Sgp4fix rename variables to clarify which mean motion is intended
2819
- satrec.no = xno;
2820
- satrec.nodeo = xnodeo;
2821
- /*
2822
- * Single averaged mean elements
2823
- * satrec.am = satrec.em = satrec.im = satrec.Om = satrec.mm = satrec.nm = 0.0;
2824
- */
2825
- /*
2826
- * ------------------------ earth constants -----------------------
2827
- * sgp4fix identify constants and allow alternate values
2828
- * getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2 );
2829
- */
2830
- const ss = 78.0 / satrec.radiusearthkm + 1.0;
2831
- // Sgp4fix use multiply for speed instead of pow
2832
- const qzms2ttemp = (120.0 - 78.0) / satrec.radiusearthkm;
2833
- const qzms2t = qzms2ttemp * qzms2ttemp * qzms2ttemp * qzms2ttemp;
2834
- satrec.init = true;
2835
- satrec.t = 0.0;
2836
- // Sgp4fix remove satn as it is not needed in initl
2837
- const initlResult = Sgp4.initl_(satrec, epoch);
2838
- const { ao, con42, cosio, cosio2, eccsq, omeosq, posq, rp, rteosq, sinio } = initlResult;
2839
- satrec.no = initlResult.no;
2840
- satrec.con41 = initlResult.con41;
2841
- satrec.gsto = initlResult.gsto;
2842
- satrec.a = (satrec.no * satrec.tumin) ** (-2.0 / 3.0);
2843
- satrec.alta = satrec.a * (1.0 + satrec.ecco) - 1.0;
2844
- satrec.altp = satrec.a * (1.0 - satrec.ecco) - 1.0;
2845
- satrec.error = Sgp4ErrorCode.NO_ERROR;
2846
- /*
2847
- * Sgp4fix remove this check as it is unnecessary
2848
- * the mrt check in sgp4 handles decaying satellite cases even if the starting
2849
- * condition is below the surface of te earth
2850
- * if (rp < 1.0)
2851
- * {
2852
- * printf("// *** satn%d epoch elts sub-orbital ***\n", satn);
2853
- * satrec.error = 5;
2854
- * }
2855
- */
2856
- if (omeosq >= 0.0 || satrec.no >= 0.0) {
2857
- satrec.isimp = false;
2858
- if (rp < 220.0 / satrec.radiusearthkm + 1.0) {
2859
- satrec.isimp = true;
2860
- }
2861
- let sfour = ss;
2862
- let qzms24 = qzms2t;
2863
- const perigee = (rp - 1.0) * satrec.radiusearthkm;
2864
- // - for perigees below 156 km, s and qoms2t are altered -
2865
- if (perigee < 156.0) {
2866
- sfour = perigee - 78.0;
2867
- if (perigee < 98.0) {
2868
- sfour = 20.0;
2869
- }
2870
- // Sgp4fix use multiply for speed instead of pow
2871
- const qzms24temp = (120.0 - sfour) / satrec.radiusearthkm;
2872
- qzms24 = qzms24temp * qzms24temp * qzms24temp * qzms24temp;
2873
- sfour = sfour / satrec.radiusearthkm + 1.0;
2874
- }
2875
- const PInvsq = 1.0 / posq;
2876
- const tsi = 1.0 / (ao - sfour);
2877
- satrec.eta = ao * satrec.ecco * tsi;
2878
- const etasq = satrec.eta * satrec.eta;
2879
- const eeta = satrec.ecco * satrec.eta;
2880
- const psisq = Math.abs(1.0 - etasq);
2881
- const coef = qzms24 * tsi ** 4.0;
2882
- const coef1 = coef / psisq ** 3.5;
2883
- const cc2 = coef1 *
2884
- satrec.no *
2885
- (ao * (1.0 + 1.5 * etasq + eeta * (4.0 + etasq)) +
2886
- ((0.375 * j2 * tsi) / psisq) * satrec.con41 * (8.0 + 3.0 * etasq * (8.0 + etasq)));
2887
- satrec.cc1 = satrec.bstar * cc2;
2888
- let cc3 = 0.0;
2889
- if (satrec.ecco > 1.0e-4) {
2890
- cc3 = (-2.0 * coef * tsi * j3oj2 * satrec.no * sinio) / satrec.ecco;
2891
- }
2892
- satrec.x1mth2 = 1.0 - cosio2;
2893
- satrec.cc4 =
2894
- 2.0 *
2895
- satrec.no *
2896
- coef1 *
2897
- ao *
2898
- omeosq *
2899
- (satrec.eta * (2.0 + 0.5 * etasq) +
2900
- satrec.ecco * (0.5 + 2.0 * etasq) -
2901
- ((j2 * tsi) / (ao * psisq)) *
2902
- (-3.0 * satrec.con41 * (1.0 - 2.0 * eeta + etasq * (1.5 - 0.5 * eeta)) +
2903
- 0.75 * satrec.x1mth2 * (2.0 * etasq - eeta * (1.0 + etasq)) * Math.cos(2.0 * satrec.argpo)));
2904
- satrec.cc5 = 2.0 * coef1 * ao * omeosq * (1.0 + 2.75 * (etasq + eeta) + eeta * etasq);
2905
- const cosio4 = cosio2 * cosio2;
2906
- const temp1 = 1.5 * j2 * PInvsq * satrec.no;
2907
- const temp2 = 0.5 * temp1 * j2 * PInvsq;
2908
- const temp3 = -0.46875 * j4 * PInvsq * PInvsq * satrec.no;
2909
- satrec.mdot =
2910
- satrec.no +
2911
- 0.5 * temp1 * rteosq * satrec.con41 +
2912
- 0.0625 * temp2 * rteosq * (13.0 - 78.0 * cosio2 + 137.0 * cosio4);
2913
- satrec.argpdot =
2914
- -0.5 * temp1 * con42 +
2915
- 0.0625 * temp2 * (7.0 - 114.0 * cosio2 + 395.0 * cosio4) +
2916
- temp3 * (3.0 - 36.0 * cosio2 + 49.0 * cosio4);
2917
- const xhdot1 = -temp1 * cosio;
2918
- satrec.nodedot = xhdot1 + (0.5 * temp2 * (4.0 - 19.0 * cosio2) + 2.0 * temp3 * (3.0 - 7.0 * cosio2)) * cosio;
2919
- const xPIdot = satrec.argpdot + satrec.nodedot;
2920
- satrec.omgcof = satrec.bstar * cc3 * Math.cos(satrec.argpo);
2921
- satrec.xmcof = 0.0;
2922
- if (satrec.ecco > 1.0e-4) {
2923
- satrec.xmcof = (-x2o3 * coef * satrec.bstar) / eeta;
2924
- }
2925
- satrec.nodecf = 3.5 * omeosq * xhdot1 * satrec.cc1;
2926
- satrec.t2cof = 1.5 * satrec.cc1;
2927
- // Sgp4fix for divide by zero with xinco = 180 deg
2928
- if (Math.abs(cosio + 1.0) > 1.5e-12) {
2929
- satrec.xlcof = (-0.25 * j3oj2 * sinio * (3.0 + 5.0 * cosio)) / (1.0 + cosio);
2930
- }
2931
- else {
2932
- satrec.xlcof = (-0.25 * j3oj2 * sinio * (3.0 + 5.0 * cosio)) / temp4;
2933
- }
2934
- satrec.aycof = -0.5 * j3oj2 * sinio;
2935
- // Sgp4fix use multiply for speed instead of pow
2936
- const delmotemp = 1.0 + satrec.eta * Math.cos(satrec.mo);
2937
- satrec.delmo = delmotemp * delmotemp * delmotemp;
2938
- satrec.sinmao = Math.sin(satrec.mo);
2939
- satrec.x7thm1 = 7.0 * cosio2 - 1.0;
2940
- // --------------- deep space initialization -------------
2941
- if (TAU / satrec.no >= 225.0) {
2942
- satrec.method = Sgp4Methods.DEEP_SPACE;
2943
- satrec.isimp = true;
2944
- const tc = 0.0;
2945
- const inclm = satrec.inclo;
2946
- const dscomOptions = {
2947
- epoch,
2948
- ep: satrec.ecco,
2949
- argpp: satrec.argpo,
2950
- tc,
2951
- inclp: satrec.inclo,
2952
- nodep: satrec.nodeo,
2953
- np: satrec.no,
2954
- e3: satrec.e3,
2955
- ee2: satrec.ee2,
2956
- peo: satrec.peo,
2957
- pgho: satrec.pgho,
2958
- pho: satrec.pho,
2959
- PInco: satrec.PInco,
2960
- plo: satrec.plo,
2961
- se2: satrec.se2,
2962
- se3: satrec.se3,
2963
- sgh2: satrec.sgh2,
2964
- sgh3: satrec.sgh3,
2965
- sgh4: satrec.sgh4,
2966
- sh2: satrec.sh2,
2967
- sh3: satrec.sh3,
2968
- si2: satrec.si2,
2969
- si3: satrec.si3,
2970
- sl2: satrec.sl2,
2971
- sl3: satrec.sl3,
2972
- sl4: satrec.sl4,
2973
- xgh2: satrec.xgh2,
2974
- xgh3: satrec.xgh3,
2975
- xgh4: satrec.xgh4,
2976
- xh2: satrec.xh2,
2977
- xh3: satrec.xh3,
2978
- xi2: satrec.xi2,
2979
- xi3: satrec.xi3,
2980
- xl2: satrec.xl2,
2981
- xl3: satrec.xl3,
2982
- xl4: satrec.xl4,
2983
- zmol: satrec.zmol,
2984
- zmos: satrec.zmos,
2985
- };
2986
- const dscomResult = Sgp4.dscom_(dscomOptions);
2987
- satrec.e3 = dscomResult.e3;
2988
- satrec.ee2 = dscomResult.ee2;
2989
- satrec.peo = dscomResult.peo;
2990
- satrec.pgho = dscomResult.pgho;
2991
- satrec.pho = dscomResult.pho;
2992
- satrec.PInco = dscomResult.PInco;
2993
- satrec.plo = dscomResult.plo;
2994
- satrec.se2 = dscomResult.se2;
2995
- satrec.se3 = dscomResult.se3;
2996
- satrec.sgh2 = dscomResult.sgh2;
2997
- satrec.sgh3 = dscomResult.sgh3;
2998
- satrec.sgh4 = dscomResult.sgh4;
2999
- satrec.sh2 = dscomResult.sh2;
3000
- satrec.sh3 = dscomResult.sh3;
3001
- satrec.si2 = dscomResult.si2;
3002
- satrec.si3 = dscomResult.si3;
3003
- satrec.sl2 = dscomResult.sl2;
3004
- satrec.sl3 = dscomResult.sl3;
3005
- satrec.sl4 = dscomResult.sl4;
3006
- const { sinim, cosim, em, emsq, s1, s2, s3, s4, s5, ss1, ss2, ss3, ss4, ss5, sz1, sz3, sz11, sz13, sz21, sz23, sz31, sz33, } = dscomResult;
3007
- satrec.xgh2 = dscomResult.xgh2;
3008
- satrec.xgh3 = dscomResult.xgh3;
3009
- satrec.xgh4 = dscomResult.xgh4;
3010
- satrec.xh2 = dscomResult.xh2;
3011
- satrec.xh3 = dscomResult.xh3;
3012
- satrec.xi2 = dscomResult.xi2;
3013
- satrec.xi3 = dscomResult.xi3;
3014
- satrec.xl2 = dscomResult.xl2;
3015
- satrec.xl3 = dscomResult.xl3;
3016
- satrec.xl4 = dscomResult.xl4;
3017
- satrec.zmol = dscomResult.zmol;
3018
- satrec.zmos = dscomResult.zmos;
3019
- const { nm, z1, z3, z11, z13, z21, z23, z31, z33 } = dscomResult;
3020
- const dpperOptions = {
3021
- inclo: inclm,
3022
- init: satrec.init,
3023
- ep: satrec.ecco,
3024
- inclp: satrec.inclo,
3025
- nodep: satrec.nodeo,
3026
- argpp: satrec.argpo,
3027
- mp: satrec.mo,
3028
- opsmode: satrec.operationmode,
3029
- satrec,
3030
- };
3031
- const dpperResult = Sgp4.dpper_(dpperOptions);
3032
- satrec.ecco = dpperResult.ep;
3033
- satrec.inclo = dpperResult.inclp;
3034
- satrec.nodeo = dpperResult.nodep;
3035
- satrec.argpo = dpperResult.argpp;
3036
- satrec.mo = dpperResult.mp;
3037
- const argpm = 0.0;
3038
- const nodem = 0.0;
3039
- const mm = 0.0;
3040
- const dsinitOptions = {
3041
- xke,
3042
- cosim,
3043
- emsq,
3044
- argpo: satrec.argpo,
3045
- s1,
3046
- s2,
3047
- s3,
3048
- s4,
3049
- s5,
3050
- sinim,
3051
- ss1,
3052
- ss2,
3053
- ss3,
3054
- ss4,
3055
- ss5,
3056
- sz1,
3057
- sz3,
3058
- sz11,
3059
- sz13,
3060
- sz21,
3061
- sz23,
3062
- sz31,
3063
- sz33,
3064
- t: satrec.t,
3065
- tc,
3066
- gsto: satrec.gsto,
3067
- mo: satrec.mo,
3068
- mdot: satrec.mdot,
3069
- no: satrec.no,
3070
- nodeo: satrec.nodeo,
3071
- nodedot: satrec.nodedot,
3072
- xPIdot,
3073
- z1,
3074
- z3,
3075
- z11,
3076
- z13,
3077
- z21,
3078
- z23,
3079
- z31,
3080
- z33,
3081
- ecco: satrec.ecco,
3082
- eccsq,
3083
- em,
3084
- argpm,
3085
- inclm,
3086
- mm,
3087
- nm,
3088
- nodem,
3089
- irez: satrec.irez,
3090
- atime: satrec.atime,
3091
- d2201: satrec.d2201,
3092
- d2211: satrec.d2211,
3093
- d3210: satrec.d3210,
3094
- d3222: satrec.d3222,
3095
- d4410: satrec.d4410,
3096
- d4422: satrec.d4422,
3097
- d5220: satrec.d5220,
3098
- d5232: satrec.d5232,
3099
- d5421: satrec.d5421,
3100
- d5433: satrec.d5433,
3101
- dedt: satrec.dedt,
3102
- didt: satrec.didt,
3103
- dmdt: satrec.dmdt,
3104
- dnodt: satrec.dnodt,
3105
- domdt: satrec.domdt,
3106
- del1: satrec.del1,
3107
- del2: satrec.del2,
3108
- del3: satrec.del3,
3109
- xfact: satrec.xfact,
3110
- xlamo: satrec.xlamo,
3111
- xli: satrec.xli,
3112
- xni: satrec.xni,
3113
- };
3114
- const dsinitResult = Sgp4.dsinit_(dsinitOptions);
3115
- satrec.irez = dsinitResult.irez;
3116
- satrec.atime = dsinitResult.atime;
3117
- satrec.d2201 = dsinitResult.d2201;
3118
- satrec.d2211 = dsinitResult.d2211;
3119
- satrec.d3210 = dsinitResult.d3210;
3120
- satrec.d3222 = dsinitResult.d3222;
3121
- satrec.d4410 = dsinitResult.d4410;
3122
- satrec.d4422 = dsinitResult.d4422;
3123
- satrec.d5220 = dsinitResult.d5220;
3124
- satrec.d5232 = dsinitResult.d5232;
3125
- satrec.d5421 = dsinitResult.d5421;
3126
- satrec.d5433 = dsinitResult.d5433;
3127
- satrec.dedt = dsinitResult.dedt;
3128
- satrec.didt = dsinitResult.didt;
3129
- satrec.dmdt = dsinitResult.dmdt;
3130
- satrec.dnodt = dsinitResult.dnodt;
3131
- satrec.domdt = dsinitResult.domdt;
3132
- satrec.del1 = dsinitResult.del1;
3133
- satrec.del2 = dsinitResult.del2;
3134
- satrec.del3 = dsinitResult.del3;
3135
- satrec.xfact = dsinitResult.xfact;
3136
- satrec.xlamo = dsinitResult.xlamo;
3137
- satrec.xli = dsinitResult.xli;
3138
- satrec.xni = dsinitResult.xni;
3139
- }
3140
- // ----------- set variables if not deep space -----------
3141
- if (!satrec.isimp) {
3142
- const cc1sq = satrec.cc1 * satrec.cc1;
3143
- satrec.d2 = 4.0 * ao * tsi * cc1sq;
3144
- const temp = (satrec.d2 * tsi * satrec.cc1) / 3.0;
3145
- satrec.d3 = (17.0 * ao + sfour) * temp;
3146
- satrec.d4 = 0.5 * temp * ao * tsi * (221.0 * ao + 31.0 * sfour) * satrec.cc1;
3147
- satrec.t3cof = satrec.d2 + 2.0 * cc1sq;
3148
- satrec.t4cof = 0.25 * (3.0 * satrec.d3 + satrec.cc1 * (12.0 * satrec.d2 + 10.0 * cc1sq));
3149
- satrec.t5cof =
3150
- 0.2 *
3151
- (3.0 * satrec.d4 +
3152
- 12.0 * satrec.cc1 * satrec.d3 +
3153
- 6.0 * satrec.d2 * satrec.d2 +
3154
- 15.0 * cc1sq * (2.0 * satrec.d2 + cc1sq));
3155
- } // If omeosq = 0 ...
3156
- /* Finally propogate to zero epoch to initialize all others. */
3157
- /*
3158
- * Sgp4fix take out check to let satellites process until they are actually below earth surface
3159
- * if(satrec.error == 0)
3160
- */
3161
- }
3162
- Sgp4.propagate(satrec, 0);
3163
- satrec.init = false;
3164
- /*
3165
- * Sgp4fix return boolean. satrec.error contains any error codes
3166
- * return satrec; -- no reason to return anything in JS
3167
- */
3168
- }
3169
- }
3170
- //# sourceMappingURL=sgp4.js.map