ootk 2.0.1 → 4.0.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/.eslintrc.json +14 -14
  2. package/CHANGELOG.md +122 -0
  3. package/README.md +27 -40
  4. package/jest.config.ts +30 -0
  5. package/lib/coordinate/Hill.d.ts +50 -0
  6. package/lib/coordinate/Hill.js +214 -0
  7. package/lib/coordinate/Hill.js.map +1 -0
  8. package/lib/coordinate/index.d.ts +1 -0
  9. package/lib/coordinate/index.js +2 -0
  10. package/lib/coordinate/index.js.map +1 -0
  11. package/lib/covariance/CovarianceSample.d.ts +44 -0
  12. package/lib/covariance/CovarianceSample.js +146 -0
  13. package/lib/covariance/CovarianceSample.js.map +1 -0
  14. package/lib/covariance/StateCovariance.d.ts +41 -0
  15. package/lib/covariance/StateCovariance.js +62 -0
  16. package/lib/covariance/StateCovariance.js.map +1 -0
  17. package/lib/force/AtmosphericDrag.d.ts +32 -0
  18. package/lib/force/AtmosphericDrag.js +66 -0
  19. package/lib/force/AtmosphericDrag.js.map +1 -0
  20. package/{dist/ootk.d.ts → lib/force/EarthGravity.d.ts} +13 -11
  21. package/lib/force/EarthGravity.js +115 -0
  22. package/lib/force/EarthGravity.js.map +1 -0
  23. package/lib/force/Force.d.ts +25 -0
  24. package/lib/force/Force.js +30 -0
  25. package/lib/force/Force.js.map +1 -0
  26. package/lib/force/ForceModel.d.ts +38 -0
  27. package/lib/force/ForceModel.js +71 -0
  28. package/lib/force/ForceModel.js.map +1 -0
  29. package/lib/force/Gravity.d.ts +41 -0
  30. package/lib/force/Gravity.js +48 -0
  31. package/lib/force/Gravity.js.map +1 -0
  32. package/lib/force/SolarRadiationPressure.d.ts +27 -0
  33. package/lib/force/SolarRadiationPressure.js +42 -0
  34. package/lib/force/SolarRadiationPressure.js.map +1 -0
  35. package/lib/force/ThirdBodyGravity.d.ts +27 -0
  36. package/lib/force/ThirdBodyGravity.js +56 -0
  37. package/lib/force/ThirdBodyGravity.js.map +1 -0
  38. package/lib/force/Thrust.d.ts +35 -0
  39. package/lib/force/Thrust.js +53 -0
  40. package/lib/force/Thrust.js.map +1 -0
  41. package/lib/interpolator/ChebyshevCoefficients.d.ts +54 -0
  42. package/lib/interpolator/ChebyshevCoefficients.js +90 -0
  43. package/lib/interpolator/ChebyshevCoefficients.js.map +1 -0
  44. package/lib/interpolator/ChebyshevInterpolator.d.ts +39 -0
  45. package/lib/interpolator/ChebyshevInterpolator.js +71 -0
  46. package/lib/interpolator/ChebyshevInterpolator.js.map +1 -0
  47. package/lib/interpolator/CubicSpline.d.ts +36 -0
  48. package/lib/interpolator/CubicSpline.js +64 -0
  49. package/lib/interpolator/CubicSpline.js.map +1 -0
  50. package/lib/interpolator/CubicSplineInterpolator.d.ts +37 -0
  51. package/lib/interpolator/CubicSplineInterpolator.js +78 -0
  52. package/lib/interpolator/CubicSplineInterpolator.js.map +1 -0
  53. package/lib/interpolator/FieldInterpolator.d.ts +26 -0
  54. package/lib/interpolator/FieldInterpolator.js +31 -0
  55. package/lib/interpolator/FieldInterpolator.js.map +1 -0
  56. package/lib/interpolator/Interpolator.d.ts +23 -0
  57. package/lib/interpolator/Interpolator.js +48 -0
  58. package/lib/interpolator/Interpolator.js.map +1 -0
  59. package/lib/interpolator/LagrangeInterpolator.d.ts +42 -0
  60. package/lib/interpolator/LagrangeInterpolator.js +156 -0
  61. package/lib/interpolator/LagrangeInterpolator.js.map +1 -0
  62. package/lib/interpolator/StateInterpolator.d.ts +29 -0
  63. package/lib/interpolator/StateInterpolator.js +37 -0
  64. package/lib/interpolator/StateInterpolator.js.map +1 -0
  65. package/lib/interpolator/VerletBlendInterpolator.d.ts +44 -0
  66. package/lib/interpolator/VerletBlendInterpolator.js +115 -0
  67. package/lib/interpolator/VerletBlendInterpolator.js.map +1 -0
  68. package/lib/maneuver/TwoBurnOrbitTransfer.d.ts +43 -0
  69. package/lib/maneuver/TwoBurnOrbitTransfer.js +62 -0
  70. package/lib/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  71. package/lib/maneuver/Waypoint.d.ts +66 -0
  72. package/lib/maneuver/Waypoint.js +152 -0
  73. package/lib/maneuver/Waypoint.js.map +1 -0
  74. package/lib/objects/DetailedSatellite.d.ts +94 -0
  75. package/lib/objects/DetailedSatellite.js +140 -0
  76. package/lib/objects/DetailedSatellite.js.map +1 -0
  77. package/lib/objects/DetailedSensor.d.ts +43 -0
  78. package/lib/objects/DetailedSensor.js +45 -0
  79. package/lib/objects/DetailedSensor.js.map +1 -0
  80. package/lib/objects/{space-object.d.ts → LandObject.d.ts} +19 -21
  81. package/lib/objects/LandObject.js +28 -0
  82. package/lib/objects/LandObject.js.map +1 -0
  83. package/lib/objects/Marker.d.ts +21 -0
  84. package/lib/objects/Marker.js +25 -0
  85. package/lib/objects/Marker.js.map +1 -0
  86. package/lib/objects/index.d.ts +5 -4
  87. package/lib/objects/index.js +5 -4
  88. package/lib/objects/index.js.map +1 -1
  89. package/lib/observation/Observation.d.ts +51 -0
  90. package/lib/observation/Observation.js +71 -0
  91. package/lib/observation/Observation.js.map +1 -0
  92. package/lib/observation/ObservationOptical.d.ts +47 -0
  93. package/lib/observation/ObservationOptical.js +101 -0
  94. package/lib/observation/ObservationOptical.js.map +1 -0
  95. package/lib/observation/ObservationRadar.d.ts +43 -0
  96. package/lib/observation/ObservationRadar.js +90 -0
  97. package/lib/observation/ObservationRadar.js.map +1 -0
  98. package/lib/observation/ObservationUtils.d.ts +21 -0
  99. package/lib/observation/ObservationUtils.js +33 -0
  100. package/lib/observation/ObservationUtils.js.map +1 -0
  101. package/lib/observation/PropagatorPairs.d.ts +31 -0
  102. package/lib/observation/PropagatorPairs.js +40 -0
  103. package/lib/observation/PropagatorPairs.js.map +1 -0
  104. package/lib/ootk.d.ts +10 -9
  105. package/lib/ootk.js +10 -9
  106. package/lib/ootk.js.map +1 -1
  107. package/lib/operations/BoxMuller.d.ts +41 -0
  108. package/lib/operations/BoxMuller.js +66 -0
  109. package/lib/operations/BoxMuller.js.map +1 -0
  110. package/lib/operations/EulerAngles.d.ts +50 -0
  111. package/lib/operations/EulerAngles.js +111 -0
  112. package/lib/operations/EulerAngles.js.map +1 -0
  113. package/lib/operations/Quaternion.d.ts +57 -0
  114. package/lib/operations/Quaternion.js +164 -0
  115. package/lib/operations/Quaternion.js.map +1 -0
  116. package/lib/operations/RandomGaussianSource.d.ts +25 -0
  117. package/lib/operations/RandomGaussianSource.js +43 -0
  118. package/lib/operations/RandomGaussianSource.js.map +1 -0
  119. package/lib/operations/index.d.ts +4 -0
  120. package/lib/operations/index.js +5 -0
  121. package/lib/operations/index.js.map +1 -0
  122. package/lib/optimize/ChebyshevCompressor.d.ts +31 -0
  123. package/lib/optimize/ChebyshevCompressor.js +80 -0
  124. package/lib/optimize/ChebyshevCompressor.js.map +1 -0
  125. package/lib/optimize/DownhillSimplex.d.ts +50 -0
  126. package/lib/optimize/DownhillSimplex.js +168 -0
  127. package/lib/optimize/DownhillSimplex.js.map +1 -0
  128. package/lib/optimize/GoldenSection.d.ts +33 -0
  129. package/lib/optimize/GoldenSection.js +49 -0
  130. package/lib/optimize/GoldenSection.js.map +1 -0
  131. package/lib/optimize/PolynomialRegression.d.ts +37 -0
  132. package/lib/optimize/PolynomialRegression.js +66 -0
  133. package/lib/optimize/PolynomialRegression.js.map +1 -0
  134. package/lib/optimize/PolynomicalRegressionResult.d.ts +28 -0
  135. package/lib/optimize/PolynomicalRegressionResult.js +32 -0
  136. package/lib/optimize/PolynomicalRegressionResult.js.map +1 -0
  137. package/lib/optimize/SimpleLinearRegression.d.ts +41 -0
  138. package/lib/optimize/SimpleLinearRegression.js +107 -0
  139. package/lib/optimize/SimpleLinearRegression.js.map +1 -0
  140. package/lib/optimize/SimplexEntry.d.ts +33 -0
  141. package/lib/optimize/SimplexEntry.js +39 -0
  142. package/lib/optimize/SimplexEntry.js.map +1 -0
  143. package/lib/orbit_determination/BatchLeastSquaresOD.d.ts +54 -0
  144. package/lib/orbit_determination/BatchLeastSquaresOD.js +118 -0
  145. package/lib/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  146. package/lib/orbit_determination/BatchLeastSquaresResult.d.ts +29 -0
  147. package/lib/orbit_determination/BatchLeastSquaresResult.js +31 -0
  148. package/lib/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  149. package/lib/orbit_determination/GibbsIOD.d.ts +33 -0
  150. package/lib/orbit_determination/GibbsIOD.js +70 -0
  151. package/lib/orbit_determination/GibbsIOD.js.map +1 -0
  152. package/lib/orbit_determination/GoodingIOD.d.ts +52 -0
  153. package/lib/orbit_determination/GoodingIOD.js +244 -0
  154. package/lib/orbit_determination/GoodingIOD.js.map +1 -0
  155. package/{dist/objects/space-object.d.ts → lib/orbit_determination/HerrickGibbsIOD.d.ts} +17 -22
  156. package/lib/orbit_determination/HerrickGibbsIOD.js +49 -0
  157. package/lib/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  158. package/lib/orbit_determination/LambertIOD.d.ts +46 -0
  159. package/lib/orbit_determination/LambertIOD.js +199 -0
  160. package/lib/orbit_determination/LambertIOD.js.map +1 -0
  161. package/lib/orbit_determination/ModifiedGoodingIOD.d.ts +41 -0
  162. package/lib/orbit_determination/ModifiedGoodingIOD.js +82 -0
  163. package/lib/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  164. package/lib/propagator/DormandPrince54Propagator.d.ts +29 -0
  165. package/lib/propagator/DormandPrince54Propagator.js +68 -0
  166. package/lib/propagator/DormandPrince54Propagator.js.map +1 -0
  167. package/lib/propagator/KeplerPropagator.d.ts +36 -0
  168. package/lib/propagator/KeplerPropagator.js +81 -0
  169. package/lib/propagator/KeplerPropagator.js.map +1 -0
  170. package/lib/propagator/Propagator.d.ts +35 -0
  171. package/lib/propagator/Propagator.js +163 -0
  172. package/lib/propagator/Propagator.js.map +1 -0
  173. package/lib/propagator/RkCheckpoint.d.ts +23 -0
  174. package/lib/propagator/RkCheckpoint.js +26 -0
  175. package/lib/propagator/RkCheckpoint.js.map +1 -0
  176. package/lib/propagator/RkResult.d.ts +24 -0
  177. package/lib/propagator/RkResult.js +28 -0
  178. package/lib/propagator/RkResult.js.map +1 -0
  179. package/lib/propagator/RungeKutta4Propagator.d.ts +46 -0
  180. package/lib/propagator/RungeKutta4Propagator.js +132 -0
  181. package/lib/propagator/RungeKutta4Propagator.js.map +1 -0
  182. package/lib/propagator/RungeKutta89Propagator.d.ts +29 -0
  183. package/lib/propagator/RungeKutta89Propagator.js +130 -0
  184. package/lib/propagator/RungeKutta89Propagator.js.map +1 -0
  185. package/lib/propagator/RungeKuttaAdaptive.d.ts +52 -0
  186. package/lib/propagator/RungeKuttaAdaptive.js +152 -0
  187. package/lib/propagator/RungeKuttaAdaptive.js.map +1 -0
  188. package/lib/propagator/Sgp4Propagator.d.ts +35 -0
  189. package/lib/propagator/Sgp4Propagator.js +55 -0
  190. package/lib/propagator/Sgp4Propagator.js.map +1 -0
  191. package/lib/smoothing/ExponentialSmoothing.d.ts +24 -0
  192. package/lib/smoothing/ExponentialSmoothing.js +82 -0
  193. package/lib/smoothing/ExponentialSmoothing.js.map +1 -0
  194. package/lib/types/types.d.ts +68 -262
  195. package/lib/types/types.js +23 -33
  196. package/lib/types/types.js.map +1 -1
  197. package/package.json +28 -42
  198. package/codecov.yml +0 -21
  199. package/dist/objects/base-object.d.ts +0 -40
  200. package/dist/objects/detailed-sat.d.ts +0 -66
  201. package/dist/objects/index.d.ts +0 -4
  202. package/dist/objects/sat.d.ts +0 -92
  203. package/dist/objects/sensor.d.ts +0 -87
  204. package/dist/objects/star.d.ts +0 -46
  205. package/dist/ootk.js +0 -2
  206. package/dist/ootk.js.LICENSE.txt +0 -77
  207. package/dist/sgp4/Sgp4Assembly.d.ts +0 -5
  208. package/dist/sgp4/sgp4.d.ts +0 -82
  209. package/dist/tle/tle-format-data.d.ts +0 -6
  210. package/dist/tle/tle.d.ts +0 -374
  211. package/dist/transforms/transforms.d.ts +0 -55
  212. package/dist/types/types.d.ts +0 -280
  213. package/dist/utils/constants.d.ts +0 -34
  214. package/dist/utils/moon-math.d.ts +0 -113
  215. package/dist/utils/sun-math.d.ts +0 -230
  216. package/dist/utils/utils.d.ts +0 -39
  217. package/lib/objects/base-object.d.ts +0 -40
  218. package/lib/objects/base-object.js +0 -109
  219. package/lib/objects/base-object.js.map +0 -1
  220. package/lib/objects/detailed-sat.d.ts +0 -66
  221. package/lib/objects/detailed-sat.js +0 -149
  222. package/lib/objects/detailed-sat.js.map +0 -1
  223. package/lib/objects/sat.d.ts +0 -92
  224. package/lib/objects/sat.js +0 -188
  225. package/lib/objects/sat.js.map +0 -1
  226. package/lib/objects/sensor.d.ts +0 -87
  227. package/lib/objects/sensor.js +0 -255
  228. package/lib/objects/sensor.js.map +0 -1
  229. package/lib/objects/space-object.js +0 -60
  230. package/lib/objects/space-object.js.map +0 -1
  231. package/lib/objects/star.d.ts +0 -46
  232. package/lib/objects/star.js +0 -91
  233. package/lib/objects/star.js.map +0 -1
  234. package/lib/sgp4/Sgp4Assembly.d.ts +0 -5
  235. package/lib/sgp4/Sgp4Assembly.js +0 -75
  236. package/lib/sgp4/Sgp4Assembly.js.map +0 -1
  237. package/lib/sgp4/sgp4.d.ts +0 -82
  238. package/lib/sgp4/sgp4.js +0 -3274
  239. package/lib/sgp4/sgp4.js.map +0 -1
  240. package/lib/tle/tle-format-data.d.ts +0 -6
  241. package/lib/tle/tle-format-data.js +0 -10
  242. package/lib/tle/tle-format-data.js.map +0 -1
  243. package/lib/tle/tle.d.ts +0 -374
  244. package/lib/tle/tle.js +0 -611
  245. package/lib/tle/tle.js.map +0 -1
  246. package/lib/transforms/transforms.d.ts +0 -55
  247. package/lib/transforms/transforms.js +0 -209
  248. package/lib/transforms/transforms.js.map +0 -1
  249. package/lib/utils/constants.d.ts +0 -34
  250. package/lib/utils/constants.js +0 -35
  251. package/lib/utils/constants.js.map +0 -1
  252. package/lib/utils/moon-math.d.ts +0 -113
  253. package/lib/utils/moon-math.js +0 -387
  254. package/lib/utils/moon-math.js.map +0 -1
  255. package/lib/utils/sun-math.d.ts +0 -230
  256. package/lib/utils/sun-math.js +0 -422
  257. package/lib/utils/sun-math.js.map +0 -1
  258. package/lib/utils/utils.d.ts +0 -39
  259. package/lib/utils/utils.js +0 -100
  260. package/lib/utils/utils.js.map +0 -1
  261. package/sandbox.html +0 -8
  262. /package/{LICENSE.MD → LICENSE.md} +0 -0
@@ -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,109 +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
- // eslint-disable-next-line complexity
42
- BaseObject.prototype.getTypeString = function () {
43
- switch (this.type) {
44
- case SpaceObjectType.UNKNOWN:
45
- return 'Unknown';
46
- case SpaceObjectType.PAYLOAD:
47
- return 'Payload';
48
- case SpaceObjectType.ROCKET_BODY:
49
- return 'Rocket Body';
50
- case SpaceObjectType.DEBRIS:
51
- return 'Debris';
52
- case SpaceObjectType.SPECIAL:
53
- return 'Special';
54
- case SpaceObjectType.RADAR_MEASUREMENT:
55
- return 'Radar Measurement';
56
- case SpaceObjectType.RADAR_TRACK:
57
- return 'Radar Track';
58
- case SpaceObjectType.RADAR_OBJECT:
59
- return 'Radar Object';
60
- case SpaceObjectType.BALLISTIC_MISSILE:
61
- return 'Ballistic Missile';
62
- case SpaceObjectType.STAR:
63
- return 'Star';
64
- case SpaceObjectType.INTERGOVERNMENTAL_ORGANIZATION:
65
- return 'Intergovernmental Organization';
66
- case SpaceObjectType.SUBORBITAL_PAYLOAD_OPERATOR:
67
- return 'Suborbital Payload Operator';
68
- case SpaceObjectType.PAYLOAD_OWNER:
69
- return 'Payload Owner';
70
- case SpaceObjectType.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER:
71
- return 'Meteorological Rocket Launch Agency or Manufacturer';
72
- case SpaceObjectType.PAYLOAD_MANUFACTURER:
73
- return 'Payload Manufacturer';
74
- case SpaceObjectType.LAUNCH_AGENCY:
75
- return 'Launch Agency';
76
- case SpaceObjectType.LAUNCH_SITE:
77
- return 'Launch Site';
78
- case SpaceObjectType.LAUNCH_POSITION:
79
- return 'Launch Position';
80
- case SpaceObjectType.LAUNCH_FACILITY:
81
- return 'Launch Facility';
82
- case SpaceObjectType.CONTROL_FACILITY:
83
- return 'Control Facility';
84
- case SpaceObjectType.GROUND_SENSOR_STATION:
85
- return 'Ground Sensor Station';
86
- case SpaceObjectType.OPTICAL:
87
- return 'Optical';
88
- case SpaceObjectType.MECHANICAL:
89
- return 'Mechanical';
90
- case SpaceObjectType.PHASED_ARRAY_RADAR:
91
- return 'Phased Array Radar';
92
- case SpaceObjectType.OBSERVER:
93
- return 'Observer';
94
- case SpaceObjectType.BISTATIC_RADIO_TELESCOPE:
95
- return 'Bistatic Radio Telescope';
96
- case SpaceObjectType.COUNTRY:
97
- return 'Country';
98
- case SpaceObjectType.LAUNCH_VEHICLE_MANUFACTURER:
99
- return 'Launch Vehicle Manufacturer';
100
- case SpaceObjectType.ENGINE_MANUFACTURER:
101
- return 'Engine Manufacturer';
102
- default:
103
- return 'Unknown';
104
- }
105
- };
106
- return BaseObject;
107
- }());
108
- export { BaseObject };
109
- //# sourceMappingURL=base-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-object.js","sourceRoot":"","sources":["../../src/objects/base-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IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AA5FD,IA4FC"}
@@ -1,66 +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
- import { LaunchDetails, OperationsDetails, SpaceCraftDetails, SpaceObjectType } from '../types/types';
24
- import { Sat } from './sat';
25
- interface ObjectInfo {
26
- name?: string;
27
- type?: SpaceObjectType;
28
- rcs?: number;
29
- vmag?: number;
30
- tle1: string;
31
- tle2: string;
32
- }
33
- export declare class DetailedSat extends Sat {
34
- launchDate: string;
35
- launchMass: string;
36
- launchSite: string;
37
- launchVehicle: string;
38
- lifetime: string | number;
39
- maneuver: string;
40
- manufacturer: string;
41
- motor: string;
42
- power: string;
43
- payload: string;
44
- purpose: string;
45
- shape: string;
46
- span: string;
47
- user: string;
48
- mission: string;
49
- owner: string;
50
- configuration: string;
51
- equipment: string;
52
- dryMass: string;
53
- country: string;
54
- constructor(info: ObjectInfo, options: any, details: {
55
- launchDetails: LaunchDetails;
56
- spaceCraftDetails: SpaceCraftDetails;
57
- operationsDetails: OperationsDetails;
58
- });
59
- setLaunchDetails(details: LaunchDetails): void;
60
- getLaunchDetails(): LaunchDetails;
61
- setSpaceCraftDetails(details: SpaceCraftDetails): void;
62
- getSpaceCraftDetails(): SpaceCraftDetails;
63
- setOperationsDetails(details: OperationsDetails): void;
64
- getOperationsDetails(): OperationsDetails;
65
- }
66
- export {};
@@ -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;;;;;;;;;;;;;;;;AAIH,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,oBAAoB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;;IACvD,CAAC;IAEM,sCAAgB,GAAvB,UAAwB,OAAsB;QAC5C,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;SACtC;QACD,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;SACtC;QACD,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,UAAU,GAAG,OAAO,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EM,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,92 +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 Sat class provides functions for calculating satellites positions relative
7
- * to earth based sensors and other orbital 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 { EcfVec3, EciVec3, LlaVec3, RaeVec3, SatelliteRecord, SpaceObjectType, StateVector } from '../types/types';
24
- import { Sensor } from './sensor';
25
- import { SpaceObject } from './space-object';
26
- interface ObjectInfo {
27
- name?: string;
28
- type?: SpaceObjectType;
29
- rcs?: number;
30
- vmag?: number;
31
- tle1: string;
32
- tle2: string;
33
- }
34
- export declare class Sat extends SpaceObject {
35
- satNum: number;
36
- satrec: SatelliteRecord;
37
- intlDes: string;
38
- epochYear: number;
39
- epochDay: number;
40
- meanMoDev1: number;
41
- meanMoDev2: number;
42
- bstar: number;
43
- inclination: number;
44
- raan: number;
45
- eccentricity: number;
46
- argOfPerigee: number;
47
- meanAnomaly: number;
48
- meanMotion: number;
49
- period: number;
50
- apogee: number;
51
- perigee: number;
52
- options: any;
53
- constructor(info: ObjectInfo, options: any);
54
- propagateTo(date: Date): Sat;
55
- /**
56
- * Calculates position and velocity in ECI coordinates at a given time.
57
- * @param {Date} date Date to calculate the state vector for
58
- * @returns {StateVector} State vector for the given date
59
- */
60
- getStateVec(date?: Date): StateVector;
61
- /**
62
- * Calculates ECI position at a given time.
63
- * @param {Date} date Date to calculate
64
- * @returns {EciVec3} ECI position vector
65
- */
66
- getEci(date?: Date): EciVec3;
67
- /**
68
- * Calculates ECF position at a given time.
69
- * @param {Date} date Date to calculate
70
- * @returns {EcfVec3} ECF position vector
71
- */
72
- getEcf(date?: Date): EcfVec3;
73
- /**
74
- * Calculates LLA position at a given time.
75
- * @param {Date} date Date to calculate
76
- * @returns {LlaVec3} LLA position vector
77
- */
78
- getLla(date?: Date): LlaVec3;
79
- getRae(sensor: Sensor, date?: Date): RaeVec3;
80
- getAzimuth(sensor: Sensor, date?: Date): number;
81
- getElevation(sensor: Sensor, date?: Date): number;
82
- getRange(sensor: Sensor, date?: Date): number;
83
- /**
84
- * Calculates the time variables for a given date relative to the TLE epoch.
85
- * @param {Date} date Date to calculate
86
- * @param {SatelliteRecord} satrec Satellite orbital information
87
- * @returns {{m: number, gmst: GreenwichMeanSiderealTime, j: number}} Time variables
88
- */
89
- private static calculateTimeVariables;
90
- static checkSatrec(satrec: SatelliteRecord): boolean;
91
- }
92
- export {};
@@ -1,188 +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 Sat class provides functions for calculating satellites positions relative
7
- * to earth based sensors and other orbital 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
- 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 { DAY_TO_MS, MINUTES_PER_DAY } from '../utils/constants';
39
- import { Sgp4 } from '../sgp4/sgp4';
40
- import { SpaceObject } from './space-object';
41
- import { Tle } from '../tle/tle';
42
- import { Transforms } from '../transforms/transforms';
43
- import { Utils } from '../utils/utils';
44
- var Sat = /** @class */ (function (_super) {
45
- __extends(Sat, _super);
46
- function Sat(info, options) {
47
- var _this = _super.call(this, info) || this;
48
- var tleData = Tle.parseTle(info.tle1, info.tle2);
49
- _this.satNum = tleData.satNum;
50
- _this.intlDes = tleData.intlDes;
51
- _this.epochYear = tleData.epochYear;
52
- _this.epochDay = tleData.epochDay;
53
- _this.meanMoDev1 = tleData.meanMoDev1;
54
- _this.meanMoDev2 = tleData.meanMoDev2;
55
- _this.bstar = tleData.bstar;
56
- _this.inclination = tleData.inclination;
57
- _this.raan = tleData.raan;
58
- _this.eccentricity = tleData.eccentricity;
59
- _this.argOfPerigee = tleData.argOfPerigee;
60
- _this.meanAnomaly = tleData.meanAnomaly;
61
- _this.meanMotion = tleData.meanMotion;
62
- _this.period = 1440 / _this.meanMotion;
63
- // NOTE: Calculate apogee and perigee
64
- _this.satrec = Sgp4.createSatrec(info.tle1, info.tle2);
65
- _this.options = options;
66
- return _this;
67
- }
68
- Sat.prototype.propagateTo = function (date) {
69
- var m = Sat.calculateTimeVariables(date, this.satrec).m;
70
- var eci = Sgp4.propagate(this.satrec, m).position || {
71
- x: 0,
72
- y: 0,
73
- z: 0,
74
- };
75
- this.position = eci;
76
- this.time = date;
77
- return this;
78
- };
79
- /**
80
- * Calculates position and velocity in ECI coordinates at a given time.
81
- * @param {Date} date Date to calculate the state vector for
82
- * @returns {StateVector} State vector for the given date
83
- */
84
- Sat.prototype.getStateVec = function (date) {
85
- if (date === void 0) { date = this.time; }
86
- var m = Sat.calculateTimeVariables(date, this.satrec).m;
87
- return Sgp4.propagate(this.satrec, m);
88
- };
89
- /**
90
- * Calculates ECI position at a given time.
91
- * @param {Date} date Date to calculate
92
- * @returns {EciVec3} ECI position vector
93
- */
94
- Sat.prototype.getEci = function (date) {
95
- if (date === void 0) { date = this.time; }
96
- var m = Sat.calculateTimeVariables(date, this.satrec).m;
97
- var eci = Sgp4.propagate(this.satrec, m).position || {
98
- x: 0,
99
- y: 0,
100
- z: 0,
101
- };
102
- return eci;
103
- };
104
- /**
105
- * Calculates ECF position at a given time.
106
- * @param {Date} date Date to calculate
107
- * @returns {EcfVec3} ECF position vector
108
- */
109
- Sat.prototype.getEcf = function (date) {
110
- if (date === void 0) { date = this.time; }
111
- var _a = Sat.calculateTimeVariables(date, this.satrec), m = _a.m, gmst = _a.gmst;
112
- var eci = Sgp4.propagate(this.satrec, m).position || {
113
- x: 0,
114
- y: 0,
115
- z: 0,
116
- };
117
- return Transforms.eci2ecf(eci, gmst);
118
- };
119
- /**
120
- * Calculates LLA position at a given time.
121
- * @param {Date} date Date to calculate
122
- * @returns {LlaVec3} LLA position vector
123
- */
124
- Sat.prototype.getLla = function (date) {
125
- if (date === void 0) { date = this.time; }
126
- var _a = Sat.calculateTimeVariables(date, this.satrec), m = _a.m, gmst = _a.gmst;
127
- var eci = Sgp4.propagate(this.satrec, m).position || {
128
- x: 0,
129
- y: 0,
130
- z: 0,
131
- };
132
- return Transforms.eci2lla(eci, gmst);
133
- };
134
- Sat.prototype.getRae = function (sensor, date) {
135
- if (date === void 0) { date = this.time; }
136
- var _a = Sat.calculateTimeVariables(date, this.satrec), m = _a.m, gmst = _a.gmst;
137
- var eci = Sgp4.propagate(this.satrec, m).position || {
138
- x: 0,
139
- y: 0,
140
- z: 0,
141
- };
142
- var ecf = Transforms.eci2ecf(eci, gmst);
143
- return Transforms.ecf2rae({ lat: sensor.lat, lon: sensor.lon, alt: sensor.alt }, ecf);
144
- };
145
- Sat.prototype.getAzimuth = function (sensor, date) {
146
- if (date === void 0) { date = this.time; }
147
- var rae = this.getRae(sensor, date);
148
- return rae.az;
149
- };
150
- Sat.prototype.getElevation = function (sensor, date) {
151
- if (date === void 0) { date = this.time; }
152
- var rae = this.getRae(sensor, date);
153
- return rae.el;
154
- };
155
- Sat.prototype.getRange = function (sensor, date) {
156
- if (date === void 0) { date = this.time; }
157
- var rae = this.getRae(sensor, date);
158
- return rae.rng;
159
- };
160
- /**
161
- * Calculates the time variables for a given date relative to the TLE epoch.
162
- * @param {Date} date Date to calculate
163
- * @param {SatelliteRecord} satrec Satellite orbital information
164
- * @returns {{m: number, gmst: GreenwichMeanSiderealTime, j: number}} Time variables
165
- */
166
- Sat.calculateTimeVariables = function (date, satrec) {
167
- var j = Utils.jday(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) +
168
- date.getUTCMilliseconds() * DAY_TO_MS;
169
- var gmst = Sgp4.gstime(j);
170
- var m = satrec ? (j - satrec.jdsatepoch) * MINUTES_PER_DAY : null;
171
- return { gmst: gmst, m: m, j: j };
172
- };
173
- Sat.checkSatrec = function (satrec) {
174
- if (isNaN(satrec.a) ||
175
- isNaN(satrec.am) ||
176
- isNaN(satrec.alta) ||
177
- isNaN(satrec.em) ||
178
- isNaN(satrec.mo) ||
179
- isNaN(satrec.ecco) ||
180
- isNaN(satrec.no)) {
181
- return false;
182
- }
183
- return true;
184
- };
185
- return Sat;
186
- }(SpaceObject));
187
- export { Sat };
188
- //# sourceMappingURL=sat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sat.js","sourceRoot":"","sources":["../../src/objects/sat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAchE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAWvC;IAAyB,uBAAW;IAsBlC,aAAY,IAAgB,EAAE,OAAO;QAArC,YACE,kBAAM,IAAI,CAAC,SAuBZ;QArBC,IAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnD,KAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,KAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,KAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;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