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
@@ -0,0 +1,152 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { RIC, Vector3D } from 'ootk-core';
19
+ import { Thrust } from '../force/Thrust';
20
+ import { ForceModel } from './../force/ForceModel';
21
+ import { DownhillSimplex } from './../optimize/DownhillSimplex';
22
+ import { LambertIOD } from './../orbit_determination/LambertIOD';
23
+ import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator';
24
+ // / Relative waypoint targeting.
25
+ export class Waypoint {
26
+ // / Create a new [Waypoint] object.
27
+ constructor(epoch, relativePosition) {
28
+ this.epoch = epoch;
29
+ this.relativePosition = relativePosition;
30
+ }
31
+ /**
32
+ * Return the perturbed error in a [maneuver] when compared against the
33
+ * target [waypoint] given an initial [state], [forceModel],
34
+ * [target] interpolator, and speculative relative maneuver
35
+ * [components] _(m/s)_.
36
+ */
37
+ static _error(waypoint, maneuver, state, forceModel, target, components) {
38
+ const testManeuver = new Thrust(maneuver.center, components[0], components[1], components[2], maneuver.durationRate);
39
+ const propagator = new RungeKutta89Propagator(state, forceModel);
40
+ const maneuverSteps = propagator.maneuver(testManeuver);
41
+ const postManeuver = maneuverSteps[maneuverSteps.length - 1];
42
+ const interceptor = new RungeKutta89Propagator(postManeuver, forceModel).propagate(waypoint.epoch);
43
+ const targetState = target.interpolate(waypoint.epoch);
44
+ if (targetState === null) {
45
+ throw new Error('Error calculation failed; epoch is outside the target interpolator ephemeris window.');
46
+ }
47
+ const expected = waypoint.relativePosition;
48
+ const actual = RIC.fromJ2000(interceptor, targetState);
49
+ return actual.position.distance(expected);
50
+ }
51
+ /**
52
+ * Generate a score function for refining perturbed [waypoint] maneuvers.
53
+ *
54
+ * The score function takes an array of speculative radial, intrack, and
55
+ * crosstrack components _(m/s)_ and returns the propagated error from the
56
+ * desired waypoint target.
57
+ */
58
+ static _refineManeuverScore(waypoint, maneuver, state, forceModel, target) {
59
+ return (components) => Waypoint._error(waypoint, maneuver, state, forceModel, target, components);
60
+ }
61
+ /**
62
+ * Convert an array of [waypoints] into a maneuver sequence given an
63
+ * [interceptor] state, [pivot] epoch for the first burn to arrive at the
64
+ * first waypoint, and [target] ephemeris interpolator.
65
+ *
66
+ * Optional arguments are as follows:
67
+ * - `preManeuvers`: maneuvers to execute before the pivot burn
68
+ * - `postManeuvers`: maneuvers to execute after the last pivot burn
69
+ * - `durationRate`: thruster duration rate _(s/m/s)_
70
+ * - `forceModel`: interceptor force model, defaults to two-body
71
+ * - `refine`: refine maneuvers to account for perturbations if `true`
72
+ * - `maxIter`: maximum refinement iterations per maneuver
73
+ * - `printIter`: print debug information on each refinement iteration
74
+ */
75
+ static toManeuvers(interceptor, pivot, waypoints, target, preManeuvers, postManeuvers, { durationRate = 0.0, forceModel, refine = false, maxIter = 500, printIter = false, } = {}) {
76
+ const preMnv = preManeuvers ?? [];
77
+ const postMnv = postManeuvers ?? [];
78
+ let state = interceptor;
79
+ if (preMnv.length > 0) {
80
+ for (const maneuver of preMnv) {
81
+ const mvrStep = new RungeKutta89Propagator(state, forceModel).maneuver(maneuver);
82
+ state = mvrStep[mvrStep.length - 1];
83
+ }
84
+ }
85
+ state = new RungeKutta89Propagator(state, forceModel).propagate(pivot);
86
+ const pivotState = state;
87
+ let waypointManeuvers = [];
88
+ for (const wp of waypoints) {
89
+ const targetWp = new RIC(wp.relativePosition, Vector3D.origin);
90
+ const targetState = target.interpolate(wp.epoch);
91
+ if (targetState === null) {
92
+ throw new Error('Waypoint outside target interpolator window.');
93
+ }
94
+ const wpState = targetWp.toJ2000(targetState);
95
+ const tof = wp.epoch.difference(state.epoch);
96
+ const revs = Math.floor(tof / state.period());
97
+ const shortPath = LambertIOD.useShortPath(state, targetState);
98
+ const lambert = new LambertIOD();
99
+ const components = lambert.estimate(state.position, wpState.position, state.epoch, wp.epoch, {
100
+ posigrade: shortPath,
101
+ nRev: revs,
102
+ });
103
+ if (components === null) {
104
+ throw new Error('Lambert solve result is null.');
105
+ }
106
+ const componentsRel = RIC.fromJ2000(components, state).velocity.scale(1e3);
107
+ const maneuver = new Thrust(state.epoch, componentsRel.x, componentsRel.y, componentsRel.z, durationRate);
108
+ const tempProp = new RungeKutta89Propagator(state, forceModel);
109
+ tempProp.maneuver(maneuver);
110
+ state = tempProp.propagate(wp.epoch);
111
+ waypointManeuvers.push(maneuver);
112
+ }
113
+ if (refine) {
114
+ forceModel ??= new ForceModel().setGravity();
115
+ waypointManeuvers = this._refineManeuvers(waypoints, waypointManeuvers, pivotState, forceModel, target, {
116
+ maxIter,
117
+ printIter,
118
+ });
119
+ }
120
+ const output = [];
121
+ output.push(...preMnv);
122
+ output.push(...waypointManeuvers);
123
+ output.push(...postMnv);
124
+ return output;
125
+ }
126
+ static _refineManeuvers(waypoints, maneuvers, interceptor, forceModel, target, { maxIter = 500, printIter = false, } = {}) {
127
+ let state = interceptor;
128
+ const output = [];
129
+ for (let i = 0; i < maneuvers.length; i++) {
130
+ const maneuver = maneuvers[i];
131
+ const waypoint = waypoints[i];
132
+ const guess = maneuver.deltaV.scale(1e3).toArray();
133
+ const simplex = DownhillSimplex.generateSimplex(guess, 1e-1);
134
+ const scoreFn = this._refineManeuverScore(waypoint, maneuver, state, forceModel, target);
135
+ const results = DownhillSimplex.solveSimplex(scoreFn, simplex, {
136
+ maxIter,
137
+ xTolerance: 1e-6,
138
+ fTolerance: 1e-6,
139
+ printIter,
140
+ });
141
+ const tR = results[0];
142
+ const tI = results[1];
143
+ const tC = results[2];
144
+ const newManeuver = new Thrust(maneuver.center, tR, tI, tC, maneuver.durationRate);
145
+ output.push(newManeuver);
146
+ const mvrStep = new RungeKutta89Propagator(state, forceModel).maneuver(newManeuver);
147
+ state = mvrStep[mvrStep.length - 1];
148
+ }
149
+ return output;
150
+ }
151
+ }
152
+ //# sourceMappingURL=Waypoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Waypoint.js","sourceRoot":"","sources":["../../src/maneuver/Waypoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,iCAAiC;AACjC,MAAM,OAAO,QAAQ;IAInB,oCAAoC;IACpC,YAAY,KAAe,EAAE,gBAA0B;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MA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OAAO,EAAE;gBAC7D,OAAO;gBACP,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,IAAI;gBAChB,SAAS;aACV,CAAC,CAAC;YACH,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;YAEnF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzB,MAAM,OAAO,GAAG,IAAI,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAEpF,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SACrC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { EciVec3, Kilometers, LaunchDetails, OperationsDetails, OptionsParams, Satellite, SatelliteParams, SpaceCraftDetails } from 'ootk-core';
19
+ import { DetailedSatelliteParams } from '../types/types';
20
+ /**
21
+ * Represents a detailed satellite object with launch, spacecraft, and operations details.
22
+ */
23
+ export declare class DetailedSatellite extends Satellite {
24
+ /** A global index - this is NOT the sccNum */
25
+ configuration: string;
26
+ country: string;
27
+ dryMass: string;
28
+ equipment: string;
29
+ launchDate: string;
30
+ launchMass: string;
31
+ launchSite: string;
32
+ launchVehicle: string;
33
+ lifetime: string | number;
34
+ maneuver: string;
35
+ manufacturer: string;
36
+ mission: string;
37
+ bus: string;
38
+ motor: string;
39
+ owner: string;
40
+ payload: string;
41
+ power: string;
42
+ purpose: string;
43
+ length: string;
44
+ diameter: string;
45
+ shape: string;
46
+ span: string;
47
+ user: string;
48
+ source: string;
49
+ vmag: number;
50
+ rcs: number;
51
+ totalVelocity: number;
52
+ velocity: EciVec3<Kilometers>;
53
+ semiMajorAxis: number;
54
+ semiMinorAxis: number;
55
+ altId: string;
56
+ altName: string;
57
+ constructor(info: DetailedSatelliteParams & SatelliteParams & LaunchDetails & OperationsDetails & SpaceCraftDetails, options?: OptionsParams);
58
+ /**
59
+ * Returns the launch details of the satellite.
60
+ * @returns An object containing the launch date, launch mass, launch site, and launch vehicle of the satellite.
61
+ */
62
+ getLaunchDetails(): LaunchDetails;
63
+ /**
64
+ * Returns an object containing the details of the operations.
65
+ * @returns An object containing the user, mission, owner, and country details.
66
+ */
67
+ getOperationsDetails(): OperationsDetails;
68
+ /**
69
+ * Returns the space craft details.
70
+ * @returns {SpaceCraftDetails} The space craft details.
71
+ */
72
+ getSpaceCraftDetails(): SpaceCraftDetails;
73
+ /**
74
+ * Propagates the satellite position to the given date using the SGP4 model.
75
+ *
76
+ * This method changes the position and time properties of the satellite object.
77
+ */
78
+ propagateTo(date: Date): this;
79
+ /**
80
+ * Sets the launch details of the satellite.
81
+ * @param details - The launch details to set.
82
+ */
83
+ setLaunchDetails(details: LaunchDetails): void;
84
+ /**
85
+ * Sets the operations details for the satellite.
86
+ * @param details - The operations details to set.
87
+ */
88
+ setOperationsDetails(details: OperationsDetails): void;
89
+ /**
90
+ * Sets the details of a spacecraft.
91
+ * @param details - The details of the spacecraft to set.
92
+ */
93
+ setSpaceCraftDetails(details: SpaceCraftDetails): void;
94
+ }
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { Satellite, Vector3D, } from 'ootk-core';
19
+ /**
20
+ * Represents a detailed satellite object with launch, spacecraft, and operations details.
21
+ */
22
+ export class DetailedSatellite extends Satellite {
23
+ constructor(info, options) {
24
+ super(info, options);
25
+ this.active ??= true;
26
+ this.setLaunchDetails(info);
27
+ this.setSpaceCraftDetails(info);
28
+ this.setOperationsDetails(info);
29
+ Object.keys(info).forEach((key) => {
30
+ this[key] = info[key];
31
+ });
32
+ }
33
+ /**
34
+ * Returns the launch details of the satellite.
35
+ * @returns An object containing the launch date, launch mass, launch site, and launch vehicle of the satellite.
36
+ */
37
+ getLaunchDetails() {
38
+ return {
39
+ launchDate: this.launchDate,
40
+ launchMass: this.launchMass,
41
+ launchSite: this.launchSite,
42
+ launchVehicle: this.launchVehicle,
43
+ };
44
+ }
45
+ /**
46
+ * Returns an object containing the details of the operations.
47
+ * @returns An object containing the user, mission, owner, and country details.
48
+ */
49
+ getOperationsDetails() {
50
+ return {
51
+ user: this.user,
52
+ mission: this.mission,
53
+ owner: this.owner,
54
+ country: this.country,
55
+ };
56
+ }
57
+ /**
58
+ * Returns the space craft details.
59
+ * @returns {SpaceCraftDetails} The space craft details.
60
+ */
61
+ getSpaceCraftDetails() {
62
+ return {
63
+ lifetime: this.lifetime,
64
+ maneuver: this.maneuver,
65
+ manufacturer: this.manufacturer,
66
+ motor: this.motor,
67
+ power: this.power,
68
+ payload: this.payload,
69
+ purpose: this.purpose,
70
+ shape: this.shape,
71
+ span: this.span,
72
+ configuration: this.configuration,
73
+ equipment: this.equipment,
74
+ dryMass: this.dryMass,
75
+ };
76
+ }
77
+ /**
78
+ * Propagates the satellite position to the given date using the SGP4 model.
79
+ *
80
+ * This method changes the position and time properties of the satellite object.
81
+ */
82
+ propagateTo(date) {
83
+ const pv = this.getEci(date);
84
+ this.position = pv.position;
85
+ this.velocity = pv.velocity;
86
+ this.totalVelocity = new Vector3D(pv.velocity.x, pv.velocity.y, pv.velocity.z).magnitude();
87
+ this.time = date;
88
+ return this;
89
+ }
90
+ /**
91
+ * Sets the launch details of the satellite.
92
+ * @param details - The launch details to set.
93
+ */
94
+ setLaunchDetails(details) {
95
+ const keys = ['launchDate', 'launchMass', 'launchSite', 'launchVehicle'];
96
+ keys.forEach((key) => {
97
+ if (details[key]) {
98
+ this[key] = details[key];
99
+ }
100
+ });
101
+ }
102
+ /**
103
+ * Sets the operations details for the satellite.
104
+ * @param details - The operations details to set.
105
+ */
106
+ setOperationsDetails(details) {
107
+ const keys = ['user', 'mission', 'owner', 'country'];
108
+ keys.forEach((key) => {
109
+ if (details[key]) {
110
+ this[key] = details[key];
111
+ }
112
+ });
113
+ }
114
+ /**
115
+ * Sets the details of a spacecraft.
116
+ * @param details - The details of the spacecraft to set.
117
+ */
118
+ setSpaceCraftDetails(details) {
119
+ const keys = [
120
+ 'lifetime',
121
+ 'maneuver',
122
+ 'manufacturer',
123
+ 'motor',
124
+ 'power',
125
+ 'payload',
126
+ 'purpose',
127
+ 'shape',
128
+ 'span',
129
+ 'configuration',
130
+ 'equipment',
131
+ 'dryMass',
132
+ ];
133
+ keys.forEach((key) => {
134
+ if (details[key]) {
135
+ this[key] = details[key];
136
+ }
137
+ });
138
+ }
139
+ }
140
+ //# sourceMappingURL=DetailedSatellite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailedSatellite.js","sourceRoot":"","sources":["../../src/objects/DetailedSatellite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAML,SAAS,EAGT,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAmC9C,YACE,IAAuG,EACvG,OAAuB;QAEvB,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAErB,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;QACrB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAEhC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAChC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACd,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,oBAAoB;QAClB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YAC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,CAAC,GAAG,EAAE,EAAE;YACnB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAAC,OAA0B;QAC7C,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAAC,OAA0B;QAC7C,MAAM,IAAI,GAAG;YACX,UAAU;YACV,UAAU;YACV,cAAc;YACd,OAAO;YACP,OAAO;YACP,SAAS;YACT,SAAS;YACT,OAAO;YACP,MAAM;YACN,eAAe;YACf,WAAW;YACX,SAAS;SACV,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { BaseObjectParams, Degrees, Milliseconds, Radians, Sensor, SensorParams } from 'ootk-core';
19
+ import { DetailedSensorParams, ZoomValue } from '../types/types';
20
+ export declare class DetailedSensor extends Sensor {
21
+ country?: string;
22
+ latRad: Radians;
23
+ lonRad: Radians;
24
+ shortName?: string;
25
+ beamwidth?: Degrees;
26
+ changeObjectInterval?: Milliseconds;
27
+ linkAehf?: boolean;
28
+ linkGalileo?: boolean;
29
+ linkIridium?: boolean;
30
+ linkStarlink?: boolean;
31
+ linkWgs?: boolean;
32
+ static?: boolean;
33
+ sensorId?: number;
34
+ url?: string;
35
+ volume?: boolean;
36
+ zoom: ZoomValue;
37
+ band?: string;
38
+ objName?: string;
39
+ uiName?: string;
40
+ system?: string;
41
+ operator?: string;
42
+ constructor(info: DetailedSensorParams & SensorParams & BaseObjectParams);
43
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { Sensor } from 'ootk-core';
19
+ export class DetailedSensor extends Sensor {
20
+ constructor(info) {
21
+ super(info);
22
+ this.country = info.country;
23
+ this.latRad = (info.lat * (Math.PI / 180));
24
+ this.lonRad = (info.lon * (Math.PI / 180));
25
+ this.shortName = info.shortName;
26
+ this.beamwidth = info.beamwidth;
27
+ this.changeObjectInterval = info.changeObjectInterval;
28
+ this.linkAehf = info.linkAehf;
29
+ this.linkGalileo = info.linkGalileo;
30
+ this.linkIridium = info.linkIridium;
31
+ this.linkStarlink = info.linkStarlink;
32
+ this.linkWgs = info.linkWgs;
33
+ this.static = info.static;
34
+ this.sensorId = info.sensorId;
35
+ this.url = info.url;
36
+ this.volume = info.volume;
37
+ this.zoom = info.zoom;
38
+ this.band = info.band;
39
+ this.objName = info.objName;
40
+ this.uiName = info.uiName;
41
+ this.system = info.system;
42
+ this.operator = info.operator;
43
+ }
44
+ }
45
+ //# sourceMappingURL=DetailedSensor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailedSensor.js","sourceRoot":"","sources":["../../src/objects/DetailedSensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAoD,MAAM,EAAgB,MAAM,WAAW,CAAC;AAGnG,MAAM,OAAO,cAAe,SAAQ,MAAM;IAuBxC,YAAY,IAA4D;QACtE,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAY,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAY,CAAC;QACtD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF"}
@@ -1,13 +1,8 @@
1
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 SpaceObject class is meant to provide properties to satellites/stars that
7
- * do not apply to ground based objects.
2
+ * @author @thkruz Theodore Kruczek
8
3
  *
9
4
  * @license AGPL-3.0-or-later
10
- * @Copyright (c) 2020-2023 Theodore Kruczek
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
11
6
  *
12
7
  * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
8
  * terms of the GNU Affero General Public License as published by the Free Software
@@ -20,19 +15,22 @@
20
15
  * You should have received a copy of the GNU Affero General Public License along with
21
16
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
17
  */
23
- import { BaseObject } from './base-object';
24
- import { SpaceObjectType } from '../types/types';
25
- interface ObjectInfo {
26
- name?: string;
27
- type?: SpaceObjectType;
28
- rcs?: number;
29
- vmag?: number;
18
+ import { BaseObject, BaseObjectParams, Degrees, Kilometers } from 'ootk-core';
19
+ export interface LandObjectParams {
20
+ id: number;
21
+ lat: Degrees;
22
+ lon: Degrees;
23
+ alt: Kilometers;
24
+ country?: string;
25
+ Code?: string;
30
26
  }
31
- export declare class SpaceObject extends BaseObject {
32
- rcs: number;
33
- vmag: number;
34
- constructor(info: ObjectInfo);
35
- getRcs(): number;
36
- getVmag(): number;
27
+ export declare class LandObject extends BaseObject {
28
+ id: number;
29
+ lat: Degrees;
30
+ lon: Degrees;
31
+ alt: Kilometers;
32
+ country?: string;
33
+ Code?: string;
34
+ constructor(info: LandObjectParams & BaseObjectParams);
35
+ isLandObject(): boolean;
37
36
  }
38
- export {};
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { BaseObject } from 'ootk-core';
19
+ export class LandObject extends BaseObject {
20
+ constructor(info) {
21
+ super(info);
22
+ Object.assign(this, info);
23
+ }
24
+ isLandObject() {
25
+ return true;
26
+ }
27
+ }
28
+ //# sourceMappingURL=LandObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LandObject.js","sourceRoot":"","sources":["../../src/objects/LandObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAyC,MAAM,WAAW,CAAC;AAY9E,MAAM,OAAO,UAAW,SAAQ,UAAU;IAQxC,YAAY,IAAyC;QACnD,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { BaseObject } from 'ootk-core';
19
+ export declare class Marker extends BaseObject {
20
+ isMarker(): boolean;
21
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @author @thkruz Theodore Kruczek
3
+ *
4
+ * @license AGPL-3.0-or-later
5
+ * @Copyright (c) 2020-2024 Theodore Kruczek
6
+ *
7
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
8
+ * terms of the GNU Affero General Public License as published by the Free Software
9
+ * Foundation, either version 3 of the License, or (at your option) any later version.
10
+ *
11
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License along with
16
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { BaseObject } from 'ootk-core';
19
+ /* eslint-disable class-methods-use-this */
20
+ export class Marker extends BaseObject {
21
+ isMarker() {
22
+ return true;
23
+ }
24
+ }
25
+ //# sourceMappingURL=Marker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Marker.js","sourceRoot":"","sources":["../../src/objects/Marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,2CAA2C;AAE3C,MAAM,OAAO,MAAO,SAAQ,UAAU;IACpC,QAAQ;QACN,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
- export { DetailedSat } from './detailed-sat';
2
- export { Sat } from './sat';
3
- export { Sensor } from './sensor';
4
- export { Star } from './star';
1
+ export { BaseObject, Satellite, Sensor, Star } from 'ootk-core';
2
+ export { DetailedSatellite } from './DetailedSatellite';
3
+ export { DetailedSensor } from './DetailedSensor';
4
+ export { LandObject } from './LandObject';
5
+ export { Marker } from './Marker';
@@ -1,5 +1,6 @@
1
- export { DetailedSat } from './detailed-sat';
2
- export { Sat } from './sat';
3
- export { Sensor } from './sensor';
4
- export { Star } from './star';
1
+ export { BaseObject, Satellite, Sensor, Star } from 'ootk-core';
2
+ export { DetailedSatellite } from './DetailedSatellite';
3
+ export { DetailedSensor } from './DetailedSensor';
4
+ export { LandObject } from './LandObject';
5
+ export { Marker } from './Marker';
5
6
  //# sourceMappingURL=index.js.map