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
@@ -1,230 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file SunMath is a collection of functions for calculating the position of the sun
7
- * and other stars. This was originally created by Vladimir Agafonkin. Robert Gester's
8
- * update was referenced for documentation. There were a couple of bugs in both versions
9
- * so there will be some differences if you are migrating from either to this library.
10
- *
11
- *
12
- * @license AGPL-3.0-or-later
13
- * @Copyright (c) 2020-2023 Theodore Kruczek
14
- *
15
- * @Copyright (c) 2011-2015, Vladimir Agafonkin
16
- * SunCalc is a JavaScript library for calculating sun/moon position and light phases.
17
- * https://github.com/mourner/suncalc
18
- *
19
- * Reworked and enhanced by Robert Gester
20
- * @Copyright (c) 2022 Robert Gester
21
- * https://github.com/hypnos3/suncalc3
22
- *
23
- * sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
24
- *
25
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
26
- * terms of the GNU Affero General Public License as published by the Free Software
27
- * Foundation, either version 3 of the License, or (at your option) any later version.
28
- *
29
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
30
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31
- * See the GNU Affero General Public License for more details.
32
- *
33
- * You should have received a copy of the GNU Affero General Public License along with
34
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
35
- */
36
- import { Degrees, Radians } from '../ootk';
37
- import { AzEl, Meters, SunTime } from '../types/types';
38
- export declare class SunMath {
39
- private static readonly J0_;
40
- private static readonly J1970_;
41
- private static readonly J2000_;
42
- private static readonly e_;
43
- private static times_;
44
- /**
45
- * approx transit
46
- * @param {number} Ht - hourAngle
47
- * @param {number} lw - rad * -lng
48
- * @param {number} n - Julian cycle
49
- * @returns {number} approx transit
50
- */
51
- static approxTransit(Ht: number, lw: number, n: number): number;
52
- /**
53
- * get astro refraction
54
- * @param {Radians} h - elevation
55
- * @returns {number} refraction
56
- */
57
- static astroRefraction(h: Radians): Radians;
58
- /**
59
- * get azimuth
60
- * @param {number} H - siderealTime
61
- * @param {Radians} phi - latitude
62
- * @param {Radians} dec - The declination of the sun
63
- * @returns {Radians} azimuth in rad
64
- */
65
- static azimuth(H: number, phi: Radians, dec: Radians): Radians;
66
- /**
67
- * get number of days for a dateValue since 2000
68
- *
69
- * See: https://en.wikipedia.org/wiki/Epoch_(astronomy)
70
- *
71
- * @param {number} date date as timestamp to get days
72
- * @return {number} count of days
73
- */
74
- static date2jSince2000(date: Date): number;
75
- /**
76
- * get declination
77
- * @param {number} l - ecliptic longitude
78
- * @param {number} b - ecliptic latitude
79
- * @returns {number} declination
80
- */
81
- static declination(l: number, b: number): Radians;
82
- /**
83
- * ecliptic latitude
84
- * @param {number} B - ?
85
- * @returns {number} ecliptic latitude
86
- */
87
- static eclipticLatitude(B: number): number;
88
- /**
89
- * ecliptic longitude
90
- * @param {number} M - solar mean anomaly
91
- * @returns {number} ecliptic longitude
92
- */
93
- static eclipticLongitude(M: number): Radians;
94
- /**
95
- * get elevation (sometimes called altitude)
96
- * @param {number} H - siderealTime
97
- * @param {Radians} phi - latitude
98
- * @param {Radians} dec - The declination of the sun
99
- * @returns {Radians} elevation
100
- */
101
- static elevation(H: number, phi: Radians, dec: Radians): Radians;
102
- /**
103
- * returns set time for the given sun altitude
104
- * @param {number} h - heigh at 0
105
- * @param {number} lw - rad * -lng
106
- * @param {number} phi - rad * lat;
107
- * @param {number} dec - declination
108
- * @param {number} n - Julian cycle
109
- * @param {number} M - solar mean anomal
110
- * @param {number} L - ecliptic longitude
111
- * @returns {number} set time
112
- */
113
- static getSetJulian(h: Meters, lw: number, phi: number, dec: number, n: number, M: number, L: number): number;
114
- /**
115
- * Convert Date to Solar Date/Time
116
- *
117
- * Based on https://www.pveducation.org/pvcdrom/properties-of-sunlight/solar-time
118
- *
119
- * See: https://github.com/mourner/suncalc/pull/156
120
- *
121
- * @param {date} date - Date to calculate for
122
- * @param {number} utcOffset - UTC offset in hours
123
- * @param {Degrees} lon - Longitude in degrees
124
- * @returns {Date} - Date Object in Solar Time
125
- */
126
- static getSolarTime(date: Date, utcOffset: number, lon: number): Date;
127
- static getStarAzEl(date: Date, lat: Degrees, lon: Degrees, ra: Radians, dec: Radians): AzEl;
128
- static getSunAzEl(date: Date, lat: Degrees, lon: Degrees): AzEl;
129
- static getSunRaDec(d: number): {
130
- dec: Radians;
131
- ra: Radians;
132
- };
133
- /**
134
- * calculates time for a given azimuth angle for a given date and latitude/longitude
135
- * @param {number|Date} dateValue Date object or timestamp for calculating sun-time
136
- * @param {Degrees} lat latitude for calculating sun-time
137
- * @param {Degrees} lon longitude for calculating sun-time
138
- * @param {Radians | Degrees} az azimuth for calculating sun-time
139
- * @param {boolean} [isDegrees] true if the az angle is in degree and not in rad
140
- * @return {Date} result time of sun-time
141
- */
142
- static getSunTimeByAzimuth(dateValue: any, lat: Degrees, lon: Degrees, az: Radians | Degrees, isDegrees?: boolean): Date;
143
- /**
144
- * calculates sun times for a given date and latitude/longitude
145
- * @param {Date|number} dateVal Date object for calculating sun-times
146
- * @param {number} lat latitude for calculating sun-times
147
- * @param {number} lon longitude for calculating sun-times
148
- * @param {number} [alt=0] the observer height (in meters) relative to the horizon
149
- * @param {boolean} [isUtc=false] defines if the calculation should be in utc or local time (default is local)
150
- * @return {SunTime} result object of sunTime
151
- */
152
- static getTimes(dateVal: Date, lat: Degrees, lon: Degrees, alt?: Meters, isUtc?: boolean): SunTime;
153
- /**
154
- * hour angle
155
- * @param {number} h - heigh at 0
156
- * @param {number} phi - rad * lat;
157
- * @param {number} dec - declination
158
- * @returns {number} hour angle
159
- */
160
- static hourAngle(h: number, phi: number, dec: number): number;
161
- /**
162
- * convert Julian calendar to date object
163
- * @param {number} julian day number in Julian calendar to convert
164
- * @return {number} result date as timestamp
165
- */
166
- static julian2date(julian: number): Date;
167
- /**
168
- * Julian cycle
169
- * @param {number} d - number of days
170
- * @param {number} lw - rad * -lng;
171
- * @returns {number} julian cycle
172
- */
173
- static julianCyle(d: number, lw: number): number;
174
- /**
175
- * get right ascension
176
- * @param {number} l - ecliptic longitude
177
- * @param {number} b - ecliptic latitude
178
- * @returns {number} right ascension
179
- */
180
- static rightAscension(l: number, b: number): Radians;
181
- /**
182
- * side real time
183
- * @param {number} d - julian day
184
- * @param {Radians} lw - longitude of the observer
185
- * @returns {number} sidereal time
186
- */
187
- static siderealTime(d: number, lw: Radians): number;
188
- /**
189
- * solar transit in Julian
190
- * @param {number} ds - approxTransit
191
- * @param {number} M - solar mean anomal
192
- * @param {number} L - ecliptic longitude
193
- * @returns {number} solar transit in Julian
194
- */
195
- static solarTransitJulian(ds: number, M: number, L: number): number;
196
- private static calculateJnoon_;
197
- /**
198
- * get azimuth
199
- * @param {number} H - siderealTime
200
- * @param {Radians} phi - latitude
201
- * @param {Radians} dec - The declination of the sun
202
- * @returns {Radians} azimuth
203
- */
204
- private static getAzimuth_;
205
- /**
206
- * returns set time for the given sun altitude
207
- * @param {Meters} alt - altitude at 0
208
- * @param {Radians} lw - -lng
209
- * @param {Radians} phi - lat;
210
- * @param {Radians} dec - declination
211
- * @param {number} n - Julian cycle
212
- * @param {number} M - solar mean anomal
213
- * @param {number} L - ecliptic longitude
214
- * @return {J2000Value} sunset time in days since 2000
215
- */
216
- private static getSetJ_;
217
- private static julianCycle_;
218
- /**
219
- * calculates the obderver angle
220
- * @param {number} alt the observer altitude (in meters) relative to the horizon
221
- * @returns {Degrees} height for further calculations
222
- */
223
- private static observerAngle_;
224
- /**
225
- * get solar mean anomaly
226
- * @param {number} d - julian day
227
- * @returns {number} solar mean anomaly
228
- */
229
- private static solarMeanAnomaly_;
230
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file The Utils module.
7
- *
8
- * @license AGPL-3.0-or-later
9
- * @Copyright (c) 2020-2023 Theodore Kruczek
10
- *
11
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
- * terms of the GNU Affero General Public License as published by the Free Software
13
- * Foundation, either version 3 of the License, or (at your option) any later version.
14
- *
15
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
- * See the GNU Affero General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Affero General Public License along with
20
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import * as Types from '../types/types';
23
- import { EciVec3, Kilometers } from '../types/types';
24
- import { MoonMath } from './moon-math';
25
- import { SunMath } from './sun-math';
26
- declare class Utils {
27
- static MoonMath: typeof MoonMath;
28
- static SunMath: typeof SunMath;
29
- static Types: typeof Types;
30
- static jday: (year?: number, mon?: number, day?: number, hr?: number, minute?: number, sec?: number) => number;
31
- static createVec(start: number, stop: number, step: number): number[];
32
- static distance(pos1: EciVec3, pos2: EciVec3): Kilometers;
33
- static dopplerFactor(location: EciVec3, position: EciVec3, velocity: EciVec3): Kilometers;
34
- static getDayOfYear(date: Date): number;
35
- static roundToNDecimalPlaces(value: number, places: number): number;
36
- private static isLeapYear_;
37
- private static sign_;
38
- }
39
- export { Utils };
package/jest.config.ts DELETED
@@ -1,30 +0,0 @@
1
- const jestConfig = {
2
- testEnvironment: 'node',
3
- transform: {
4
- '\\.(js|ts|jsx|tsx)$': 'babel-jest',
5
- },
6
- testPathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/lib', '<rootDir>/scripts', '<rootDir>/coverage'],
7
- transformIgnorePatterns: ['dist', 'scripts', 'coverage'],
8
- testMatch: ['**/?(*.)+(spec|test).?(m)[jt]s?(x)'],
9
- moduleFileExtensions: ['js', 'mjs', 'ts'],
10
- // setupFiles: [''],
11
- coverageDirectory: '<rootDir>/coverage',
12
- moduleDirectories: ['node_modules', 'offline'],
13
- modulePathIgnorePatterns: [
14
- '<rootDir>/node_modules/',
15
- '<rootDir>/coverage/',
16
- '<rootDir>/dist/',
17
- '<rootDir>/scripts/',
18
- '<rootDir>/test/sgp4/sgp4prop',
19
- ],
20
- moduleNameMapper: {
21
- '^@lib(.*)$': '<rootDir>/lib/$1',
22
- '^@dist(.*)$': '<rootDir>/dist/$1',
23
- '^@src(.*)$': '<rootDir>/src/$1',
24
- '^@test(.*)$': '<rootDir>/test/$1',
25
- },
26
- coverageReporters: ['lcov', 'html', 'text'],
27
- coveragePathIgnorePatterns: ['/node_modules/', '/dist/', '/lib/', '/scripts/', '/coverage/'],
28
- };
29
-
30
- export default jestConfig;
@@ -1,40 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file The BaseObject class is used for creating core properties and methods applicable
7
- * to ground and space based objects.
8
- *
9
- * @license AGPL-3.0-or-later
10
- * @Copyright (c) 2020-2023 Theodore Kruczek
11
- *
12
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
- * terms of the GNU Affero General Public License as published by the Free Software
14
- * Foundation, either version 3 of the License, or (at your option) any later version.
15
- *
16
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
- * See the GNU Affero General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Affero General Public License along with
21
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
- */
23
- import { EciVec3, SpaceObjectType } from '../types/types';
24
- interface ObjectInfo {
25
- name?: string;
26
- type?: SpaceObjectType;
27
- position?: EciVec3;
28
- time?: Date;
29
- }
30
- export declare class BaseObject {
31
- name: string;
32
- type: SpaceObjectType;
33
- position: EciVec3;
34
- time: Date;
35
- constructor(info: ObjectInfo);
36
- getName(): string;
37
- getType(): SpaceObjectType;
38
- getTypeString(): string;
39
- }
40
- export {};
@@ -1,79 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file The BaseObject class is used for creating core properties and methods applicable
7
- * to ground and space based objects.
8
- *
9
- * @license AGPL-3.0-or-later
10
- * @Copyright (c) 2020-2023 Theodore Kruczek
11
- *
12
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
- * terms of the GNU Affero General Public License as published by the Free Software
14
- * Foundation, either version 3 of the License, or (at your option) any later version.
15
- *
16
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
- * See the GNU Affero General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Affero General Public License along with
21
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
- */
23
- import { SpaceObjectType } from '../types/types';
24
- var BaseObject = /** @class */ (function () {
25
- function BaseObject(info) {
26
- this.type = info.type || SpaceObjectType.UNKNOWN;
27
- this.name = info.name || 'Unknown';
28
- this.position = info.position || {
29
- x: 0,
30
- y: 0,
31
- z: 0,
32
- }; // Default to the center of the earth until position is calculated
33
- this.time = info.time || new Date();
34
- }
35
- BaseObject.prototype.getName = function () {
36
- return this.name;
37
- };
38
- BaseObject.prototype.getType = function () {
39
- return this.type;
40
- };
41
- BaseObject.prototype.getTypeString = function () {
42
- var _a;
43
- var typeToStringMap = (_a = {},
44
- _a[SpaceObjectType.UNKNOWN] = 'Unknown',
45
- _a[SpaceObjectType.PAYLOAD] = 'Payload',
46
- _a[SpaceObjectType.ROCKET_BODY] = 'Rocket Body',
47
- _a[SpaceObjectType.DEBRIS] = 'Debris',
48
- _a[SpaceObjectType.SPECIAL] = 'Special',
49
- _a[SpaceObjectType.RADAR_MEASUREMENT] = 'Radar Measurement',
50
- _a[SpaceObjectType.RADAR_TRACK] = 'Radar Track',
51
- _a[SpaceObjectType.RADAR_OBJECT] = 'Radar Object',
52
- _a[SpaceObjectType.BALLISTIC_MISSILE] = 'Ballistic Missile',
53
- _a[SpaceObjectType.STAR] = 'Star',
54
- _a[SpaceObjectType.INTERGOVERNMENTAL_ORGANIZATION] = 'Intergovernmental Organization',
55
- _a[SpaceObjectType.SUBORBITAL_PAYLOAD_OPERATOR] = 'Suborbital Payload Operator',
56
- _a[SpaceObjectType.PAYLOAD_OWNER] = 'Payload Owner',
57
- _a[SpaceObjectType.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER] = 'Meteorological Rocket Launch Agency or Manufacturer',
58
- _a[SpaceObjectType.PAYLOAD_MANUFACTURER] = 'Payload Manufacturer',
59
- _a[SpaceObjectType.LAUNCH_AGENCY] = 'Launch Agency',
60
- _a[SpaceObjectType.LAUNCH_SITE] = 'Launch Site',
61
- _a[SpaceObjectType.LAUNCH_POSITION] = 'Launch Position',
62
- _a[SpaceObjectType.LAUNCH_FACILITY] = 'Launch Facility',
63
- _a[SpaceObjectType.CONTROL_FACILITY] = 'Control Facility',
64
- _a[SpaceObjectType.GROUND_SENSOR_STATION] = 'Ground Sensor Station',
65
- _a[SpaceObjectType.OPTICAL] = 'Optical',
66
- _a[SpaceObjectType.MECHANICAL] = 'Mechanical',
67
- _a[SpaceObjectType.PHASED_ARRAY_RADAR] = 'Phased Array Radar',
68
- _a[SpaceObjectType.OBSERVER] = 'Observer',
69
- _a[SpaceObjectType.BISTATIC_RADIO_TELESCOPE] = 'Bistatic Radio Telescope',
70
- _a[SpaceObjectType.COUNTRY] = 'Country',
71
- _a[SpaceObjectType.LAUNCH_VEHICLE_MANUFACTURER] = 'Launch Vehicle Manufacturer',
72
- _a[SpaceObjectType.ENGINE_MANUFACTURER] = 'Engine Manufacturer',
73
- _a);
74
- return typeToStringMap[this.type] || 'Unknown';
75
- };
76
- return BaseObject;
77
- }());
78
- export { BaseObject };
79
- //# sourceMappingURL=base-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-object.js","sourceRoot":"","sources":["../../src/objects/base-object.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAuB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAStE;IAME,oBAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QAEnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI;YAC/B,CAAC,EAAc,CAAC;YAChB,CAA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,CAAC,qBAAqB,IAAG,uBAAuB;YAChE,GAAC,eAAe,CAAC,OAAO,IAAG,SAAS;YACpC,GAAC,eAAe,CAAC,UAAU,IAAG,YAAY;YAC1C,GAAC,eAAe,CAAC,kBAAkB,IAAG,oBAAoB;YAC1D,GAAC,eAAe,CAAC,QAAQ,IAAG,UAAU;YACtC,GAAC,eAAe,CAAC,wBAAwB,IAAG,0BAA0B;YACtE,GAAC,eAAe,CAAC,OAAO,IAAG,SAAS;YACpC,GAAC,eAAe,CAAC,2BAA2B,IAAG,6BAA6B;YAC5E,GAAC,eAAe,CAAC,mBAAmB,IAAG,qBAAqB;eAC7D,CAAC;QAEF,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;IACjD,CAAC;IACH,iBAAC;AAAD,CAAC,AA/DD,IA+DC"}
@@ -1,149 +0,0 @@
1
- /**
2
- * @author Theodore Kruczek.
3
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
- * with satellites and other orbital objects.
5
- *
6
- * @file The DetailedSat class is an extension of the Sat class that provides additional
7
- * properties for categorizing and filtering satellites.
8
- *
9
- * @license AGPL-3.0-or-later
10
- * @Copyright (c) 2020-2023 Theodore Kruczek
11
- *
12
- * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
- * terms of the GNU Affero General Public License as published by the Free Software
14
- * Foundation, either version 3 of the License, or (at your option) any later version.
15
- *
16
- * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
- * See the GNU Affero General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Affero General Public License along with
21
- * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
- */
23
- var __extends = (this && this.__extends) || (function () {
24
- var extendStatics = function (d, b) {
25
- extendStatics = Object.setPrototypeOf ||
26
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- return function (d, b) {
31
- if (typeof b !== "function" && b !== null)
32
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
- extendStatics(d, b);
34
- function __() { this.constructor = d; }
35
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
- };
37
- })();
38
- import { Sat } from './sat';
39
- var DetailedSat = /** @class */ (function (_super) {
40
- __extends(DetailedSat, _super);
41
- function DetailedSat(info, options, details) {
42
- var _this = _super.call(this, info, options) || this;
43
- _this.setLaunchDetails(details.launchDetails);
44
- _this.setSpaceCraftDetails(details.spaceCraftDetails);
45
- _this.setOperationsDetails(details.operationsDetails);
46
- return _this;
47
- }
48
- DetailedSat.prototype.setLaunchDetails = function (details) {
49
- if (details.launchDate) {
50
- this.launchDate = details.launchDate;
51
- }
52
- if (details.launchMass) {
53
- this.launchMass = details.launchMass;
54
- }
55
- if (details.launchSite) {
56
- this.launchSite = details.launchSite;
57
- }
58
- if (details.launchVehicle) {
59
- this.launchVehicle = details.launchVehicle;
60
- }
61
- };
62
- DetailedSat.prototype.getLaunchDetails = function () {
63
- return {
64
- launchDate: this.launchDate,
65
- launchMass: this.launchMass,
66
- launchSite: this.launchSite,
67
- launchVehicle: this.launchVehicle,
68
- };
69
- };
70
- DetailedSat.prototype.setSpaceCraftDetails = function (details) {
71
- if (details.lifetime) {
72
- this.lifetime = details.lifetime;
73
- }
74
- if (details.maneuver) {
75
- this.maneuver = details.maneuver;
76
- }
77
- if (details.manufacturer) {
78
- this.manufacturer = details.manufacturer;
79
- }
80
- if (details.motor) {
81
- this.motor = details.motor;
82
- }
83
- if (details.power) {
84
- this.power = details.power;
85
- }
86
- if (details.payload) {
87
- this.payload = details.payload;
88
- }
89
- if (details.purpose) {
90
- this.purpose = details.purpose;
91
- }
92
- if (details.shape) {
93
- this.shape = details.shape;
94
- }
95
- if (details.span) {
96
- this.span = details.span;
97
- }
98
- if (details.configuration) {
99
- this.configuration = details.configuration;
100
- }
101
- if (details.equipment) {
102
- this.equipment = details.equipment;
103
- }
104
- if (details.dryMass) {
105
- this.dryMass = details.dryMass;
106
- }
107
- };
108
- DetailedSat.prototype.getSpaceCraftDetails = function () {
109
- return {
110
- lifetime: this.lifetime,
111
- maneuver: this.maneuver,
112
- manufacturer: this.manufacturer,
113
- motor: this.motor,
114
- power: this.power,
115
- payload: this.payload,
116
- purpose: this.purpose,
117
- shape: this.shape,
118
- span: this.span,
119
- configuration: this.configuration,
120
- equipment: this.equipment,
121
- dryMass: this.dryMass,
122
- };
123
- };
124
- DetailedSat.prototype.setOperationsDetails = function (details) {
125
- if (details.user) {
126
- this.user = details.user;
127
- }
128
- if (details.mission) {
129
- this.mission = details.mission;
130
- }
131
- if (details.owner) {
132
- this.owner = details.owner;
133
- }
134
- if (details.country) {
135
- this.country = details.country;
136
- }
137
- };
138
- DetailedSat.prototype.getOperationsDetails = function () {
139
- return {
140
- user: this.user,
141
- mission: this.mission,
142
- owner: this.owner,
143
- country: this.country,
144
- };
145
- };
146
- return DetailedSat;
147
- }(Sat));
148
- export { DetailedSat };
149
- //# sourceMappingURL=detailed-sat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detailed-sat.js","sourceRoot":"","sources":["../../src/objects/detailed-sat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAWH,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAW5B;IAAiC,+BAAG;IAyClC,qBACE,IAAgB,EAChB,OAAO,EACP,OAIC;QAPH,YASE,kBAAM,IAAI,EAAE,OAAO,CAAC,SAKrB;QAHC,KAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC7C,KAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACrD,KAAI,CAAC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YAChB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;SAC1B;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SAChC;QACD,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;SAC5B;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SAChC;IACH,CAAC;IAEM,0CAAoB,GAA3B;QACE,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;IACH,kBAAC;AAAD,CAAC,AAhKD,CAAiC,GAAG,GAgKnC"}
@@ -1,4 +0,0 @@
1
- export { DetailedSat } from './detailed-sat';
2
- export { Sat } from './sat';
3
- export { Sensor } from './sensor';
4
- export { Star } from './star';
@@ -1,5 +0,0 @@
1
- export { DetailedSat } from './detailed-sat';
2
- export { Sat } from './sat';
3
- export { Sensor } from './sensor';
4
- export { Star } from './star';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}