ootk 3.0.0 → 4.0.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/CHANGELOG.md +235 -10
  2. package/README.md +27 -40
  3. package/dist/coordinate/Hill.d.ts +49 -0
  4. package/dist/coordinate/Hill.js +222 -0
  5. package/dist/coordinate/Hill.js.map +1 -0
  6. package/dist/coordinate/index.d.ts +1 -0
  7. package/dist/coordinate/index.js +2 -0
  8. package/dist/coordinate/index.js.map +1 -0
  9. package/dist/covariance/CovarianceSample.d.ts +43 -0
  10. package/dist/covariance/CovarianceSample.js +147 -0
  11. package/dist/covariance/CovarianceSample.js.map +1 -0
  12. package/dist/covariance/StateCovariance.d.ts +42 -0
  13. package/dist/covariance/StateCovariance.js +65 -0
  14. package/dist/covariance/StateCovariance.js.map +1 -0
  15. package/dist/force/AtmosphericDrag.d.ts +31 -0
  16. package/dist/force/AtmosphericDrag.js +73 -0
  17. package/dist/force/AtmosphericDrag.js.map +1 -0
  18. package/dist/force/EarthGravity.d.ts +27 -0
  19. package/dist/force/EarthGravity.js +117 -0
  20. package/dist/force/EarthGravity.js.map +1 -0
  21. package/{lib/ootk.d.ts → dist/force/Force.d.ts} +12 -11
  22. package/dist/force/Force.js +31 -0
  23. package/dist/force/Force.js.map +1 -0
  24. package/dist/force/ForceModel.d.ts +37 -0
  25. package/dist/force/ForceModel.js +75 -0
  26. package/dist/force/ForceModel.js.map +1 -0
  27. package/dist/force/Gravity.d.ts +38 -0
  28. package/dist/force/Gravity.js +47 -0
  29. package/dist/force/Gravity.js.map +1 -0
  30. package/dist/{ootk.d.ts → force/SolarRadiationPressure.d.ts} +12 -11
  31. package/dist/force/SolarRadiationPressure.js +44 -0
  32. package/dist/force/SolarRadiationPressure.js.map +1 -0
  33. package/dist/force/ThirdBodyGravity.d.ts +26 -0
  34. package/dist/force/ThirdBodyGravity.js +57 -0
  35. package/dist/force/ThirdBodyGravity.js.map +1 -0
  36. package/dist/force/Thrust.d.ts +34 -0
  37. package/dist/force/Thrust.js +58 -0
  38. package/dist/force/Thrust.js.map +1 -0
  39. package/dist/interfaces/RfSensorParams.d.ts +28 -0
  40. package/dist/interfaces/RfSensorParams.js +24 -0
  41. package/dist/interfaces/RfSensorParams.js.map +1 -0
  42. package/dist/interfaces/index.d.ts +1 -0
  43. package/dist/interfaces/index.js +2 -0
  44. package/dist/interfaces/index.js.map +1 -0
  45. package/dist/interpolator/ChebyshevCoefficients.d.ts +50 -0
  46. package/dist/interpolator/ChebyshevCoefficients.js +94 -0
  47. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
  48. package/dist/interpolator/ChebyshevInterpolator.d.ts +38 -0
  49. package/dist/interpolator/ChebyshevInterpolator.js +71 -0
  50. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
  51. package/dist/interpolator/CubicSpline.d.ts +35 -0
  52. package/dist/interpolator/CubicSpline.js +69 -0
  53. package/dist/interpolator/CubicSpline.js.map +1 -0
  54. package/dist/interpolator/CubicSplineInterpolator.d.ts +36 -0
  55. package/dist/interpolator/CubicSplineInterpolator.js +80 -0
  56. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
  57. package/dist/interpolator/FieldInterpolator.d.ts +28 -0
  58. package/dist/interpolator/FieldInterpolator.js +34 -0
  59. package/dist/interpolator/FieldInterpolator.js.map +1 -0
  60. package/dist/interpolator/Interpolator.d.ts +22 -0
  61. package/dist/interpolator/Interpolator.js +47 -0
  62. package/dist/interpolator/Interpolator.js.map +1 -0
  63. package/dist/interpolator/LagrangeInterpolator.d.ts +40 -0
  64. package/dist/interpolator/LagrangeInterpolator.js +159 -0
  65. package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
  66. package/dist/interpolator/StateInterpolator.d.ts +27 -0
  67. package/dist/interpolator/StateInterpolator.js +35 -0
  68. package/dist/interpolator/StateInterpolator.js.map +1 -0
  69. package/dist/interpolator/VerletBlendInterpolator.d.ts +43 -0
  70. package/dist/interpolator/VerletBlendInterpolator.js +118 -0
  71. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
  72. package/{lib/ootk.js → dist/main.d.ts} +13 -10
  73. package/dist/{objects/space-object.d.ts → main.js} +17 -23
  74. package/dist/main.js.map +1 -0
  75. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +41 -0
  76. package/dist/maneuver/TwoBurnOrbitTransfer.js +65 -0
  77. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  78. package/dist/maneuver/Waypoint.d.ts +91 -0
  79. package/dist/maneuver/Waypoint.js +179 -0
  80. package/dist/maneuver/Waypoint.js.map +1 -0
  81. package/{lib/objects/detailed-sat.d.ts → dist/objects/DetailedSatellite.d.ts} +40 -36
  82. package/dist/objects/DetailedSatellite.js +136 -0
  83. package/dist/objects/DetailedSatellite.js.map +1 -0
  84. package/dist/objects/DetailedSensor.d.ts +42 -0
  85. package/dist/objects/DetailedSensor.js +65 -0
  86. package/dist/objects/DetailedSensor.js.map +1 -0
  87. package/dist/objects/LandObject.d.ts +33 -0
  88. package/dist/objects/LandObject.js +34 -0
  89. package/dist/objects/LandObject.js.map +1 -0
  90. package/dist/objects/Marker.d.ts +20 -0
  91. package/dist/objects/Marker.js +24 -0
  92. package/dist/objects/Marker.js.map +1 -0
  93. package/dist/objects/RfSensor.d.ts +41 -0
  94. package/dist/objects/RfSensor.js +67 -0
  95. package/dist/objects/RfSensor.js.map +1 -0
  96. package/dist/objects/index.d.ts +5 -4
  97. package/dist/objects/index.js +6 -0
  98. package/dist/objects/index.js.map +1 -0
  99. package/dist/observation/Observation.d.ts +89 -0
  100. package/dist/observation/Observation.js +102 -0
  101. package/dist/observation/Observation.js.map +1 -0
  102. package/dist/observation/ObservationOptical.d.ts +48 -0
  103. package/dist/observation/ObservationOptical.js +105 -0
  104. package/dist/observation/ObservationOptical.js.map +1 -0
  105. package/dist/observation/ObservationRadar.d.ts +46 -0
  106. package/dist/observation/ObservationRadar.js +96 -0
  107. package/dist/observation/ObservationRadar.js.map +1 -0
  108. package/dist/observation/ObservationUtils.d.ts +20 -0
  109. package/dist/observation/ObservationUtils.js +32 -0
  110. package/dist/observation/ObservationUtils.js.map +1 -0
  111. package/dist/observation/PropagatorPairs.d.ts +32 -0
  112. package/dist/observation/PropagatorPairs.js +43 -0
  113. package/dist/observation/PropagatorPairs.js.map +1 -0
  114. package/dist/operations/BoxMuller.d.ts +46 -0
  115. package/dist/operations/BoxMuller.js +77 -0
  116. package/dist/operations/BoxMuller.js.map +1 -0
  117. package/dist/operations/EulerAngles.d.ts +105 -0
  118. package/dist/operations/EulerAngles.js +161 -0
  119. package/dist/operations/EulerAngles.js.map +1 -0
  120. package/dist/operations/Quaternion.d.ts +56 -0
  121. package/dist/operations/Quaternion.js +167 -0
  122. package/dist/operations/Quaternion.js.map +1 -0
  123. package/dist/operations/RandomGaussianSource.d.ts +24 -0
  124. package/dist/operations/RandomGaussianSource.js +43 -0
  125. package/dist/operations/RandomGaussianSource.js.map +1 -0
  126. package/dist/operations/index.d.ts +4 -0
  127. package/dist/operations/index.js +5 -0
  128. package/dist/operations/index.js.map +1 -0
  129. package/dist/optimize/ChebyshevCompressor.d.ts +32 -0
  130. package/dist/optimize/ChebyshevCompressor.js +83 -0
  131. package/dist/optimize/ChebyshevCompressor.js.map +1 -0
  132. package/dist/optimize/DownhillSimplex.d.ts +64 -0
  133. package/dist/optimize/DownhillSimplex.js +182 -0
  134. package/dist/optimize/DownhillSimplex.js.map +1 -0
  135. package/dist/optimize/GoldenSection.d.ts +39 -0
  136. package/dist/optimize/GoldenSection.js +55 -0
  137. package/dist/optimize/GoldenSection.js.map +1 -0
  138. package/dist/optimize/PolynomialRegression.d.ts +49 -0
  139. package/dist/optimize/PolynomialRegression.js +83 -0
  140. package/dist/optimize/PolynomialRegression.js.map +1 -0
  141. package/dist/optimize/PolynomicalRegressionResult.d.ts +31 -0
  142. package/dist/optimize/PolynomicalRegressionResult.js +38 -0
  143. package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
  144. package/dist/optimize/SimpleLinearRegression.d.ts +44 -0
  145. package/dist/optimize/SimpleLinearRegression.js +112 -0
  146. package/dist/optimize/SimpleLinearRegression.js.map +1 -0
  147. package/dist/optimize/SimplexEntry.d.ts +32 -0
  148. package/dist/optimize/SimplexEntry.js +42 -0
  149. package/dist/optimize/SimplexEntry.js.map +1 -0
  150. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +65 -0
  151. package/dist/orbit_determination/BatchLeastSquaresOD.js +143 -0
  152. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  153. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +31 -0
  154. package/{lib/objects/space-object.d.ts → dist/orbit_determination/BatchLeastSquaresResult.js} +21 -23
  155. package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  156. package/dist/orbit_determination/GibbsIOD.d.ts +38 -0
  157. package/dist/orbit_determination/GibbsIOD.js +76 -0
  158. package/dist/orbit_determination/GibbsIOD.js.map +1 -0
  159. package/dist/orbit_determination/GoodingIOD.d.ts +51 -0
  160. package/dist/orbit_determination/GoodingIOD.js +247 -0
  161. package/dist/orbit_determination/GoodingIOD.js.map +1 -0
  162. package/dist/orbit_determination/HerrickGibbsIOD.d.ts +33 -0
  163. package/dist/orbit_determination/HerrickGibbsIOD.js +50 -0
  164. package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  165. package/dist/orbit_determination/LambertIOD.d.ts +59 -0
  166. package/dist/orbit_determination/LambertIOD.js +213 -0
  167. package/dist/orbit_determination/LambertIOD.js.map +1 -0
  168. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +40 -0
  169. package/dist/orbit_determination/ModifiedGoodingIOD.js +83 -0
  170. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  171. package/dist/propagator/DormandPrince54Propagator.d.ts +28 -0
  172. package/dist/propagator/DormandPrince54Propagator.js +64 -0
  173. package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
  174. package/dist/propagator/KeplerPropagator.d.ts +35 -0
  175. package/dist/propagator/KeplerPropagator.js +84 -0
  176. package/dist/propagator/KeplerPropagator.js.map +1 -0
  177. package/dist/propagator/Propagator.d.ts +34 -0
  178. package/dist/propagator/Propagator.js +162 -0
  179. package/dist/propagator/Propagator.js.map +1 -0
  180. package/dist/propagator/RkCheckpoint.d.ts +22 -0
  181. package/dist/propagator/RkCheckpoint.js +27 -0
  182. package/dist/propagator/RkCheckpoint.js.map +1 -0
  183. package/dist/propagator/RkResult.d.ts +23 -0
  184. package/dist/propagator/RkResult.js +30 -0
  185. package/dist/propagator/RkResult.js.map +1 -0
  186. package/dist/propagator/RungeKutta4Propagator.d.ts +50 -0
  187. package/dist/propagator/RungeKutta4Propagator.js +141 -0
  188. package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
  189. package/dist/propagator/RungeKutta89Propagator.d.ts +28 -0
  190. package/dist/propagator/RungeKutta89Propagator.js +126 -0
  191. package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
  192. package/dist/propagator/RungeKuttaAdaptive.d.ts +54 -0
  193. package/dist/propagator/RungeKuttaAdaptive.js +159 -0
  194. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
  195. package/dist/propagator/Sgp4Propagator.d.ts +34 -0
  196. package/dist/propagator/Sgp4Propagator.js +56 -0
  197. package/dist/propagator/Sgp4Propagator.js.map +1 -0
  198. package/dist/smoothing/ExponentialSmoothing.d.ts +23 -0
  199. package/dist/smoothing/ExponentialSmoothing.js +81 -0
  200. package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
  201. package/dist/transforms/index.d.ts +1 -0
  202. package/dist/transforms/index.js +2 -0
  203. package/dist/transforms/index.js.map +1 -0
  204. package/dist/transforms/transforms.d.ts +56 -92
  205. package/dist/transforms/transforms.js +94 -0
  206. package/dist/transforms/transforms.js.map +1 -0
  207. package/dist/types/types.d.ts +105 -584
  208. package/dist/types/types.js +23 -0
  209. package/dist/types/types.js.map +1 -0
  210. package/dist/utils/index.d.ts +1 -0
  211. package/dist/utils/index.js +2 -0
  212. package/dist/utils/index.js.map +1 -0
  213. package/dist/utils/jacobian.d.ts +11 -0
  214. package/dist/utils/jacobian.js +29 -0
  215. package/dist/utils/jacobian.js.map +1 -0
  216. package/package.json +34 -42
  217. package/src/coordinate/Hill.ts +326 -0
  218. package/src/coordinate/index.ts +1 -0
  219. package/src/covariance/CovarianceSample.ts +194 -0
  220. package/src/covariance/StateCovariance.ts +69 -0
  221. package/src/force/AtmosphericDrag.ts +101 -0
  222. package/src/force/EarthGravity.ts +157 -0
  223. package/src/force/Force.ts +33 -0
  224. package/src/force/ForceModel.ts +91 -0
  225. package/src/force/Gravity.ts +53 -0
  226. package/src/force/SolarRadiationPressure.ts +42 -0
  227. package/src/force/ThirdBodyGravity.ts +62 -0
  228. package/src/force/Thrust.ts +83 -0
  229. package/src/interfaces/RfSensorParams.ts +30 -0
  230. package/src/interfaces/index.ts +1 -0
  231. package/src/interpolator/ChebyshevCoefficients.ts +109 -0
  232. package/src/interpolator/ChebyshevInterpolator.ts +87 -0
  233. package/src/interpolator/CubicSpline.ts +72 -0
  234. package/src/interpolator/CubicSplineInterpolator.ts +90 -0
  235. package/src/interpolator/FieldInterpolator.ts +37 -0
  236. package/src/interpolator/Interpolator.ts +56 -0
  237. package/src/interpolator/LagrangeInterpolator.ts +192 -0
  238. package/src/interpolator/StateInterpolator.ts +39 -0
  239. package/src/interpolator/VerletBlendInterpolator.ts +146 -0
  240. package/src/main.ts +32 -0
  241. package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
  242. package/src/maneuver/Waypoint.ts +267 -0
  243. package/src/objects/DetailedSatellite.ts +159 -0
  244. package/src/objects/DetailedSensor.ts +68 -0
  245. package/src/objects/LandObject.ts +46 -0
  246. package/src/objects/Marker.ts +25 -0
  247. package/src/objects/RfSensor.ts +78 -0
  248. package/src/objects/index.ts +5 -0
  249. package/src/observation/Observation.ts +125 -0
  250. package/src/observation/ObservationOptical.ts +146 -0
  251. package/src/observation/ObservationRadar.ts +131 -0
  252. package/src/observation/ObservationUtils.ts +40 -0
  253. package/src/observation/PropagatorPairs.ts +45 -0
  254. package/src/operations/BoxMuller.ts +87 -0
  255. package/src/operations/EulerAngles.ts +183 -0
  256. package/src/operations/Quaternion.ts +222 -0
  257. package/src/operations/RandomGaussianSource.ts +51 -0
  258. package/src/operations/index.ts +4 -0
  259. package/src/optimize/ChebyshevCompressor.ts +96 -0
  260. package/src/optimize/DownhillSimplex.ts +212 -0
  261. package/src/optimize/GoldenSection.ts +71 -0
  262. package/src/optimize/PolynomialRegression.ts +109 -0
  263. package/src/optimize/PolynomicalRegressionResult.ts +32 -0
  264. package/src/optimize/SimpleLinearRegression.ts +127 -0
  265. package/src/optimize/SimplexEntry.ts +50 -0
  266. package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
  267. package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
  268. package/src/orbit_determination/GibbsIOD.ts +95 -0
  269. package/src/orbit_determination/GoodingIOD.ts +380 -0
  270. package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
  271. package/src/orbit_determination/LambertIOD.ts +260 -0
  272. package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
  273. package/src/propagator/DormandPrince54Propagator.ts +73 -0
  274. package/src/propagator/KeplerPropagator.ts +102 -0
  275. package/src/propagator/Propagator.ts +253 -0
  276. package/src/propagator/RkCheckpoint.ts +25 -0
  277. package/src/propagator/RkResult.ts +26 -0
  278. package/src/propagator/RungeKutta4Propagator.ts +179 -0
  279. package/src/propagator/RungeKutta89Propagator.ts +132 -0
  280. package/src/propagator/RungeKuttaAdaptive.ts +232 -0
  281. package/src/propagator/Sgp4Propagator.ts +71 -0
  282. package/src/smoothing/ExponentialSmoothing.ts +90 -0
  283. package/src/transforms/index.ts +1 -0
  284. package/src/transforms/transforms.ts +117 -0
  285. package/src/types/types.ts +135 -0
  286. package/src/utils/index.ts +1 -0
  287. package/src/utils/jacobian.ts +38 -0
  288. package/.eslintrc.json +0 -244
  289. package/.prettierrc +0 -17
  290. package/babel.config.js +0 -16
  291. package/codecov.yml +0 -21
  292. package/dist/objects/base-object.d.ts +0 -40
  293. package/dist/objects/detailed-sat.d.ts +0 -66
  294. package/dist/objects/sat.d.ts +0 -92
  295. package/dist/objects/sensor.d.ts +0 -93
  296. package/dist/objects/star.d.ts +0 -46
  297. package/dist/ootk.js +0 -2
  298. package/dist/ootk.js.LICENSE.txt +0 -77
  299. package/dist/sgp4/sgp4.d.ts +0 -82
  300. package/dist/tle/tle-format-data.d.ts +0 -6
  301. package/dist/tle/tle.d.ts +0 -375
  302. package/dist/utils/constants.d.ts +0 -34
  303. package/dist/utils/moon-math.d.ts +0 -113
  304. package/dist/utils/sun-math.d.ts +0 -230
  305. package/dist/utils/utils.d.ts +0 -39
  306. package/jest.config.ts +0 -30
  307. package/lib/objects/base-object.d.ts +0 -40
  308. package/lib/objects/base-object.js +0 -79
  309. package/lib/objects/base-object.js.map +0 -1
  310. package/lib/objects/detailed-sat.js +0 -149
  311. package/lib/objects/detailed-sat.js.map +0 -1
  312. package/lib/objects/index.d.ts +0 -4
  313. package/lib/objects/index.js +0 -5
  314. package/lib/objects/index.js.map +0 -1
  315. package/lib/objects/sat.d.ts +0 -92
  316. package/lib/objects/sat.js +0 -188
  317. package/lib/objects/sat.js.map +0 -1
  318. package/lib/objects/sensor.d.ts +0 -93
  319. package/lib/objects/sensor.js +0 -273
  320. package/lib/objects/sensor.js.map +0 -1
  321. package/lib/objects/space-object.js +0 -60
  322. package/lib/objects/space-object.js.map +0 -1
  323. package/lib/objects/star.d.ts +0 -46
  324. package/lib/objects/star.js +0 -91
  325. package/lib/objects/star.js.map +0 -1
  326. package/lib/ootk.js.map +0 -1
  327. package/lib/sgp4/sgp4.d.ts +0 -82
  328. package/lib/sgp4/sgp4.js +0 -3262
  329. package/lib/sgp4/sgp4.js.map +0 -1
  330. package/lib/tle/tle-format-data.d.ts +0 -6
  331. package/lib/tle/tle-format-data.js +0 -10
  332. package/lib/tle/tle-format-data.js.map +0 -1
  333. package/lib/tle/tle.d.ts +0 -375
  334. package/lib/tle/tle.js +0 -611
  335. package/lib/tle/tle.js.map +0 -1
  336. package/lib/transforms/transforms.d.ts +0 -94
  337. package/lib/transforms/transforms.js +0 -308
  338. package/lib/transforms/transforms.js.map +0 -1
  339. package/lib/types/types.d.ts +0 -605
  340. package/lib/types/types.js +0 -36
  341. package/lib/types/types.js.map +0 -1
  342. package/lib/utils/constants.d.ts +0 -34
  343. package/lib/utils/constants.js +0 -35
  344. package/lib/utils/constants.js.map +0 -1
  345. package/lib/utils/moon-math.d.ts +0 -113
  346. package/lib/utils/moon-math.js +0 -387
  347. package/lib/utils/moon-math.js.map +0 -1
  348. package/lib/utils/sun-math.d.ts +0 -230
  349. package/lib/utils/sun-math.js +0 -422
  350. package/lib/utils/sun-math.js.map +0 -1
  351. package/lib/utils/utils.d.ts +0 -39
  352. package/lib/utils/utils.js +0 -102
  353. package/lib/utils/utils.js.map +0 -1
  354. package/sandbox.html +0 -8
  355. package/tsconfig.base.json +0 -31
  356. package/tsconfig.build.json +0 -14
  357. /package/{LICENSE.MD → LICENSE.md} +0 -0
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { EpochUTC, J2000, Matrix, Vector, Vector3D } from 'ootk-core';
18
+ import { Propagator } from '../propagator/Propagator';
19
+ import { RandomGaussianSource } from './../operations/RandomGaussianSource';
20
+ import { PropagatorPairs } from './PropagatorPairs';
21
+ /**
22
+ * Observation data.
23
+ */
24
+ export declare abstract class Observation {
25
+ /** Observation epoch. */
26
+ abstract get epoch(): EpochUTC;
27
+ /** Inertial observer location. */
28
+ abstract get site(): J2000;
29
+ /** Observation noise matrix. */
30
+ abstract get noise(): Matrix;
31
+ /**
32
+ * Return range-normalized cross line-of-sight residual for the observation
33
+ * when compared against a nominal state propagator.
34
+ * @param propagator Propagator to compare against.
35
+ * @throws Not implemented.
36
+ */
37
+ clos(propagator: Propagator): number;
38
+ /**
39
+ * Return relative state residual for the observation when compared against
40
+ * a nominal state propagator.
41
+ * @param propagator Propagator to compare against.
42
+ * @throws Not implemented.
43
+ */
44
+ ricDiff(propagator: Propagator): Vector3D;
45
+ /**
46
+ * Convert this observation to vector form.
47
+ * @throws Not implemented.
48
+ */
49
+ toVector(): Vector;
50
+ /**
51
+ * Compute the state derivative matrix for this observation.
52
+ * @param propPairs Propagator pairs to compare against.
53
+ * @throws Not implemented.
54
+ */
55
+ jacobian(propPairs: PropagatorPairs): Matrix;
56
+ /**
57
+ * Compute the state residual matrix for this observation.
58
+ * @param propagator Propagator to compare against.
59
+ * @throws Not implemented.
60
+ */
61
+ residual(propagator: Propagator): Matrix;
62
+ /**
63
+ * Convert this observation's noise matrix into a covariance matrix.
64
+ * @returns A matrix representing the noise covariance.
65
+ */
66
+ noiseCovariance(): Matrix;
67
+ /**
68
+ * Generates a noise sample from the noise covariance matrix.
69
+ * @param sigma - The scaling factor for the noise covariance matrix.
70
+ * @returns A matrix representing the noise sample.
71
+ */
72
+ noiseSample_(sigma: number): Matrix;
73
+ /**
74
+ * Randomly sample this observation in vector form within the
75
+ * observation noise.
76
+ * @param random Random number generator.
77
+ * @param sigma Sigma value to scale the noise by.
78
+ * @returns Sampled observation.
79
+ */
80
+ sampleVector(random: RandomGaussianSource, sigma: number): Vector;
81
+ /**
82
+ * Randomly sample this observation within the observation noise, scaled to
83
+ * the provided sigma value.
84
+ * @param random Random number generator.
85
+ * @param sigma Sigma value to scale the noise by.
86
+ * @throws Not implemented.
87
+ */
88
+ sample(random: RandomGaussianSource, sigma?: number): Observation;
89
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ /* eslint-disable @typescript-eslint/no-unused-vars */
18
+ /**
19
+ * Observation data.
20
+ */
21
+ export class Observation {
22
+ /**
23
+ * Return range-normalized cross line-of-sight residual for the observation
24
+ * when compared against a nominal state propagator.
25
+ * @param propagator Propagator to compare against.
26
+ * @throws Not implemented.
27
+ */
28
+ clos(propagator) {
29
+ throw new Error('Not implemented');
30
+ }
31
+ /**
32
+ * Return relative state residual for the observation when compared against
33
+ * a nominal state propagator.
34
+ * @param propagator Propagator to compare against.
35
+ * @throws Not implemented.
36
+ */
37
+ ricDiff(propagator) {
38
+ throw new Error('Not implemented');
39
+ }
40
+ /**
41
+ * Convert this observation to vector form.
42
+ * @throws Not implemented.
43
+ */
44
+ toVector() {
45
+ throw new Error('Not implemented');
46
+ }
47
+ /**
48
+ * Compute the state derivative matrix for this observation.
49
+ * @param propPairs Propagator pairs to compare against.
50
+ * @throws Not implemented.
51
+ */
52
+ jacobian(propPairs) {
53
+ throw new Error('Not implemented');
54
+ }
55
+ /**
56
+ * Compute the state residual matrix for this observation.
57
+ * @param propagator Propagator to compare against.
58
+ * @throws Not implemented.
59
+ */
60
+ residual(propagator) {
61
+ throw new Error('Not implemented');
62
+ }
63
+ /**
64
+ * Convert this observation's noise matrix into a covariance matrix.
65
+ * @returns A matrix representing the noise covariance.
66
+ */
67
+ noiseCovariance() {
68
+ return this.noise.reciprocal();
69
+ }
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) {
76
+ return this.noiseCovariance().scale(sigma).cholesky();
77
+ }
78
+ /**
79
+ * Randomly sample this observation in vector form within the
80
+ * observation noise.
81
+ * @param random Random number generator.
82
+ * @param sigma Sigma value to scale the noise by.
83
+ * @returns Sampled observation.
84
+ */
85
+ sampleVector(random, sigma) {
86
+ const chol = this.noiseSample_(sigma);
87
+ const gauss = random.gaussVector(this.noise.columns);
88
+ const meas = this.toVector();
89
+ return meas.add(chol.multiplyVector(gauss));
90
+ }
91
+ /**
92
+ * Randomly sample this observation within the observation noise, scaled to
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.
97
+ */
98
+ sample(random, sigma = 1.0) {
99
+ throw new Error('Not implemented');
100
+ }
101
+ }
102
+ //# sourceMappingURL=Observation.js.map
@@ -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,CA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) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { EpochUTC, J2000, Matrix, RadecTopocentric, Radians, Vector, Vector3D } from 'ootk-core';
18
+ import { RandomGaussianSource } from '../operations/RandomGaussianSource';
19
+ import { Propagator } from '../propagator/Propagator';
20
+ import { Observation } from './Observation';
21
+ import { PropagatorPairs } from './PropagatorPairs';
22
+ export declare class ObservationOptical extends Observation {
23
+ private _site;
24
+ observation: RadecTopocentric;
25
+ private _noise;
26
+ constructor(_site: J2000, observation: RadecTopocentric, _noise?: Matrix);
27
+ get site(): J2000;
28
+ get noise(): Matrix;
29
+ /**
30
+ * Default noise matrix _(right-ascension, declination)_.
31
+ * Based on the Maui Optical Site noise model.
32
+ */
33
+ static defaultNoise: Matrix;
34
+ get epoch(): EpochUTC;
35
+ toVector(): Vector;
36
+ clos(propagator: Propagator): number;
37
+ ricDiff(propagator: Propagator): Vector3D;
38
+ sample(random: RandomGaussianSource, sigma?: number): Observation;
39
+ jacobian(propPairs: PropagatorPairs): Matrix;
40
+ residual(propagator: Propagator): Matrix;
41
+ /**
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
46
+ */
47
+ static noiseFromSigmas(raSigma: Radians, decSigma: Radians): Matrix;
48
+ }
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { array2d, DEG2RAD, J2000, Matrix, RadecTopocentric, RIC, Vector, Vector3D, } from 'ootk-core';
18
+ import { Observation } from './Observation';
19
+ import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
20
+ // / Optical observation data.
21
+ export class ObservationOptical extends Observation {
22
+ _site;
23
+ observation;
24
+ _noise;
25
+ // / Create a new [ObservationOptical] object.
26
+ constructor(_site, observation, _noise = ObservationOptical.defaultNoise) {
27
+ super();
28
+ this._site = _site;
29
+ this.observation = observation;
30
+ this._noise = _noise;
31
+ }
32
+ // / Inertial site location.
33
+ get site() {
34
+ return this._site;
35
+ }
36
+ // / Noise matrix.
37
+ get noise() {
38
+ return this._noise;
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);
45
+ get epoch() {
46
+ return this.observation.epoch;
47
+ }
48
+ toVector() {
49
+ return Vector.fromList([this.observation.rightAscension, this.observation.declination]);
50
+ }
51
+ clos(propagator) {
52
+ const position = propagator.propagate(this.epoch).position;
53
+ const offset = position.subtract(this.site.position);
54
+ const actual = this.observation.lineOfSight().normalize();
55
+ const expected = offset.normalize();
56
+ const slantRange = offset.magnitude();
57
+ const theta = actual.angle(expected);
58
+ if (isNaN(theta)) {
59
+ return 0.0;
60
+ }
61
+ return 2.0 * slantRange * Math.sin(theta * 0.5);
62
+ }
63
+ ricDiff(propagator) {
64
+ const r0 = this.site;
65
+ const r1 = propagator.propagate(this.epoch);
66
+ const r2 = this.observation.position(this.site, r1.position.distance(r0.position));
67
+ return RIC.fromJ2000(new J2000(this.epoch, r2, Vector3D.origin), r1).position;
68
+ }
69
+ sample(random, sigma = 1.0) {
70
+ const resultEl = this.sampleVector(random, sigma).elements;
71
+ return new ObservationOptical(this.site, new RadecTopocentric(this.epoch, resultEl[0], resultEl[1]), this.noise);
72
+ }
73
+ jacobian(propPairs) {
74
+ const result = array2d(2, 6, 0.0);
75
+ for (let i = 0; i < 6; i++) {
76
+ const step = propPairs.step(i);
77
+ const [high, low] = propPairs.get(i);
78
+ const sl = low.propagate(this.epoch);
79
+ const sh = high.propagate(this.epoch);
80
+ const ol = RadecTopocentric.fromStateVector(sl, this.site);
81
+ const oh = RadecTopocentric.fromStateVector(sh, this.site);
82
+ result[0][i] = observationDerivative(oh.rightAscension, ol.rightAscension, step, true);
83
+ result[1][i] = observationDerivative(oh.declination, ol.declination, step, true);
84
+ }
85
+ return new Matrix(result);
86
+ }
87
+ residual(propagator) {
88
+ const result = array2d(2, 1, 0.0);
89
+ const state = propagator.propagate(this.epoch);
90
+ const radec = RadecTopocentric.fromStateVector(state, this.site);
91
+ result[0][0] = normalizeAngle(this.observation.rightAscension, radec.rightAscension);
92
+ result[1][0] = normalizeAngle(this.observation.declination, radec.declination);
93
+ return new Matrix(result);
94
+ }
95
+ /**
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
100
+ */
101
+ static noiseFromSigmas(raSigma, decSigma) {
102
+ return observationNoiseFromSigmas([raSigma, decSigma]);
103
+ }
104
+ }
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,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1F,CAAC;IAED,IAAI,CAAC,UAAs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AI,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"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { EpochUTC, J2000, Kilometers, Matrix, Radians, RAE, Vector, Vector3D } from 'ootk-core';
18
+ import { RandomGaussianSource } from '../operations/RandomGaussianSource';
19
+ import { Propagator } from '../propagator/Propagator';
20
+ import { Observation } from './Observation';
21
+ import { PropagatorPairs } from './PropagatorPairs';
22
+ export declare class ObservationRadar extends Observation {
23
+ private _site;
24
+ observation: RAE;
25
+ private _noise;
26
+ constructor(_site: J2000, observation: RAE, _noise?: Matrix);
27
+ private static defaultNoise;
28
+ get epoch(): EpochUTC;
29
+ get site(): J2000;
30
+ get noise(): Matrix;
31
+ toVector(): Vector;
32
+ clos(propagator: Propagator): number;
33
+ ricDiff(propagator: Propagator): Vector3D;
34
+ sample(random: RandomGaussianSource, sigma?: number): Observation;
35
+ jacobian(propPairs: PropagatorPairs): Matrix;
36
+ residual(propagator: Propagator): Matrix;
37
+ /**
38
+ * Create a noise matrix from the range, azimuth, and elevation standard
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.
44
+ */
45
+ static noiseFromSigmas(rngSigma: Kilometers, azSigma: Radians, elSigma: Radians): Matrix;
46
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { array2d, DEG2RAD, J2000, Matrix, RAE, RIC, Vector, Vector3D, } from 'ootk-core';
18
+ import { Observation } from './Observation';
19
+ import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
20
+ // / Radar observation data.
21
+ export class ObservationRadar extends Observation {
22
+ _site;
23
+ observation;
24
+ _noise;
25
+ // / Create a new [ObservationRadar] object.
26
+ constructor(_site, observation, _noise = ObservationRadar.defaultNoise) {
27
+ super();
28
+ this._site = _site;
29
+ this.observation = observation;
30
+ this._noise = _noise;
31
+ }
32
+ // / Default noise matrix.
33
+ static defaultNoise = ObservationRadar.noiseFromSigmas(0.32, 0.015 * DEG2RAD, 0.015 * DEG2RAD);
34
+ get epoch() {
35
+ return this.observation.epoch;
36
+ }
37
+ get site() {
38
+ return this._site;
39
+ }
40
+ get noise() {
41
+ return this._noise;
42
+ }
43
+ toVector() {
44
+ return Vector.fromList([this.observation.rng, this.observation.azRad, this.observation.elRad]);
45
+ }
46
+ clos(propagator) {
47
+ const ri = propagator.propagate(this.epoch).position.subtract(this.site.position);
48
+ return Math.abs(this.observation.rng - ri.magnitude());
49
+ }
50
+ ricDiff(propagator) {
51
+ const r0 = propagator.propagate(this.epoch);
52
+ const r1 = RAE.fromStateVector(r0, this.site);
53
+ const r2 = this.observation.position(this.site, r1.azRad, r1.elRad);
54
+ return RIC.fromJ2000(new J2000(this.epoch, r2, Vector3D.origin), r0).position;
55
+ }
56
+ sample(random, sigma = 1.0) {
57
+ const result = this.sampleVector(random, sigma).elements;
58
+ return new ObservationRadar(this.site, new RAE(this.observation.epoch, result[0], result[1], result[2]), this.noise);
59
+ }
60
+ jacobian(propPairs) {
61
+ const result = array2d(3, 6, 0.0);
62
+ for (let i = 0; i < 6; i++) {
63
+ const step = propPairs.step(i);
64
+ const [high, low] = propPairs.get(i);
65
+ const sl = low.propagate(this.epoch);
66
+ const sh = high.propagate(this.epoch);
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);
72
+ }
73
+ return new Matrix(result);
74
+ }
75
+ residual(propagator) {
76
+ const result = array2d(3, 1, 0.0);
77
+ const state = propagator.propagate(this.epoch);
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);
82
+ return new Matrix(result);
83
+ }
84
+ /**
85
+ * Create a noise matrix from the range, azimuth, and elevation standard
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.
91
+ */
92
+ static noiseFromSigmas(rngSigma, azSigma, elSigma) {
93
+ return observationNoiseFromSigmas([rngSigma, azSigma, elSigma]);
94
+ }
95
+ }
96
+ //# sourceMappingURL=ObservationRadar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObservationRadar.js","sourceRoot":"","sources":["../../src/observation/ObservationRadar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EAEP,KAAK,EAGL,MAAM,EAEN,GAAG,EACH,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;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,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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { Matrix } from 'ootk-core';
18
+ export declare const normalizeAngle: (a: number, b: number) => number;
19
+ export declare const observationDerivative: (xh: number, xl: number, step: number, isAngle?: boolean) => number;
20
+ export declare const observationNoiseFromSigmas: (sigmas: number[]) => Matrix;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { Matrix } from 'ootk-core';
18
+ export const normalizeAngle = (a, b) => {
19
+ const x = a - b;
20
+ return Math.atan2(Math.sin(x), Math.cos(x));
21
+ };
22
+ export const observationDerivative = (xh, xl, step, isAngle = false) => (isAngle ? normalizeAngle(xh, xl) : xh - xl) / step;
23
+ export const observationNoiseFromSigmas = (sigmas) => {
24
+ const n = sigmas.length;
25
+ const result = Array.from({ length: n }, () => Array(n).fill(0.0));
26
+ for (let i = 0; i < n; i++) {
27
+ const s = sigmas[i];
28
+ result[i][i] = 1 / (s * s);
29
+ }
30
+ return new Matrix(result);
31
+ };
32
+ //# sourceMappingURL=ObservationUtils.js.map
@@ -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"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ import { Propagator } from '../propagator/Propagator';
18
+ export declare class PropagatorPairs {
19
+ private _posStep;
20
+ private _velStep;
21
+ constructor(_posStep: number, _velStep: number);
22
+ private _high;
23
+ private _low;
24
+ set(index: number, high: Propagator, low: Propagator): void;
25
+ get(index: number): [Propagator, Propagator];
26
+ /**
27
+ * Get the step size at the provided index.
28
+ * @param index The index.
29
+ * @returns The step size.
30
+ */
31
+ step(index: number): number;
32
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ * @license AGPL-3.0-or-later
4
+ * @copyright (c) 2020-2024 Theodore Kruczek
5
+ *
6
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
7
+ * terms of the GNU Affero General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later version.
9
+ *
10
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License along with
15
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ export class PropagatorPairs {
18
+ _posStep;
19
+ _velStep;
20
+ constructor(_posStep, _velStep) {
21
+ this._posStep = _posStep;
22
+ this._velStep = _velStep;
23
+ // Do nothing.
24
+ }
25
+ _high = Array(6).fill(null);
26
+ _low = Array(6).fill(null);
27
+ set(index, high, low) {
28
+ this._high[index] = high;
29
+ this._low[index] = low;
30
+ }
31
+ get(index) {
32
+ return [this._high[index], this._low[index]];
33
+ }
34
+ /**
35
+ * Get the step size at the provided index.
36
+ * @param index The index.
37
+ * @returns The step size.
38
+ */
39
+ step(index) {
40
+ return index < 3 ? this._posStep : this._velStep;
41
+ }
42
+ }
43
+ //# sourceMappingURL=PropagatorPairs.js.map
@@ -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"}