ootk 3.0.0 → 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 (261) hide show
  1. package/.eslintrc.json +10 -10
  2. package/CHANGELOG.md +122 -0
  3. package/README.md +27 -40
  4. package/lib/coordinate/Hill.d.ts +50 -0
  5. package/lib/coordinate/Hill.js +214 -0
  6. package/lib/coordinate/Hill.js.map +1 -0
  7. package/lib/coordinate/index.d.ts +1 -0
  8. package/lib/coordinate/index.js +2 -0
  9. package/lib/coordinate/index.js.map +1 -0
  10. package/lib/covariance/CovarianceSample.d.ts +44 -0
  11. package/lib/covariance/CovarianceSample.js +146 -0
  12. package/lib/covariance/CovarianceSample.js.map +1 -0
  13. package/lib/covariance/StateCovariance.d.ts +41 -0
  14. package/lib/covariance/StateCovariance.js +62 -0
  15. package/lib/covariance/StateCovariance.js.map +1 -0
  16. package/lib/force/AtmosphericDrag.d.ts +32 -0
  17. package/lib/force/AtmosphericDrag.js +66 -0
  18. package/lib/force/AtmosphericDrag.js.map +1 -0
  19. package/lib/force/EarthGravity.d.ts +28 -0
  20. package/lib/force/EarthGravity.js +115 -0
  21. package/lib/force/EarthGravity.js.map +1 -0
  22. package/{dist/ootk.d.ts → lib/force/Force.d.ts} +10 -10
  23. package/lib/force/Force.js +30 -0
  24. package/lib/force/Force.js.map +1 -0
  25. package/lib/force/ForceModel.d.ts +38 -0
  26. package/lib/force/ForceModel.js +71 -0
  27. package/lib/force/ForceModel.js.map +1 -0
  28. package/lib/force/Gravity.d.ts +41 -0
  29. package/lib/force/Gravity.js +48 -0
  30. package/lib/force/Gravity.js.map +1 -0
  31. package/lib/force/SolarRadiationPressure.d.ts +27 -0
  32. package/lib/force/SolarRadiationPressure.js +42 -0
  33. package/lib/force/SolarRadiationPressure.js.map +1 -0
  34. package/lib/force/ThirdBodyGravity.d.ts +27 -0
  35. package/lib/force/ThirdBodyGravity.js +56 -0
  36. package/lib/force/ThirdBodyGravity.js.map +1 -0
  37. package/lib/force/Thrust.d.ts +35 -0
  38. package/lib/force/Thrust.js +53 -0
  39. package/lib/force/Thrust.js.map +1 -0
  40. package/lib/interpolator/ChebyshevCoefficients.d.ts +54 -0
  41. package/lib/interpolator/ChebyshevCoefficients.js +90 -0
  42. package/lib/interpolator/ChebyshevCoefficients.js.map +1 -0
  43. package/lib/interpolator/ChebyshevInterpolator.d.ts +39 -0
  44. package/lib/interpolator/ChebyshevInterpolator.js +71 -0
  45. package/lib/interpolator/ChebyshevInterpolator.js.map +1 -0
  46. package/lib/interpolator/CubicSpline.d.ts +36 -0
  47. package/lib/interpolator/CubicSpline.js +64 -0
  48. package/lib/interpolator/CubicSpline.js.map +1 -0
  49. package/lib/interpolator/CubicSplineInterpolator.d.ts +37 -0
  50. package/lib/interpolator/CubicSplineInterpolator.js +78 -0
  51. package/lib/interpolator/CubicSplineInterpolator.js.map +1 -0
  52. package/lib/interpolator/FieldInterpolator.d.ts +26 -0
  53. package/lib/interpolator/FieldInterpolator.js +31 -0
  54. package/lib/interpolator/FieldInterpolator.js.map +1 -0
  55. package/lib/interpolator/Interpolator.d.ts +23 -0
  56. package/lib/interpolator/Interpolator.js +48 -0
  57. package/lib/interpolator/Interpolator.js.map +1 -0
  58. package/lib/interpolator/LagrangeInterpolator.d.ts +42 -0
  59. package/lib/interpolator/LagrangeInterpolator.js +156 -0
  60. package/lib/interpolator/LagrangeInterpolator.js.map +1 -0
  61. package/lib/interpolator/StateInterpolator.d.ts +29 -0
  62. package/lib/interpolator/StateInterpolator.js +37 -0
  63. package/lib/interpolator/StateInterpolator.js.map +1 -0
  64. package/lib/interpolator/VerletBlendInterpolator.d.ts +44 -0
  65. package/lib/interpolator/VerletBlendInterpolator.js +115 -0
  66. package/lib/interpolator/VerletBlendInterpolator.js.map +1 -0
  67. package/lib/maneuver/TwoBurnOrbitTransfer.d.ts +43 -0
  68. package/lib/maneuver/TwoBurnOrbitTransfer.js +62 -0
  69. package/lib/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
  70. package/lib/maneuver/Waypoint.d.ts +66 -0
  71. package/lib/maneuver/Waypoint.js +152 -0
  72. package/lib/maneuver/Waypoint.js.map +1 -0
  73. package/lib/objects/DetailedSatellite.d.ts +94 -0
  74. package/lib/objects/DetailedSatellite.js +140 -0
  75. package/lib/objects/DetailedSatellite.js.map +1 -0
  76. package/lib/objects/DetailedSensor.d.ts +43 -0
  77. package/lib/objects/DetailedSensor.js +45 -0
  78. package/lib/objects/DetailedSensor.js.map +1 -0
  79. package/{dist/objects/space-object.d.ts → lib/objects/LandObject.d.ts} +19 -21
  80. package/lib/objects/LandObject.js +28 -0
  81. package/lib/objects/LandObject.js.map +1 -0
  82. package/lib/objects/Marker.d.ts +21 -0
  83. package/lib/objects/Marker.js +25 -0
  84. package/lib/objects/Marker.js.map +1 -0
  85. package/lib/objects/index.d.ts +5 -4
  86. package/lib/objects/index.js +5 -4
  87. package/lib/objects/index.js.map +1 -1
  88. package/lib/observation/Observation.d.ts +51 -0
  89. package/lib/observation/Observation.js +71 -0
  90. package/lib/observation/Observation.js.map +1 -0
  91. package/lib/observation/ObservationOptical.d.ts +47 -0
  92. package/lib/observation/ObservationOptical.js +101 -0
  93. package/lib/observation/ObservationOptical.js.map +1 -0
  94. package/lib/observation/ObservationRadar.d.ts +43 -0
  95. package/lib/observation/ObservationRadar.js +90 -0
  96. package/lib/observation/ObservationRadar.js.map +1 -0
  97. package/lib/observation/ObservationUtils.d.ts +21 -0
  98. package/lib/observation/ObservationUtils.js +33 -0
  99. package/lib/observation/ObservationUtils.js.map +1 -0
  100. package/lib/observation/PropagatorPairs.d.ts +31 -0
  101. package/lib/observation/PropagatorPairs.js +40 -0
  102. package/lib/observation/PropagatorPairs.js.map +1 -0
  103. package/lib/ootk.d.ts +10 -8
  104. package/lib/ootk.js +10 -8
  105. package/lib/ootk.js.map +1 -1
  106. package/lib/operations/BoxMuller.d.ts +41 -0
  107. package/lib/operations/BoxMuller.js +66 -0
  108. package/lib/operations/BoxMuller.js.map +1 -0
  109. package/lib/operations/EulerAngles.d.ts +50 -0
  110. package/lib/operations/EulerAngles.js +111 -0
  111. package/lib/operations/EulerAngles.js.map +1 -0
  112. package/lib/operations/Quaternion.d.ts +57 -0
  113. package/lib/operations/Quaternion.js +164 -0
  114. package/lib/operations/Quaternion.js.map +1 -0
  115. package/lib/operations/RandomGaussianSource.d.ts +25 -0
  116. package/lib/operations/RandomGaussianSource.js +43 -0
  117. package/lib/operations/RandomGaussianSource.js.map +1 -0
  118. package/lib/operations/index.d.ts +4 -0
  119. package/lib/operations/index.js +5 -0
  120. package/lib/operations/index.js.map +1 -0
  121. package/lib/optimize/ChebyshevCompressor.d.ts +31 -0
  122. package/lib/optimize/ChebyshevCompressor.js +80 -0
  123. package/lib/optimize/ChebyshevCompressor.js.map +1 -0
  124. package/lib/optimize/DownhillSimplex.d.ts +50 -0
  125. package/lib/optimize/DownhillSimplex.js +168 -0
  126. package/lib/optimize/DownhillSimplex.js.map +1 -0
  127. package/lib/optimize/GoldenSection.d.ts +33 -0
  128. package/lib/optimize/GoldenSection.js +49 -0
  129. package/lib/optimize/GoldenSection.js.map +1 -0
  130. package/lib/optimize/PolynomialRegression.d.ts +37 -0
  131. package/lib/optimize/PolynomialRegression.js +66 -0
  132. package/lib/optimize/PolynomialRegression.js.map +1 -0
  133. package/lib/optimize/PolynomicalRegressionResult.d.ts +28 -0
  134. package/lib/optimize/PolynomicalRegressionResult.js +32 -0
  135. package/lib/optimize/PolynomicalRegressionResult.js.map +1 -0
  136. package/lib/optimize/SimpleLinearRegression.d.ts +41 -0
  137. package/lib/optimize/SimpleLinearRegression.js +107 -0
  138. package/lib/optimize/SimpleLinearRegression.js.map +1 -0
  139. package/lib/optimize/SimplexEntry.d.ts +33 -0
  140. package/lib/optimize/SimplexEntry.js +39 -0
  141. package/lib/optimize/SimplexEntry.js.map +1 -0
  142. package/lib/orbit_determination/BatchLeastSquaresOD.d.ts +54 -0
  143. package/lib/orbit_determination/BatchLeastSquaresOD.js +118 -0
  144. package/lib/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
  145. package/lib/orbit_determination/BatchLeastSquaresResult.d.ts +29 -0
  146. package/lib/orbit_determination/BatchLeastSquaresResult.js +31 -0
  147. package/lib/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
  148. package/lib/orbit_determination/GibbsIOD.d.ts +33 -0
  149. package/lib/orbit_determination/GibbsIOD.js +70 -0
  150. package/lib/orbit_determination/GibbsIOD.js.map +1 -0
  151. package/lib/orbit_determination/GoodingIOD.d.ts +52 -0
  152. package/lib/orbit_determination/GoodingIOD.js +244 -0
  153. package/lib/orbit_determination/GoodingIOD.js.map +1 -0
  154. package/lib/{objects/space-object.d.ts → orbit_determination/HerrickGibbsIOD.d.ts} +17 -22
  155. package/lib/orbit_determination/HerrickGibbsIOD.js +49 -0
  156. package/lib/orbit_determination/HerrickGibbsIOD.js.map +1 -0
  157. package/lib/orbit_determination/LambertIOD.d.ts +46 -0
  158. package/lib/orbit_determination/LambertIOD.js +199 -0
  159. package/lib/orbit_determination/LambertIOD.js.map +1 -0
  160. package/lib/orbit_determination/ModifiedGoodingIOD.d.ts +41 -0
  161. package/lib/orbit_determination/ModifiedGoodingIOD.js +82 -0
  162. package/lib/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
  163. package/lib/propagator/DormandPrince54Propagator.d.ts +29 -0
  164. package/lib/propagator/DormandPrince54Propagator.js +68 -0
  165. package/lib/propagator/DormandPrince54Propagator.js.map +1 -0
  166. package/lib/propagator/KeplerPropagator.d.ts +36 -0
  167. package/lib/propagator/KeplerPropagator.js +81 -0
  168. package/lib/propagator/KeplerPropagator.js.map +1 -0
  169. package/lib/propagator/Propagator.d.ts +35 -0
  170. package/lib/propagator/Propagator.js +163 -0
  171. package/lib/propagator/Propagator.js.map +1 -0
  172. package/lib/propagator/RkCheckpoint.d.ts +23 -0
  173. package/lib/propagator/RkCheckpoint.js +26 -0
  174. package/lib/propagator/RkCheckpoint.js.map +1 -0
  175. package/lib/propagator/RkResult.d.ts +24 -0
  176. package/lib/propagator/RkResult.js +28 -0
  177. package/lib/propagator/RkResult.js.map +1 -0
  178. package/lib/propagator/RungeKutta4Propagator.d.ts +46 -0
  179. package/lib/propagator/RungeKutta4Propagator.js +132 -0
  180. package/lib/propagator/RungeKutta4Propagator.js.map +1 -0
  181. package/lib/propagator/RungeKutta89Propagator.d.ts +29 -0
  182. package/lib/propagator/RungeKutta89Propagator.js +130 -0
  183. package/lib/propagator/RungeKutta89Propagator.js.map +1 -0
  184. package/lib/propagator/RungeKuttaAdaptive.d.ts +52 -0
  185. package/lib/propagator/RungeKuttaAdaptive.js +152 -0
  186. package/lib/propagator/RungeKuttaAdaptive.js.map +1 -0
  187. package/lib/propagator/Sgp4Propagator.d.ts +35 -0
  188. package/lib/propagator/Sgp4Propagator.js +55 -0
  189. package/lib/propagator/Sgp4Propagator.js.map +1 -0
  190. package/lib/smoothing/ExponentialSmoothing.d.ts +24 -0
  191. package/lib/smoothing/ExponentialSmoothing.js +82 -0
  192. package/lib/smoothing/ExponentialSmoothing.js.map +1 -0
  193. package/lib/types/types.d.ts +65 -584
  194. package/lib/types/types.js +21 -33
  195. package/lib/types/types.js.map +1 -1
  196. package/package.json +16 -14
  197. package/.prettierrc +0 -17
  198. package/babel.config.js +0 -16
  199. package/codecov.yml +0 -21
  200. package/dist/objects/base-object.d.ts +0 -40
  201. package/dist/objects/detailed-sat.d.ts +0 -66
  202. package/dist/objects/index.d.ts +0 -4
  203. package/dist/objects/sat.d.ts +0 -92
  204. package/dist/objects/sensor.d.ts +0 -93
  205. package/dist/objects/star.d.ts +0 -46
  206. package/dist/ootk.js +0 -2
  207. package/dist/ootk.js.LICENSE.txt +0 -77
  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 -375
  211. package/dist/transforms/transforms.d.ts +0 -94
  212. package/dist/types/types.d.ts +0 -605
  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 -79
  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 -93
  227. package/lib/objects/sensor.js +0 -273
  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/sgp4.d.ts +0 -82
  235. package/lib/sgp4/sgp4.js +0 -3262
  236. package/lib/sgp4/sgp4.js.map +0 -1
  237. package/lib/tle/tle-format-data.d.ts +0 -6
  238. package/lib/tle/tle-format-data.js +0 -10
  239. package/lib/tle/tle-format-data.js.map +0 -1
  240. package/lib/tle/tle.d.ts +0 -375
  241. package/lib/tle/tle.js +0 -611
  242. package/lib/tle/tle.js.map +0 -1
  243. package/lib/transforms/transforms.d.ts +0 -94
  244. package/lib/transforms/transforms.js +0 -308
  245. package/lib/transforms/transforms.js.map +0 -1
  246. package/lib/utils/constants.d.ts +0 -34
  247. package/lib/utils/constants.js +0 -35
  248. package/lib/utils/constants.js.map +0 -1
  249. package/lib/utils/moon-math.d.ts +0 -113
  250. package/lib/utils/moon-math.js +0 -387
  251. package/lib/utils/moon-math.js.map +0 -1
  252. package/lib/utils/sun-math.d.ts +0 -230
  253. package/lib/utils/sun-math.js +0 -422
  254. package/lib/utils/sun-math.js.map +0 -1
  255. package/lib/utils/utils.d.ts +0 -39
  256. package/lib/utils/utils.js +0 -102
  257. package/lib/utils/utils.js.map +0 -1
  258. package/sandbox.html +0 -8
  259. package/tsconfig.base.json +0 -31
  260. package/tsconfig.build.json +0 -14
  261. /package/{LICENSE.MD → LICENSE.md} +0 -0
@@ -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,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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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,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, TleLine1, TleLine2 } 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: TleLine1;
32
- tle2: TleLine2;
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 ? 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;AAgBhE,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,OAAQ;QAAtC,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,CAA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AAC,CAAC;YACf,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAChB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YAClB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAChB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAChB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YAClB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAChB;YACA,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IACH,UAAC;AAAD,CAAC,AAjMD,CAAyB,WAAW,GAiMnC"}
@@ -1,93 +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 Sensor class is used for creating ground based observers.
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 { Degrees, Kilometers, Radians, RaeVec3, SpaceObjectType } from '../types/types';
23
- import { BaseObject } from './base-object';
24
- import { Sat } from './sat';
25
- interface ObjectInfo {
26
- name?: string;
27
- type?: SpaceObjectType;
28
- lat: Radians;
29
- lon: Radians;
30
- alt: Kilometers;
31
- minAz?: Degrees;
32
- maxAz?: Degrees;
33
- minEl?: Degrees;
34
- maxEl?: Degrees;
35
- minRng?: Kilometers;
36
- maxRng?: Kilometers;
37
- }
38
- export declare enum PassType {
39
- OUT_OF_VIEW = -1,
40
- ENTER = 0,
41
- IN_VIEW = 1,
42
- EXIT = 2
43
- }
44
- type Lookangles = {
45
- type: PassType;
46
- time: Date;
47
- az: Degrees;
48
- el: Degrees;
49
- rng: Kilometers;
50
- maxElPass?: Degrees;
51
- };
52
- export declare class Sensor extends BaseObject {
53
- lat: Radians;
54
- lon: Radians;
55
- alt: Kilometers;
56
- minAz: Degrees;
57
- maxAz: Degrees;
58
- minEl: Degrees;
59
- maxEl: Degrees;
60
- minRng: Kilometers;
61
- maxRng: Kilometers;
62
- /**
63
- * * name: Name as a string - OPTIONAL
64
- * * type: SpaceObjectType - OPTIONAL
65
- * * lat: Latitude in Radians
66
- * * lon: Longitude in Radians
67
- * * alt: Altitude in Kilometers
68
- * * minAz: Minimum Azimuth in Degrees
69
- * * maxAz: Maximum Azimuth in Degrees
70
- * * minEl: Minimum Elevation in Degrees
71
- * * maxEl: Maximum Elevation in Degrees
72
- * * minRng: Minimum Range in Kilometers
73
- * * maxRng: Maximum Range in Kilometers
74
- * @param {ObjectInfo} info ObjectInfo object containing the object's information
75
- */
76
- constructor(info: ObjectInfo);
77
- private validateInputData;
78
- private validateFov;
79
- private validateMaxRng;
80
- private validateMinRng;
81
- private validateMaxEl;
82
- private validateMinEl;
83
- private validateMaxAz;
84
- private validateMinAz;
85
- private validateLla;
86
- setTime(date: Date): this;
87
- getRae(sat: Sat, date?: Date): RaeVec3;
88
- isRaeInFov(rae: RaeVec3): boolean;
89
- isSatInFov(sat: Sat, date?: Date): boolean;
90
- calculatePasses(planningInterval: number, sat: Sat, date?: Date): Lookangles[];
91
- private static getPassType_;
92
- }
93
- export {};