ootk 4.0.0-0 → 4.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/CHANGELOG.md +142 -31
  2. package/{lib → dist}/coordinate/Hill.d.ts +17 -18
  3. package/{lib → dist}/coordinate/Hill.js +44 -36
  4. package/dist/coordinate/Hill.js.map +1 -0
  5. package/{lib → dist}/covariance/CovarianceSample.d.ts +6 -7
  6. package/{lib → dist}/covariance/CovarianceSample.js +29 -28
  7. package/dist/covariance/CovarianceSample.js.map +1 -0
  8. package/{lib → dist}/covariance/StateCovariance.d.ts +4 -3
  9. package/{lib → dist}/covariance/StateCovariance.js +8 -5
  10. package/dist/covariance/StateCovariance.js.map +1 -0
  11. package/{lib → dist}/force/AtmosphericDrag.d.ts +1 -2
  12. package/{lib → dist}/force/AtmosphericDrag.js +13 -6
  13. package/dist/force/AtmosphericDrag.js.map +1 -0
  14. package/{lib → dist}/force/EarthGravity.d.ts +1 -2
  15. package/{lib → dist}/force/EarthGravity.js +4 -2
  16. package/dist/force/EarthGravity.js.map +1 -0
  17. package/{lib → dist}/force/Force.d.ts +3 -2
  18. package/{lib → dist}/force/Force.js +3 -2
  19. package/dist/force/Force.js.map +1 -0
  20. package/{lib → dist}/force/ForceModel.d.ts +4 -5
  21. package/{lib → dist}/force/ForceModel.js +6 -2
  22. package/dist/force/ForceModel.js.map +1 -0
  23. package/{lib → dist}/force/Gravity.d.ts +1 -4
  24. package/{lib → dist}/force/Gravity.js +3 -4
  25. package/dist/force/Gravity.js.map +1 -0
  26. package/{lib → dist}/force/SolarRadiationPressure.d.ts +1 -2
  27. package/{lib → dist}/force/SolarRadiationPressure.js +6 -4
  28. package/dist/force/SolarRadiationPressure.js.map +1 -0
  29. package/{lib → dist}/force/ThirdBodyGravity.d.ts +1 -2
  30. package/{lib → dist}/force/ThirdBodyGravity.js +4 -3
  31. package/dist/force/ThirdBodyGravity.js.map +1 -0
  32. package/{lib → dist}/force/Thrust.d.ts +10 -11
  33. package/{lib → dist}/force/Thrust.js +8 -3
  34. package/dist/force/Thrust.js.map +1 -0
  35. package/dist/interfaces/RfSensorParams.d.ts +28 -0
  36. package/dist/interfaces/RfSensorParams.js +24 -0
  37. package/dist/interfaces/RfSensorParams.js.map +1 -0
  38. package/dist/interfaces/index.d.ts +1 -0
  39. package/dist/interfaces/index.js +2 -0
  40. package/dist/interfaces/index.js.map +1 -0
  41. package/{lib → dist}/interpolator/ChebyshevCoefficients.d.ts +11 -15
  42. package/{lib → dist}/interpolator/ChebyshevCoefficients.js +19 -15
  43. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
  44. package/{lib → dist}/interpolator/ChebyshevInterpolator.d.ts +1 -2
  45. package/{lib → dist}/interpolator/ChebyshevInterpolator.js +2 -2
  46. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
  47. package/{lib → dist}/interpolator/CubicSpline.d.ts +8 -9
  48. package/{lib → dist}/interpolator/CubicSpline.js +10 -5
  49. package/dist/interpolator/CubicSpline.js.map +1 -0
  50. package/{lib → dist}/interpolator/CubicSplineInterpolator.d.ts +2 -3
  51. package/{lib → dist}/interpolator/CubicSplineInterpolator.js +6 -4
  52. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
  53. package/{lib → dist}/interpolator/FieldInterpolator.d.ts +7 -5
  54. package/{lib → dist}/interpolator/FieldInterpolator.js +6 -3
  55. package/dist/interpolator/FieldInterpolator.js.map +1 -0
  56. package/{lib → dist}/interpolator/Interpolator.d.ts +1 -2
  57. package/{lib → dist}/interpolator/Interpolator.js +1 -2
  58. package/dist/interpolator/Interpolator.js.map +1 -0
  59. package/{lib → dist}/interpolator/LagrangeInterpolator.d.ts +8 -10
  60. package/{lib → dist}/interpolator/LagrangeInterpolator.js +32 -29
  61. package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
  62. package/{lib → dist}/interpolator/StateInterpolator.d.ts +2 -4
  63. package/{lib → dist}/interpolator/StateInterpolator.js +2 -4
  64. package/dist/interpolator/StateInterpolator.js.map +1 -0
  65. package/{lib → dist}/interpolator/VerletBlendInterpolator.d.ts +4 -5
  66. package/{lib → dist}/interpolator/VerletBlendInterpolator.js +16 -13
  67. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
  68. package/{lib/ootk.d.ts → dist/main.d.ts} +4 -2
  69. package/dist/main.js +32 -0
  70. package/dist/main.js.map +1 -0
  71. package/{lib → dist}/maneuver/TwoBurnOrbitTransfer.d.ts +5 -7
  72. package/{lib → dist}/maneuver/TwoBurnOrbitTransfer.js +6 -3
  73. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  74. package/{lib → dist}/maneuver/Waypoint.d.ts +30 -5
  75. package/{lib → dist}/maneuver/Waypoint.js +31 -4
  76. package/dist/maneuver/Waypoint.js.map +1 -0
  77. package/{lib → dist}/objects/DetailedSatellite.d.ts +7 -31
  78. package/{lib → dist}/objects/DetailedSatellite.js +68 -72
  79. package/dist/objects/DetailedSatellite.js.map +1 -0
  80. package/{lib → dist}/objects/DetailedSensor.d.ts +1 -2
  81. package/{lib → dist}/objects/DetailedSensor.js +22 -2
  82. package/dist/objects/DetailedSensor.js.map +1 -0
  83. package/{lib → dist}/objects/LandObject.d.ts +3 -6
  84. package/{lib → dist}/objects/LandObject.js +9 -3
  85. package/dist/objects/LandObject.js.map +1 -0
  86. package/{lib → dist}/objects/Marker.d.ts +1 -2
  87. package/{lib → dist}/objects/Marker.js +1 -2
  88. package/dist/objects/Marker.js.map +1 -0
  89. package/dist/objects/RfSensor.d.ts +41 -0
  90. package/dist/objects/RfSensor.js +67 -0
  91. package/dist/objects/RfSensor.js.map +1 -0
  92. package/{lib → dist}/objects/index.d.ts +1 -1
  93. package/{lib → dist}/objects/index.js +1 -1
  94. package/dist/objects/index.js.map +1 -0
  95. package/{lib → dist}/observation/Observation.d.ts +42 -4
  96. package/{lib → dist}/observation/Observation.js +41 -10
  97. package/dist/observation/Observation.js.map +1 -0
  98. package/{lib → dist}/observation/ObservationOptical.d.ts +7 -6
  99. package/{lib → dist}/observation/ObservationOptical.js +19 -15
  100. package/dist/observation/ObservationOptical.js.map +1 -0
  101. package/{lib → dist}/observation/ObservationRadar.d.ts +7 -4
  102. package/{lib → dist}/observation/ObservationRadar.js +25 -19
  103. package/dist/observation/ObservationRadar.js.map +1 -0
  104. package/{lib → dist}/observation/ObservationUtils.d.ts +1 -2
  105. package/{lib → dist}/observation/ObservationUtils.js +1 -2
  106. package/dist/observation/ObservationUtils.js.map +1 -0
  107. package/{lib → dist}/observation/PropagatorPairs.d.ts +3 -2
  108. package/{lib → dist}/observation/PropagatorPairs.js +7 -4
  109. package/dist/observation/PropagatorPairs.js.map +1 -0
  110. package/{lib → dist}/operations/BoxMuller.d.ts +7 -2
  111. package/{lib → dist}/operations/BoxMuller.js +15 -4
  112. package/dist/operations/BoxMuller.js.map +1 -0
  113. package/dist/operations/EulerAngles.d.ts +105 -0
  114. package/{lib → dist}/operations/EulerAngles.js +72 -22
  115. package/dist/operations/EulerAngles.js.map +1 -0
  116. package/{lib → dist}/operations/Quaternion.d.ts +5 -6
  117. package/{lib → dist}/operations/Quaternion.js +12 -9
  118. package/dist/operations/Quaternion.js.map +1 -0
  119. package/{lib → dist}/operations/RandomGaussianSource.d.ts +1 -2
  120. package/{lib → dist}/operations/RandomGaussianSource.js +3 -3
  121. package/dist/operations/RandomGaussianSource.js.map +1 -0
  122. package/{lib → dist}/optimize/ChebyshevCompressor.d.ts +3 -2
  123. package/{lib → dist}/optimize/ChebyshevCompressor.js +7 -4
  124. package/dist/optimize/ChebyshevCompressor.js.map +1 -0
  125. package/{lib → dist}/optimize/DownhillSimplex.d.ts +16 -2
  126. package/{lib → dist}/optimize/DownhillSimplex.js +16 -2
  127. package/dist/optimize/DownhillSimplex.js.map +1 -0
  128. package/{lib → dist}/optimize/GoldenSection.d.ts +9 -3
  129. package/{lib → dist}/optimize/GoldenSection.js +9 -3
  130. package/dist/optimize/GoldenSection.js.map +1 -0
  131. package/{lib → dist}/optimize/PolynomialRegression.d.ts +14 -2
  132. package/{lib → dist}/optimize/PolynomialRegression.js +19 -2
  133. package/dist/optimize/PolynomialRegression.js.map +1 -0
  134. package/{lib → dist}/optimize/PolynomicalRegressionResult.d.ts +5 -2
  135. package/{lib → dist}/optimize/PolynomicalRegressionResult.js +8 -2
  136. package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
  137. package/{lib → dist}/optimize/SimpleLinearRegression.d.ts +5 -2
  138. package/{lib → dist}/optimize/SimpleLinearRegression.js +12 -7
  139. package/dist/optimize/SimpleLinearRegression.js.map +1 -0
  140. package/{lib → dist}/optimize/SimplexEntry.d.ts +1 -2
  141. package/{lib → dist}/optimize/SimplexEntry.js +5 -2
  142. package/dist/optimize/SimplexEntry.js.map +1 -0
  143. package/{lib → dist}/orbit_determination/BatchLeastSquaresOD.d.ts +14 -3
  144. package/{lib → dist}/orbit_determination/BatchLeastSquaresOD.js +29 -4
  145. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  146. package/{lib → dist}/orbit_determination/BatchLeastSquaresResult.d.ts +4 -2
  147. package/{lib → dist}/orbit_determination/BatchLeastSquaresResult.js +7 -2
  148. package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  149. package/{lib → dist}/orbit_determination/GibbsIOD.d.ts +9 -4
  150. package/{lib → dist}/orbit_determination/GibbsIOD.js +11 -5
  151. package/dist/orbit_determination/GibbsIOD.js.map +1 -0
  152. package/{lib → dist}/orbit_determination/GoodingIOD.d.ts +21 -22
  153. package/{lib → dist}/orbit_determination/GoodingIOD.js +74 -71
  154. package/dist/orbit_determination/GoodingIOD.js.map +1 -0
  155. package/{lib → dist}/orbit_determination/HerrickGibbsIOD.d.ts +4 -4
  156. package/{lib → dist}/orbit_determination/HerrickGibbsIOD.js +3 -2
  157. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  158. package/{lib → dist}/orbit_determination/LambertIOD.d.ts +21 -8
  159. package/{lib → dist}/orbit_determination/LambertIOD.js +20 -6
  160. package/dist/orbit_determination/LambertIOD.js.map +1 -0
  161. package/{lib → dist}/orbit_determination/ModifiedGoodingIOD.d.ts +6 -7
  162. package/{lib → dist}/orbit_determination/ModifiedGoodingIOD.js +12 -11
  163. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  164. package/{lib → dist}/propagator/DormandPrince54Propagator.d.ts +1 -2
  165. package/dist/propagator/DormandPrince54Propagator.js +64 -0
  166. package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
  167. package/{lib → dist}/propagator/KeplerPropagator.d.ts +1 -2
  168. package/{lib → dist}/propagator/KeplerPropagator.js +5 -2
  169. package/{lib → dist}/propagator/KeplerPropagator.js.map +1 -1
  170. package/{lib → dist}/propagator/Propagator.d.ts +5 -6
  171. package/{lib → dist}/propagator/Propagator.js +5 -6
  172. package/dist/propagator/Propagator.js.map +1 -0
  173. package/{lib → dist}/propagator/RkCheckpoint.d.ts +1 -2
  174. package/{lib → dist}/propagator/RkCheckpoint.js +3 -2
  175. package/dist/propagator/RkCheckpoint.js.map +1 -0
  176. package/{lib → dist}/propagator/RkResult.d.ts +1 -2
  177. package/{lib → dist}/propagator/RkResult.js +4 -2
  178. package/dist/propagator/RkResult.js.map +1 -0
  179. package/{lib → dist}/propagator/RungeKutta4Propagator.d.ts +14 -10
  180. package/{lib → dist}/propagator/RungeKutta4Propagator.js +45 -36
  181. package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
  182. package/{lib → dist}/propagator/RungeKutta89Propagator.d.ts +1 -2
  183. package/dist/propagator/RungeKutta89Propagator.js +126 -0
  184. package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
  185. package/{lib → dist}/propagator/RungeKuttaAdaptive.d.ts +13 -11
  186. package/{lib → dist}/propagator/RungeKuttaAdaptive.js +31 -24
  187. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
  188. package/{lib → dist}/propagator/Sgp4Propagator.d.ts +3 -4
  189. package/{lib → dist}/propagator/Sgp4Propagator.js +4 -3
  190. package/dist/propagator/Sgp4Propagator.js.map +1 -0
  191. package/{lib → dist}/smoothing/ExponentialSmoothing.d.ts +1 -2
  192. package/{lib → dist}/smoothing/ExponentialSmoothing.js +1 -2
  193. package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
  194. package/dist/transforms/index.d.ts +1 -0
  195. package/dist/transforms/index.js +2 -0
  196. package/dist/transforms/index.js.map +1 -0
  197. package/dist/transforms/transforms.d.ts +58 -0
  198. package/dist/transforms/transforms.js +94 -0
  199. package/dist/transforms/transforms.js.map +1 -0
  200. package/{lib → dist}/types/types.d.ts +44 -4
  201. package/{lib → dist}/types/types.js +1 -2
  202. package/dist/types/types.js.map +1 -0
  203. package/dist/utils/functions.d.ts +8 -0
  204. package/dist/utils/functions.js +18 -0
  205. package/dist/utils/functions.js.map +1 -0
  206. package/dist/utils/index.d.ts +2 -0
  207. package/dist/utils/index.js +3 -0
  208. package/dist/utils/index.js.map +1 -0
  209. package/dist/utils/jacobian.d.ts +11 -0
  210. package/dist/utils/jacobian.js +29 -0
  211. package/dist/utils/jacobian.js.map +1 -0
  212. package/package.json +32 -42
  213. package/src/coordinate/Hill.ts +326 -0
  214. package/src/coordinate/index.ts +1 -0
  215. package/src/covariance/CovarianceSample.ts +194 -0
  216. package/src/covariance/StateCovariance.ts +69 -0
  217. package/src/force/AtmosphericDrag.ts +101 -0
  218. package/src/force/EarthGravity.ts +157 -0
  219. package/src/force/Force.ts +33 -0
  220. package/src/force/ForceModel.ts +91 -0
  221. package/src/force/Gravity.ts +53 -0
  222. package/src/force/SolarRadiationPressure.ts +42 -0
  223. package/src/force/ThirdBodyGravity.ts +62 -0
  224. package/src/force/Thrust.ts +83 -0
  225. package/src/interfaces/RfSensorParams.ts +30 -0
  226. package/src/interfaces/index.ts +1 -0
  227. package/src/interpolator/ChebyshevCoefficients.ts +109 -0
  228. package/src/interpolator/ChebyshevInterpolator.ts +87 -0
  229. package/src/interpolator/CubicSpline.ts +72 -0
  230. package/src/interpolator/CubicSplineInterpolator.ts +90 -0
  231. package/src/interpolator/FieldInterpolator.ts +37 -0
  232. package/src/interpolator/Interpolator.ts +56 -0
  233. package/src/interpolator/LagrangeInterpolator.ts +192 -0
  234. package/src/interpolator/StateInterpolator.ts +39 -0
  235. package/src/interpolator/VerletBlendInterpolator.ts +146 -0
  236. package/{lib/ootk.js → src/main.ts} +7 -3
  237. package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
  238. package/src/maneuver/Waypoint.ts +267 -0
  239. package/src/objects/DetailedSatellite.ts +159 -0
  240. package/src/objects/DetailedSensor.ts +68 -0
  241. package/src/objects/LandObject.ts +46 -0
  242. package/src/objects/Marker.ts +25 -0
  243. package/src/objects/RfSensor.ts +78 -0
  244. package/src/objects/index.ts +5 -0
  245. package/src/observation/Observation.ts +125 -0
  246. package/src/observation/ObservationOptical.ts +146 -0
  247. package/src/observation/ObservationRadar.ts +131 -0
  248. package/src/observation/ObservationUtils.ts +40 -0
  249. package/src/observation/PropagatorPairs.ts +45 -0
  250. package/src/operations/BoxMuller.ts +87 -0
  251. package/src/operations/EulerAngles.ts +183 -0
  252. package/src/operations/Quaternion.ts +222 -0
  253. package/src/operations/RandomGaussianSource.ts +51 -0
  254. package/src/operations/index.ts +4 -0
  255. package/src/optimize/ChebyshevCompressor.ts +96 -0
  256. package/src/optimize/DownhillSimplex.ts +212 -0
  257. package/src/optimize/GoldenSection.ts +71 -0
  258. package/src/optimize/PolynomialRegression.ts +109 -0
  259. package/src/optimize/PolynomicalRegressionResult.ts +32 -0
  260. package/src/optimize/SimpleLinearRegression.ts +127 -0
  261. package/src/optimize/SimplexEntry.ts +50 -0
  262. package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
  263. package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
  264. package/src/orbit_determination/GibbsIOD.ts +95 -0
  265. package/src/orbit_determination/GoodingIOD.ts +380 -0
  266. package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
  267. package/src/orbit_determination/LambertIOD.ts +260 -0
  268. package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
  269. package/src/propagator/DormandPrince54Propagator.ts +73 -0
  270. package/src/propagator/KeplerPropagator.ts +102 -0
  271. package/src/propagator/Propagator.ts +253 -0
  272. package/src/propagator/RkCheckpoint.ts +25 -0
  273. package/src/propagator/RkResult.ts +26 -0
  274. package/src/propagator/RungeKutta4Propagator.ts +179 -0
  275. package/src/propagator/RungeKutta89Propagator.ts +132 -0
  276. package/src/propagator/RungeKuttaAdaptive.ts +232 -0
  277. package/src/propagator/Sgp4Propagator.ts +71 -0
  278. package/src/smoothing/ExponentialSmoothing.ts +90 -0
  279. package/src/transforms/index.ts +1 -0
  280. package/src/transforms/transforms.ts +117 -0
  281. package/src/types/types.ts +135 -0
  282. package/src/utils/functions.ts +21 -0
  283. package/src/utils/index.ts +2 -0
  284. package/src/utils/jacobian.ts +38 -0
  285. package/.eslintrc.json +0 -244
  286. package/jest.config.ts +0 -30
  287. package/lib/coordinate/Hill.js.map +0 -1
  288. package/lib/covariance/CovarianceSample.js.map +0 -1
  289. package/lib/covariance/StateCovariance.js.map +0 -1
  290. package/lib/force/AtmosphericDrag.js.map +0 -1
  291. package/lib/force/EarthGravity.js.map +0 -1
  292. package/lib/force/Force.js.map +0 -1
  293. package/lib/force/ForceModel.js.map +0 -1
  294. package/lib/force/Gravity.js.map +0 -1
  295. package/lib/force/SolarRadiationPressure.js.map +0 -1
  296. package/lib/force/ThirdBodyGravity.js.map +0 -1
  297. package/lib/force/Thrust.js.map +0 -1
  298. package/lib/interpolator/ChebyshevCoefficients.js.map +0 -1
  299. package/lib/interpolator/ChebyshevInterpolator.js.map +0 -1
  300. package/lib/interpolator/CubicSpline.js.map +0 -1
  301. package/lib/interpolator/CubicSplineInterpolator.js.map +0 -1
  302. package/lib/interpolator/FieldInterpolator.js.map +0 -1
  303. package/lib/interpolator/Interpolator.js.map +0 -1
  304. package/lib/interpolator/LagrangeInterpolator.js.map +0 -1
  305. package/lib/interpolator/StateInterpolator.js.map +0 -1
  306. package/lib/interpolator/VerletBlendInterpolator.js.map +0 -1
  307. package/lib/maneuver/TwoBurnOrbitTransfer.js.map +0 -1
  308. package/lib/maneuver/Waypoint.js.map +0 -1
  309. package/lib/objects/DetailedSatellite.js.map +0 -1
  310. package/lib/objects/DetailedSensor.js.map +0 -1
  311. package/lib/objects/LandObject.js.map +0 -1
  312. package/lib/objects/Marker.js.map +0 -1
  313. package/lib/objects/index.js.map +0 -1
  314. package/lib/observation/Observation.js.map +0 -1
  315. package/lib/observation/ObservationOptical.js.map +0 -1
  316. package/lib/observation/ObservationRadar.js.map +0 -1
  317. package/lib/observation/ObservationUtils.js.map +0 -1
  318. package/lib/observation/PropagatorPairs.js.map +0 -1
  319. package/lib/ootk.js.map +0 -1
  320. package/lib/operations/BoxMuller.js.map +0 -1
  321. package/lib/operations/EulerAngles.d.ts +0 -50
  322. package/lib/operations/EulerAngles.js.map +0 -1
  323. package/lib/operations/Quaternion.js.map +0 -1
  324. package/lib/operations/RandomGaussianSource.js.map +0 -1
  325. package/lib/optimize/ChebyshevCompressor.js.map +0 -1
  326. package/lib/optimize/DownhillSimplex.js.map +0 -1
  327. package/lib/optimize/GoldenSection.js.map +0 -1
  328. package/lib/optimize/PolynomialRegression.js.map +0 -1
  329. package/lib/optimize/PolynomicalRegressionResult.js.map +0 -1
  330. package/lib/optimize/SimpleLinearRegression.js.map +0 -1
  331. package/lib/optimize/SimplexEntry.js.map +0 -1
  332. package/lib/orbit_determination/BatchLeastSquaresOD.js.map +0 -1
  333. package/lib/orbit_determination/BatchLeastSquaresResult.js.map +0 -1
  334. package/lib/orbit_determination/GibbsIOD.js.map +0 -1
  335. package/lib/orbit_determination/GoodingIOD.js.map +0 -1
  336. package/lib/orbit_determination/HerrickGibbsIOD.js.map +0 -1
  337. package/lib/orbit_determination/LambertIOD.js.map +0 -1
  338. package/lib/orbit_determination/ModifiedGoodingIOD.js.map +0 -1
  339. package/lib/propagator/DormandPrince54Propagator.js +0 -68
  340. package/lib/propagator/DormandPrince54Propagator.js.map +0 -1
  341. package/lib/propagator/Propagator.js.map +0 -1
  342. package/lib/propagator/RkCheckpoint.js.map +0 -1
  343. package/lib/propagator/RkResult.js.map +0 -1
  344. package/lib/propagator/RungeKutta4Propagator.js.map +0 -1
  345. package/lib/propagator/RungeKutta89Propagator.js +0 -130
  346. package/lib/propagator/RungeKutta89Propagator.js.map +0 -1
  347. package/lib/propagator/RungeKuttaAdaptive.js.map +0 -1
  348. package/lib/propagator/Sgp4Propagator.js.map +0 -1
  349. package/lib/smoothing/ExponentialSmoothing.js.map +0 -1
  350. package/lib/types/types.js.map +0 -1
  351. /package/{lib → dist}/coordinate/index.d.ts +0 -0
  352. /package/{lib → dist}/coordinate/index.js +0 -0
  353. /package/{lib → dist}/coordinate/index.js.map +0 -0
  354. /package/{lib → dist}/operations/index.d.ts +0 -0
  355. /package/{lib → dist}/operations/index.js +0 -0
  356. /package/{lib → dist}/operations/index.js.map +0 -0
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -15,11 +14,16 @@
15
14
  * You should have received a copy of the GNU Affero General Public License along with
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
- // / Base class for observation types.
17
+ /* eslint-disable @typescript-eslint/no-unused-vars */
18
+ /**
19
+ * Observation data.
20
+ */
19
21
  export class Observation {
20
22
  /**
21
23
  * Return range-normalized cross line-of-sight residual for the observation
22
24
  * when compared against a nominal state propagator.
25
+ * @param propagator Propagator to compare against.
26
+ * @throws Not implemented.
23
27
  */
24
28
  clos(propagator) {
25
29
  throw new Error('Not implemented');
@@ -27,42 +31,69 @@ export class Observation {
27
31
  /**
28
32
  * Return relative state residual for the observation when compared against
29
33
  * a nominal state propagator.
34
+ * @param propagator Propagator to compare against.
35
+ * @throws Not implemented.
30
36
  */
31
37
  ricDiff(propagator) {
32
38
  throw new Error('Not implemented');
33
39
  }
34
- // / Convert this observation to vector form.
40
+ /**
41
+ * Convert this observation to vector form.
42
+ * @throws Not implemented.
43
+ */
35
44
  toVector() {
36
45
  throw new Error('Not implemented');
37
46
  }
38
- // / Compute the state derivative matrix for this observation.
47
+ /**
48
+ * Compute the state derivative matrix for this observation.
49
+ * @param propPairs Propagator pairs to compare against.
50
+ * @throws Not implemented.
51
+ */
39
52
  jacobian(propPairs) {
40
53
  throw new Error('Not implemented');
41
54
  }
42
- // / Compute the state residual matrix for this observation.
55
+ /**
56
+ * Compute the state residual matrix for this observation.
57
+ * @param propagator Propagator to compare against.
58
+ * @throws Not implemented.
59
+ */
43
60
  residual(propagator) {
44
61
  throw new Error('Not implemented');
45
62
  }
46
- // / Convert this observation's noise matrix into a covariance matrix.
63
+ /**
64
+ * Convert this observation's noise matrix into a covariance matrix.
65
+ * @returns A matrix representing the noise covariance.
66
+ */
47
67
  noiseCovariance() {
48
68
  return this.noise.reciprocal();
49
69
  }
50
- _noiseSample(sigma) {
70
+ /**
71
+ * Generates a noise sample from the noise covariance matrix.
72
+ * @param sigma - The scaling factor for the noise covariance matrix.
73
+ * @returns A matrix representing the noise sample.
74
+ */
75
+ noiseSample_(sigma) {
51
76
  return this.noiseCovariance().scale(sigma).cholesky();
52
77
  }
53
78
  /**
54
79
  * Randomly sample this observation in vector form within the
55
80
  * observation noise.
81
+ * @param random Random number generator.
82
+ * @param sigma Sigma value to scale the noise by.
83
+ * @returns Sampled observation.
56
84
  */
57
85
  sampleVector(random, sigma) {
58
- const chol = this._noiseSample(sigma);
86
+ const chol = this.noiseSample_(sigma);
59
87
  const gauss = random.gaussVector(this.noise.columns);
60
88
  const meas = this.toVector();
61
89
  return meas.add(chol.multiplyVector(gauss));
62
90
  }
63
91
  /**
64
92
  * Randomly sample this observation within the observation noise, scaled to
65
- * the provided [sigma] value.
93
+ * the provided sigma value.
94
+ * @param random Random number generator.
95
+ * @param sigma Sigma value to scale the noise by.
96
+ * @throws Not implemented.
66
97
  */
67
98
  sample(random, sigma = 1.0) {
68
99
  throw new Error('Not implemented');
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observation.js","sourceRoot":"","sources":["../../src/observation/Observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,sDAAsD;AACtD;;GAEG;AACH,MAAM,OAAgB,WAAW;IAU/B;;;;;OAKG;IACH,IAAI,CAAC,UAAsB;QACzB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,UAAsB;QAC5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACH,QAAQ;QACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,SAA0B;QACjC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,UAAsB;QAC7B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,KAAa;QACxB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IACxD,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,MAA4B,EAAE,KAAa;QACtD,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAA4B,EAAE,KAAK,GAAG,GAAG;QAC9C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -15,7 +14,7 @@
15
14
  * You should have received a copy of the GNU Affero General Public License along with
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
- import { EpochUTC, J2000, Matrix, RadecTopocentric, Vector, Vector3D } from 'ootk-core';
17
+ import { EpochUTC, J2000, Matrix, RadecTopocentric, Radians, Vector, Vector3D } from 'ootk-core';
19
18
  import { RandomGaussianSource } from '../operations/RandomGaussianSource';
20
19
  import { Propagator } from '../propagator/Propagator';
21
20
  import { Observation } from './Observation';
@@ -40,8 +39,10 @@ export declare class ObservationOptical extends Observation {
40
39
  jacobian(propPairs: PropagatorPairs): Matrix;
41
40
  residual(propagator: Propagator): Matrix;
42
41
  /**
43
- * Create a noise matrix from right ascension and declination standard
44
- * deviantions _(radians)_.
42
+ * Create a noise matrix from right ascension and declination standard deviantions.
43
+ * @param raSigma Right ascension standard deviation
44
+ * @param decSigma Declination standard deviation
45
+ * @returns Noise matrix
45
46
  */
46
- static noiseFromSigmas(raSigma: number, decSigma: number): Matrix;
47
+ static noiseFromSigmas(raSigma: Radians, decSigma: Radians): Matrix;
47
48
  }
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -15,11 +14,14 @@
15
14
  * You should have received a copy of the GNU Affero General Public License along with
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
- import { array2d, DEG2RAD, J2000, Matrix, RadecTopocentric, RIC, Vector, Vector3D } from 'ootk-core';
17
+ import { array2d, DEG2RAD, J2000, Matrix, RadecTopocentric, RIC, Vector, Vector3D, } from 'ootk-core';
19
18
  import { Observation } from './Observation';
20
19
  import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
21
20
  // / Optical observation data.
22
21
  export class ObservationOptical extends Observation {
22
+ _site;
23
+ observation;
24
+ _noise;
23
25
  // / Create a new [ObservationOptical] object.
24
26
  constructor(_site, observation, _noise = ObservationOptical.defaultNoise) {
25
27
  super();
@@ -35,6 +37,11 @@ export class ObservationOptical extends Observation {
35
37
  get noise() {
36
38
  return this._noise;
37
39
  }
40
+ /**
41
+ * Default noise matrix _(right-ascension, declination)_.
42
+ * Based on the Maui Optical Site noise model.
43
+ */
44
+ static defaultNoise = ObservationOptical.noiseFromSigmas(0.0037 * DEG2RAD, 0.003 * DEG2RAD);
38
45
  get epoch() {
39
46
  return this.observation.epoch;
40
47
  }
@@ -60,8 +67,8 @@ export class ObservationOptical extends Observation {
60
67
  return RIC.fromJ2000(new J2000(this.epoch, r2, Vector3D.origin), r1).position;
61
68
  }
62
69
  sample(random, sigma = 1.0) {
63
- const result = this.sampleVector(random, sigma);
64
- return new ObservationOptical(this.site, new RadecTopocentric(this.epoch, result[0], result[1]), this.noise);
70
+ const resultEl = this.sampleVector(random, sigma).elements;
71
+ return new ObservationOptical(this.site, new RadecTopocentric(this.epoch, resultEl[0], resultEl[1]), this.noise);
65
72
  }
66
73
  jacobian(propPairs) {
67
74
  const result = array2d(2, 6, 0.0);
@@ -70,8 +77,8 @@ export class ObservationOptical extends Observation {
70
77
  const [high, low] = propPairs.get(i);
71
78
  const sl = low.propagate(this.epoch);
72
79
  const sh = high.propagate(this.epoch);
73
- const ol = RadecTopocentric.fromStateVectors(sl, this.site);
74
- const oh = RadecTopocentric.fromStateVectors(sh, this.site);
80
+ const ol = RadecTopocentric.fromStateVector(sl, this.site);
81
+ const oh = RadecTopocentric.fromStateVector(sh, this.site);
75
82
  result[0][i] = observationDerivative(oh.rightAscension, ol.rightAscension, step, true);
76
83
  result[1][i] = observationDerivative(oh.declination, ol.declination, step, true);
77
84
  }
@@ -80,22 +87,19 @@ export class ObservationOptical extends Observation {
80
87
  residual(propagator) {
81
88
  const result = array2d(2, 1, 0.0);
82
89
  const state = propagator.propagate(this.epoch);
83
- const radec = RadecTopocentric.fromStateVectors(state, this.site);
90
+ const radec = RadecTopocentric.fromStateVector(state, this.site);
84
91
  result[0][0] = normalizeAngle(this.observation.rightAscension, radec.rightAscension);
85
92
  result[1][0] = normalizeAngle(this.observation.declination, radec.declination);
86
93
  return new Matrix(result);
87
94
  }
88
95
  /**
89
- * Create a noise matrix from right ascension and declination standard
90
- * deviantions _(radians)_.
96
+ * Create a noise matrix from right ascension and declination standard deviantions.
97
+ * @param raSigma Right ascension standard deviation
98
+ * @param decSigma Declination standard deviation
99
+ * @returns Noise matrix
91
100
  */
92
101
  static noiseFromSigmas(raSigma, decSigma) {
93
102
  return observationNoiseFromSigmas([raSigma, decSigma]);
94
103
  }
95
104
  }
96
- /**
97
- * Default noise matrix _(right-ascension, declination)_.
98
- * Based on the Maui Optical Site noise model.
99
- */
100
- ObservationOptical.defaultNoise = ObservationOptical.noiseFromSigmas(0.0037 * DEG2RAD, 0.003 * DEG2RAD);
101
105
  //# sourceMappingURL=ObservationOptical.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObservationOptical.js","sourceRoot":"","sources":["../../src/observation/ObservationOptical.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EAEP,KAAK,EAEL,MAAM,EACN,gBAAgB,EAEhB,GAAG,EACH,MAAM,EACN,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGvG,8BAA8B;AAC9B,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IAGvC;IACD;IACC;IAJV,8CAA8C;IAC9C,YACU,KAAY,EACb,WAA6B,EAC5B,SAAiB,kBAAkB,CAAC,YAAY;QAExD,KAAK,EAAE,CAAC;QAJA,UAAK,GAAL,KAAK,CAAO;QACb,gBAAW,GAAX,WAAW,CAAkB;QAC5B,WAAM,GAAN,MAAM,CAA0C;IAG1D,CAAC;IAED,4BAA4B;IAC5B,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,kBAAkB;IAClB,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,YAAY,GAAW,kBAAkB,CAAC,eAAe,CAC9D,MAAM,GAAG,OAAkB,EAC3B,KAAK,GAAG,OAAkB,CAC3B,CAAC;IAEF,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,QAAQ;QACN,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,IAA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AG,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SAClF;QAED,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,UAAsB;QAC7B,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;QAClC,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,gBAAgB,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEjE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QACrF,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAE/E,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,OAAgB,EAAE,QAAiB;QACxD,OAAO,0BAA0B,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzD,CAAC"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -15,7 +14,7 @@
15
14
  * You should have received a copy of the GNU Affero General Public License along with
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
- import { EpochUTC, J2000, Matrix, RAE, Vector, Vector3D } from 'ootk-core';
17
+ import { EpochUTC, J2000, Kilometers, Matrix, Radians, RAE, Vector, Vector3D } from 'ootk-core';
19
18
  import { RandomGaussianSource } from '../operations/RandomGaussianSource';
20
19
  import { Propagator } from '../propagator/Propagator';
21
20
  import { Observation } from './Observation';
@@ -38,6 +37,10 @@ export declare class ObservationRadar extends Observation {
38
37
  /**
39
38
  * Create a noise matrix from the range, azimuth, and elevation standard
40
39
  * deviations _(kilometers/radians)_.
40
+ * @param rngSigma - The range standard deviation _(kilometers)_.
41
+ * @param azSigma - The azimuth standard deviation _(radians)_.
42
+ * @param elSigma - The elevation standard deviation _(radians)_.
43
+ * @returns The noise matrix.
41
44
  */
42
- static noiseFromSigmas(rngSigma: number, azSigma: number, elSigma: number): Matrix;
45
+ static noiseFromSigmas(rngSigma: Kilometers, azSigma: Radians, elSigma: Radians): Matrix;
43
46
  }
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -15,11 +14,14 @@
15
14
  * You should have received a copy of the GNU Affero General Public License along with
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
- import { array2d, DEG2RAD, J2000, Matrix, RAE, RIC, Vector, Vector3D } from 'ootk-core';
17
+ import { array2d, DEG2RAD, J2000, Matrix, RAE, RIC, Vector, Vector3D, } from 'ootk-core';
19
18
  import { Observation } from './Observation';
20
19
  import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
21
20
  // / Radar observation data.
22
21
  export class ObservationRadar extends Observation {
22
+ _site;
23
+ observation;
24
+ _noise;
23
25
  // / Create a new [ObservationRadar] object.
24
26
  constructor(_site, observation, _noise = ObservationRadar.defaultNoise) {
25
27
  super();
@@ -27,6 +29,8 @@ export class ObservationRadar extends Observation {
27
29
  this.observation = observation;
28
30
  this._noise = _noise;
29
31
  }
32
+ // / Default noise matrix.
33
+ static defaultNoise = ObservationRadar.noiseFromSigmas(0.32, 0.015 * DEG2RAD, 0.015 * DEG2RAD);
30
34
  get epoch() {
31
35
  return this.observation.epoch;
32
36
  }
@@ -37,20 +41,20 @@ export class ObservationRadar extends Observation {
37
41
  return this._noise;
38
42
  }
39
43
  toVector() {
40
- return Vector.fromList([this.observation.range, this.observation.azimuth, this.observation.elevation]);
44
+ return Vector.fromList([this.observation.rng, this.observation.azRad, this.observation.elRad]);
41
45
  }
42
46
  clos(propagator) {
43
47
  const ri = propagator.propagate(this.epoch).position.subtract(this.site.position);
44
- return Math.abs(this.observation.range - ri.magnitude());
48
+ return Math.abs(this.observation.rng - ri.magnitude());
45
49
  }
46
50
  ricDiff(propagator) {
47
51
  const r0 = propagator.propagate(this.epoch);
48
- const r1 = RAE.fromStateVectors(r0, this.site);
49
- const r2 = this.observation.position(this.site, r1.azimuth, r1.elevation);
52
+ const r1 = RAE.fromStateVector(r0, this.site);
53
+ const r2 = this.observation.position(this.site, r1.azRad, r1.elRad);
50
54
  return RIC.fromJ2000(new J2000(this.epoch, r2, Vector3D.origin), r0).position;
51
55
  }
52
56
  sample(random, sigma = 1.0) {
53
- const result = this.sampleVector(random, sigma);
57
+ const result = this.sampleVector(random, sigma).elements;
54
58
  return new ObservationRadar(this.site, new RAE(this.observation.epoch, result[0], result[1], result[2]), this.noise);
55
59
  }
56
60
  jacobian(propPairs) {
@@ -60,31 +64,33 @@ export class ObservationRadar extends Observation {
60
64
  const [high, low] = propPairs.get(i);
61
65
  const sl = low.propagate(this.epoch);
62
66
  const sh = high.propagate(this.epoch);
63
- const ol = RAE.fromStateVectors(sl, this.site);
64
- const oh = RAE.fromStateVectors(sh, this.site);
65
- result[0][i] = observationDerivative(oh.range, ol.range, step);
66
- result[1][i] = observationDerivative(oh.azimuth, ol.azimuth, step, true);
67
- result[2][i] = observationDerivative(oh.elevation, ol.elevation, step, true);
67
+ const ol = RAE.fromStateVector(sl, this.site);
68
+ const oh = RAE.fromStateVector(sh, this.site);
69
+ result[0][i] = observationDerivative(oh.rng, ol.rng, step);
70
+ result[1][i] = observationDerivative(oh.azRad, ol.azRad, step, true);
71
+ result[2][i] = observationDerivative(oh.elRad, ol.elRad, step, true);
68
72
  }
69
73
  return new Matrix(result);
70
74
  }
71
75
  residual(propagator) {
72
76
  const result = array2d(3, 1, 0.0);
73
77
  const state = propagator.propagate(this.epoch);
74
- const razel = RAE.fromStateVectors(state, this.site);
75
- result[0][0] = this.observation.range - razel.range;
76
- result[1][0] = normalizeAngle(this.observation.azimuth, razel.azimuth);
77
- result[2][0] = normalizeAngle(this.observation.elevation, razel.elevation);
78
+ const razel = RAE.fromStateVector(state, this.site);
79
+ result[0][0] = this.observation.rng - razel.rng;
80
+ result[1][0] = normalizeAngle(this.observation.azRad, razel.azRad);
81
+ result[2][0] = normalizeAngle(this.observation.elRad, razel.elRad);
78
82
  return new Matrix(result);
79
83
  }
80
84
  /**
81
85
  * Create a noise matrix from the range, azimuth, and elevation standard
82
86
  * deviations _(kilometers/radians)_.
87
+ * @param rngSigma - The range standard deviation _(kilometers)_.
88
+ * @param azSigma - The azimuth standard deviation _(radians)_.
89
+ * @param elSigma - The elevation standard deviation _(radians)_.
90
+ * @returns The noise matrix.
83
91
  */
84
92
  static noiseFromSigmas(rngSigma, azSigma, elSigma) {
85
93
  return observationNoiseFromSigmas([rngSigma, azSigma, elSigma]);
86
94
  }
87
95
  }
88
- // / Default noise matrix.
89
- ObservationRadar.defaultNoise = ObservationRadar.noiseFromSigmas(0.32, 0.015 * DEG2RAD, 0.015 * DEG2RAD);
90
96
  //# sourceMappingURL=ObservationRadar.js.map
@@ -0,0 +1 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,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEpD,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QAChD,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACnE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAEnE,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CAAC,QAAoB,EAAE,OAAgB,EAAE,OAAgB;QAC7E,OAAO,0BAA0B,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObservationUtils.js","sourceRoot":"","sources":["../../src/observation/ObservationUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IAC7D,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAU,EAAE,EAAU,EAAE,IAAY,EAAE,OAAO,GAAG,KAAK,EAAU,EAAE,CACrG,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAgB,EAAU,EAAE;IACrE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;IACxB,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEnE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAEpB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KAC5B;IAED,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -26,6 +25,8 @@ export declare class PropagatorPairs {
26
25
  get(index: number): [Propagator, Propagator];
27
26
  /**
28
27
  * Get the step size at the provided index.
28
+ * @param index The index.
29
+ * @returns The step size.
29
30
  */
30
31
  step(index: number): number;
31
32
  }
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -16,13 +15,15 @@
16
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
16
  */
18
17
  export class PropagatorPairs {
18
+ _posStep;
19
+ _velStep;
19
20
  constructor(_posStep, _velStep) {
20
21
  this._posStep = _posStep;
21
22
  this._velStep = _velStep;
22
- this._high = Array(6).fill(null);
23
- this._low = Array(6).fill(null);
24
23
  // Do nothing.
25
24
  }
25
+ _high = Array(6).fill(null);
26
+ _low = Array(6).fill(null);
26
27
  set(index, high, low) {
27
28
  this._high[index] = high;
28
29
  this._low[index] = low;
@@ -32,6 +33,8 @@ export class PropagatorPairs {
32
33
  }
33
34
  /**
34
35
  * Get the step size at the provided index.
36
+ * @param index The index.
37
+ * @returns The step size.
35
38
  */
36
39
  step(index) {
37
40
  return index < 3 ? this._posStep : this._velStep;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropagatorPairs.js","sourceRoot":"","sources":["../../src/observation/PropagatorPairs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,OAAO,eAAe;IACN;IAA0B;IAA9C,YAAoB,QAAgB,EAAU,QAAgB;QAA1C,aAAQ,GAAR,QAAQ,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAQ;QAC5D,cAAc;IAChB,CAAC;IAEO,KAAK,GAA0B,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,GAA0B,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE1D,GAAG,CAAC,KAAa,EAAE,IAAgB,EAAE,GAAe;QAClD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,GAAG,CAAC,KAAa;QACf,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAE,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,KAAa;QAChB,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IACnD,CAAC;CACF"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -25,17 +24,23 @@ export declare class BoxMuller {
25
24
  /**
26
25
  * Create a new [BoxMuller] object with mean [mu], standard deviation
27
26
  * [sigma], and [seed] number.
27
+ * @param mu Mean value.
28
+ * @param sigma Standard deviation.
29
+ * @param seed Random seed.
28
30
  */
29
31
  constructor(mu: number, sigma: number, seed?: number);
30
32
  _generate(): void;
31
33
  /**
32
34
  * Generate a gaussian number, with mean [mu] and standard
33
35
  * deviation [sigma].
36
+ * @returns A gaussian number.
34
37
  */
35
38
  nextGauss(): number;
36
39
  /**
37
40
  * Generate a [Vector] of gaussian numbers, with mean [mu] and standard
38
41
  * deviation [sigma].
42
+ * @param n Number of gaussian numbers to generate.
43
+ * @returns A [Vector] of gaussian numbers.
39
44
  */
40
45
  gaussVector(n: number): Vector;
41
46
  }
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * @author @thkruz Theodore Kruczek
3
- *
4
3
  * @license AGPL-3.0-or-later
5
- * @Copyright (c) 2020-2024 Theodore Kruczek
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
6
5
  *
7
6
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
7
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -18,13 +17,22 @@
18
17
  import { Random, TAU, Vector } from 'ootk-core';
19
18
  // / Box-Muller random Gaussian number generator.
20
19
  export class BoxMuller {
20
+ _index = 0;
21
+ _cache = new Float64Array(2);
22
+ // / Mean value.
23
+ mu;
24
+ // / Standard deviation.
25
+ sigma;
26
+ // / Uniform random number generator.
27
+ rand;
21
28
  /**
22
29
  * Create a new [BoxMuller] object with mean [mu], standard deviation
23
30
  * [sigma], and [seed] number.
31
+ * @param mu Mean value.
32
+ * @param sigma Standard deviation.
33
+ * @param seed Random seed.
24
34
  */
25
35
  constructor(mu, sigma, seed = 0) {
26
- this._index = 0;
27
- this._cache = new Float64Array(2);
28
36
  this.mu = mu;
29
37
  this.sigma = sigma;
30
38
  this.rand = new Random(seed);
@@ -42,6 +50,7 @@ export class BoxMuller {
42
50
  /**
43
51
  * Generate a gaussian number, with mean [mu] and standard
44
52
  * deviation [sigma].
53
+ * @returns A gaussian number.
45
54
  */
46
55
  nextGauss() {
47
56
  if (this._index > 1) {
@@ -54,6 +63,8 @@ export class BoxMuller {
54
63
  /**
55
64
  * Generate a [Vector] of gaussian numbers, with mean [mu] and standard
56
65
  * deviation [sigma].
66
+ * @param n Number of gaussian numbers to generate.
67
+ * @returns A [Vector] of gaussian numbers.
57
68
  */
58
69
  gaussVector(n) {
59
70
  const result = new Float64Array(n);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxMuller.js","sourceRoot":"","sources":["../../src/operations/BoxMuller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEhD,iDAAiD;AACjD,MAAM,OAAO,SAAS;IACZ,MAAM,GAAG,CAAC,CAAC;IACX,MAAM,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IACrC,gBAAgB;IAChB,EAAE,CAAS;IACX,wBAAwB;IACxB,KAAK,CAAS;IACd,qCAAqC;IACrC,IAAI,CAAS;IAEb;;;;;;OAMG;IACH,YAAY,EAAU,EAAE,KAAa,EAAE,IAAI,GAAG,CAAC;QAC7C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,mDAAmD;IACnD,SAAS;QACP,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjC,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,C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