ootk 4.0.0-8 → 4.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 (222) hide show
  1. package/CHANGELOG.md +80 -1
  2. package/README.md +4 -4
  3. package/dist/coordinate/Hill.d.ts +2 -2
  4. package/dist/coordinate/Hill.js +1 -1
  5. package/dist/coordinate/Hill.js.map +1 -1
  6. package/dist/coordinate/index.d.ts +1 -1
  7. package/dist/coordinate/index.js +1 -1
  8. package/dist/coordinate/index.js.map +1 -1
  9. package/dist/covariance/CovarianceSample.d.ts +3 -3
  10. package/dist/covariance/CovarianceSample.js +3 -3
  11. package/dist/covariance/CovarianceSample.js.map +1 -1
  12. package/dist/covariance/StateCovariance.js.map +1 -1
  13. package/dist/enums/CatalogSource.d.ts +2 -0
  14. package/dist/enums/CatalogSource.js +2 -0
  15. package/dist/enums/CatalogSource.js.map +1 -1
  16. package/dist/enums/CommLink.d.ts +7 -0
  17. package/dist/enums/CommLink.js +9 -0
  18. package/dist/enums/CommLink.js.map +1 -0
  19. package/dist/enums/index.d.ts +2 -1
  20. package/dist/enums/index.js +2 -1
  21. package/dist/enums/index.js.map +1 -1
  22. package/dist/force/AtmosphericDrag.d.ts +1 -1
  23. package/dist/force/AtmosphericDrag.js.map +1 -1
  24. package/dist/force/EarthGravity.d.ts +27 -1
  25. package/dist/force/EarthGravity.js +26 -1
  26. package/dist/force/EarthGravity.js.map +1 -1
  27. package/dist/force/ForceModel.d.ts +9 -1
  28. package/dist/force/ForceModel.js +13 -5
  29. package/dist/force/ForceModel.js.map +1 -1
  30. package/dist/force/Gravity.d.ts +1 -1
  31. package/dist/force/SolarRadiationPressure.d.ts +1 -1
  32. package/dist/force/SolarRadiationPressure.js +1 -1
  33. package/dist/force/SolarRadiationPressure.js.map +1 -1
  34. package/dist/force/ThirdBodyGravity.d.ts +1 -1
  35. package/dist/force/ThirdBodyGravity.js.map +1 -1
  36. package/dist/force/Thrust.d.ts +1 -1
  37. package/dist/force/index.d.ts +1 -0
  38. package/dist/force/index.js +2 -0
  39. package/dist/force/index.js.map +1 -0
  40. package/dist/interfaces/RfSensorParams.d.ts +12 -6
  41. package/dist/interfaces/RfSensorParams.js +1 -1
  42. package/dist/interfaces/index.d.ts +1 -1
  43. package/dist/interpolator/ChebyshevCoefficients.js.map +1 -1
  44. package/dist/interpolator/ChebyshevInterpolator.d.ts +2 -2
  45. package/dist/interpolator/ChebyshevInterpolator.js +1 -1
  46. package/dist/interpolator/ChebyshevInterpolator.js.map +1 -1
  47. package/dist/interpolator/CubicSplineInterpolator.d.ts +2 -2
  48. package/dist/interpolator/CubicSplineInterpolator.js +2 -2
  49. package/dist/interpolator/CubicSplineInterpolator.js.map +1 -1
  50. package/dist/interpolator/FieldInterpolator.d.ts +1 -1
  51. package/dist/interpolator/FieldInterpolator.js +1 -1
  52. package/dist/interpolator/FieldInterpolator.js.map +1 -1
  53. package/dist/interpolator/Interpolator.js.map +1 -1
  54. package/dist/interpolator/LagrangeInterpolator.d.ts +1 -1
  55. package/dist/interpolator/LagrangeInterpolator.js +1 -1
  56. package/dist/interpolator/LagrangeInterpolator.js.map +1 -1
  57. package/dist/interpolator/StateInterpolator.d.ts +1 -1
  58. package/dist/interpolator/StateInterpolator.js +1 -1
  59. package/dist/interpolator/StateInterpolator.js.map +1 -1
  60. package/dist/interpolator/VerletBlendInterpolator.d.ts +3 -3
  61. package/dist/interpolator/VerletBlendInterpolator.js +3 -3
  62. package/dist/interpolator/VerletBlendInterpolator.js.map +1 -1
  63. package/dist/main.d.ts +10 -8
  64. package/dist/main.js +10 -8
  65. package/dist/main.js.map +1 -1
  66. package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +1 -1
  67. package/dist/maneuver/TwoBurnOrbitTransfer.js +1 -1
  68. package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -1
  69. package/dist/maneuver/Waypoint.d.ts +3 -3
  70. package/dist/maneuver/Waypoint.js +5 -5
  71. package/dist/maneuver/Waypoint.js.map +1 -1
  72. package/dist/objects/DetailedSatellite.d.ts +4 -3
  73. package/dist/objects/DetailedSatellite.js +4 -1
  74. package/dist/objects/DetailedSatellite.js.map +1 -1
  75. package/dist/objects/DetailedSensor.d.ts +15 -19
  76. package/dist/objects/DetailedSensor.js +22 -33
  77. package/dist/objects/DetailedSensor.js.map +1 -1
  78. package/dist/objects/RfSensor.d.ts +45 -12
  79. package/dist/objects/RfSensor.js +66 -20
  80. package/dist/objects/RfSensor.js.map +1 -1
  81. package/dist/objects/index.d.ts +5 -5
  82. package/dist/objects/index.js +5 -5
  83. package/dist/objects/index.js.map +1 -1
  84. package/dist/observation/Observation.d.ts +3 -3
  85. package/dist/observation/ObservationOptical.d.ts +4 -4
  86. package/dist/observation/ObservationOptical.js +2 -2
  87. package/dist/observation/ObservationOptical.js.map +1 -1
  88. package/dist/observation/ObservationRadar.d.ts +4 -4
  89. package/dist/observation/ObservationRadar.js +2 -2
  90. package/dist/observation/ObservationRadar.js.map +1 -1
  91. package/dist/observation/ObservationUtils.js.map +1 -1
  92. package/dist/observation/PropagatorPairs.d.ts +1 -1
  93. package/dist/operations/BoxMuller.js.map +1 -1
  94. package/dist/operations/Quaternion.js.map +1 -1
  95. package/dist/operations/RandomGaussianSource.js +1 -1
  96. package/dist/operations/RandomGaussianSource.js.map +1 -1
  97. package/dist/operations/index.d.ts +4 -4
  98. package/dist/operations/index.js +4 -4
  99. package/dist/operations/index.js.map +1 -1
  100. package/dist/optimize/ChebyshevCompressor.d.ts +2 -2
  101. package/dist/optimize/ChebyshevCompressor.js +2 -2
  102. package/dist/optimize/ChebyshevCompressor.js.map +1 -1
  103. package/dist/optimize/DownhillSimplex.d.ts +1 -1
  104. package/dist/optimize/DownhillSimplex.js +1 -1
  105. package/dist/optimize/DownhillSimplex.js.map +1 -1
  106. package/dist/optimize/GoldenSection.d.ts +1 -1
  107. package/dist/optimize/GoldenSection.js.map +1 -1
  108. package/dist/optimize/PolynomialRegression.d.ts +1 -1
  109. package/dist/optimize/PolynomialRegression.js +2 -2
  110. package/dist/optimize/PolynomialRegression.js.map +1 -1
  111. package/dist/optimize/SimpleLinearRegression.js.map +1 -1
  112. package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +7 -3
  113. package/dist/orbit_determination/BatchLeastSquaresOD.js +10 -10
  114. package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -1
  115. package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +1 -1
  116. package/dist/orbit_determination/GibbsIOD.js +2 -2
  117. package/dist/orbit_determination/GibbsIOD.js.map +1 -1
  118. package/dist/orbit_determination/GoodingIOD.d.ts +1 -1
  119. package/dist/orbit_determination/GoodingIOD.js +4 -4
  120. package/dist/orbit_determination/GoodingIOD.js.map +1 -1
  121. package/dist/orbit_determination/LambertIOD.js.map +1 -1
  122. package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +1 -1
  123. package/dist/orbit_determination/ModifiedGoodingIOD.js +4 -4
  124. package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -1
  125. package/dist/propagator/DormandPrince54Propagator.d.ts +1 -1
  126. package/dist/propagator/DormandPrince54Propagator.js +1 -1
  127. package/dist/propagator/DormandPrince54Propagator.js.map +1 -1
  128. package/dist/propagator/KeplerPropagator.d.ts +3 -3
  129. package/dist/propagator/KeplerPropagator.js +2 -2
  130. package/dist/propagator/KeplerPropagator.js.map +1 -1
  131. package/dist/propagator/Propagator.d.ts +2 -2
  132. package/dist/propagator/Propagator.js +2 -2
  133. package/dist/propagator/Propagator.js.map +1 -1
  134. package/dist/propagator/RungeKutta4Propagator.d.ts +4 -4
  135. package/dist/propagator/RungeKutta4Propagator.js +3 -3
  136. package/dist/propagator/RungeKutta4Propagator.js.map +1 -1
  137. package/dist/propagator/RungeKutta89Propagator.d.ts +1 -1
  138. package/dist/propagator/RungeKutta89Propagator.js +1 -1
  139. package/dist/propagator/RungeKutta89Propagator.js.map +1 -1
  140. package/dist/propagator/RungeKuttaAdaptive.d.ts +4 -4
  141. package/dist/propagator/RungeKuttaAdaptive.js +5 -5
  142. package/dist/propagator/RungeKuttaAdaptive.js.map +1 -1
  143. package/dist/propagator/Sgp4Propagator.d.ts +45 -3
  144. package/dist/propagator/Sgp4Propagator.js +43 -3
  145. package/dist/propagator/Sgp4Propagator.js.map +1 -1
  146. package/dist/propagator/index.d.ts +3 -0
  147. package/dist/propagator/index.js +4 -0
  148. package/dist/propagator/index.js.map +1 -0
  149. package/dist/smoothing/ExponentialSmoothing.js.map +1 -1
  150. package/dist/transforms/index.d.ts +1 -1
  151. package/dist/transforms/index.js +1 -1
  152. package/dist/transforms/index.js.map +1 -1
  153. package/dist/transforms/transforms.d.ts +5 -3
  154. package/dist/transforms/transforms.js +8 -6
  155. package/dist/transforms/transforms.js.map +1 -1
  156. package/dist/types/types.d.ts +8 -14
  157. package/dist/types/types.js.map +1 -1
  158. package/dist/utils/functions.d.ts +1 -1
  159. package/dist/utils/index.d.ts +2 -2
  160. package/dist/utils/index.js +2 -2
  161. package/dist/utils/index.js.map +1 -1
  162. package/dist/utils/jacobian.d.ts +1 -1
  163. package/dist/utils/jacobian.js.map +1 -1
  164. package/package.json +17 -15
  165. package/src/coordinate/Hill.ts +2 -2
  166. package/src/coordinate/index.ts +1 -1
  167. package/src/covariance/CovarianceSample.ts +4 -4
  168. package/src/enums/CatalogSource.ts +3 -1
  169. package/src/enums/CommLink.ts +7 -0
  170. package/src/enums/index.ts +2 -1
  171. package/src/force/AtmosphericDrag.ts +1 -1
  172. package/src/force/EarthGravity.ts +27 -2
  173. package/src/force/ForceModel.ts +15 -7
  174. package/src/force/Gravity.ts +1 -1
  175. package/src/force/SolarRadiationPressure.ts +1 -1
  176. package/src/force/ThirdBodyGravity.ts +1 -1
  177. package/src/force/Thrust.ts +1 -1
  178. package/src/force/index.ts +1 -0
  179. package/src/interfaces/RfSensorParams.ts +12 -6
  180. package/src/interfaces/index.ts +1 -1
  181. package/src/interpolator/ChebyshevInterpolator.ts +2 -2
  182. package/src/interpolator/CubicSplineInterpolator.ts +2 -2
  183. package/src/interpolator/FieldInterpolator.ts +1 -1
  184. package/src/interpolator/LagrangeInterpolator.ts +1 -1
  185. package/src/interpolator/StateInterpolator.ts +1 -1
  186. package/src/interpolator/VerletBlendInterpolator.ts +3 -3
  187. package/src/main.ts +10 -8
  188. package/src/maneuver/TwoBurnOrbitTransfer.ts +1 -1
  189. package/src/maneuver/Waypoint.ts +6 -6
  190. package/src/objects/DetailedSatellite.ts +8 -4
  191. package/src/objects/DetailedSensor.ts +27 -36
  192. package/src/objects/RfSensor.ts +71 -22
  193. package/src/objects/index.ts +5 -5
  194. package/src/observation/Observation.ts +3 -3
  195. package/src/observation/ObservationOptical.ts +5 -5
  196. package/src/observation/ObservationRadar.ts +5 -5
  197. package/src/observation/PropagatorPairs.ts +1 -1
  198. package/src/operations/RandomGaussianSource.ts +1 -1
  199. package/src/operations/index.ts +4 -4
  200. package/src/optimize/ChebyshevCompressor.ts +3 -3
  201. package/src/optimize/DownhillSimplex.ts +1 -1
  202. package/src/optimize/GoldenSection.ts +1 -1
  203. package/src/optimize/PolynomialRegression.ts +2 -2
  204. package/src/orbit_determination/BatchLeastSquaresOD.ts +12 -12
  205. package/src/orbit_determination/BatchLeastSquaresResult.ts +1 -1
  206. package/src/orbit_determination/GibbsIOD.ts +2 -2
  207. package/src/orbit_determination/GoodingIOD.ts +5 -5
  208. package/src/orbit_determination/ModifiedGoodingIOD.ts +6 -6
  209. package/src/propagator/DormandPrince54Propagator.ts +1 -1
  210. package/src/propagator/KeplerPropagator.ts +3 -3
  211. package/src/propagator/Propagator.ts +3 -3
  212. package/src/propagator/RungeKutta4Propagator.ts +4 -4
  213. package/src/propagator/RungeKutta89Propagator.ts +1 -1
  214. package/src/propagator/RungeKuttaAdaptive.ts +6 -6
  215. package/src/propagator/Sgp4Propagator.ts +45 -5
  216. package/src/propagator/index.ts +3 -0
  217. package/src/transforms/index.ts +1 -1
  218. package/src/transforms/transforms.ts +9 -6
  219. package/src/types/types.ts +8 -14
  220. package/src/utils/functions.ts +1 -1
  221. package/src/utils/index.ts +2 -2
  222. package/src/utils/jacobian.ts +1 -1
@@ -2,7 +2,9 @@ export enum CatalogSource {
2
2
  USSF = 'USSF',
3
3
  CELESTRAK = 'Celestrak',
4
4
  UNIV_OF_MICH = 'University of Michigan',
5
+ CALPOLY = 'CalPoly',
6
+ NUSPACE = 'NuSpace',
5
7
  VIMPEL = 'JSC Vimpel',
6
8
  TLE_TXT = 'TLE.txt',
7
- EXTRA_JSON = 'extra.json',
9
+ EXTRA_JSON = 'extra.json'
8
10
  }
@@ -0,0 +1,7 @@
1
+ export enum CommLink {
2
+ AEHF = 'AEHF',
3
+ GALILEO = 'Galileo',
4
+ IRIDIUM = 'Iridium',
5
+ STARLINK = 'Starlink',
6
+ WGS = 'WGS'
7
+ }
@@ -1 +1,2 @@
1
- export { CatalogSource } from './CatalogSource';
1
+ export { CatalogSource } from './CatalogSource.js';
2
+ export { CommLink } from './CommLink.js';
@@ -27,7 +27,7 @@ import {
27
27
  Sun,
28
28
  Vector3D,
29
29
  } from 'ootk-core';
30
- import { Force } from './Force';
30
+ import { Force } from './Force.js';
31
31
 
32
32
  /**
33
33
  * Harris-Priester atmospheric drag force model.
@@ -19,14 +19,39 @@ import { DataHandler, Earth, ITRF, J2000, Kilometers, KilometersPerSecond, Vecto
19
19
  /* eslint-disable class-methods-use-this */
20
20
  // / Complex Earth gravity model, accounting for EGM-96 zonal, sectoral, and
21
21
 
22
- import { Force } from './Force';
22
+ import { Force } from './Force.js';
23
23
 
24
- // / tesseral geopotential perturbations.
24
+ /**
25
+ * designed to model the Earth's gravitational field, which is not uniformly distributed due to variations in mass
26
+ * distribution within the Earth and the Earth's shape (it's not a perfect sphere). To accurately model this complex
27
+ * field, the gravity model is expanded into a series of spherical harmonics, characterized by their degree and order.
28
+ *
29
+ * This `degree` parameter is related to the spatial resolution of the gravity model. A higher degree corresponds to a
30
+ * finer resolution, capable of representing smaller-scale variations in the gravity field. The degree essentially
31
+ * denotes how many times the gravitational potential function varies over the surface of the Earth.
32
+ *
33
+ * For each degree, there can be multiple orders ranging from 0 up to the degree. The `order` accounts for the
34
+ * longitudinal variation in the gravity field. Each order within a degree captures different characteristics of the
35
+ * gravity anomalies.
36
+ *
37
+ * `Degree 0` corresponds to the overall, mean gravitational force of the Earth (considered as a point mass).
38
+ *
39
+ * `Degree 1` terms are related to the Earth's center of mass but are usually not used because the center of mass is
40
+ * defined as the origin of the coordinate system.
41
+ *
42
+ * `Degree 2` and higher capture the deviations from this spherical symmetry, such as the flattening at the poles and
43
+ * bulging at the equator (degree 2), and other anomalies at finer scales as the degree increases.
44
+ */
25
45
  export class EarthGravity implements Force {
26
46
  degree: number;
27
47
  order: number;
28
48
  _asphericalFlag: boolean;
29
49
 
50
+ /**
51
+ * Creates a new instance of the EarthGravity class.
52
+ * @param degree The degree of the Earth's gravity field. Must be between 0 and 36.
53
+ * @param order The order of the Earth's gravity field. Must be between 0 and 36.
54
+ */
30
55
  constructor(degree: number, order: number) {
31
56
  this.degree = Math.min(Math.max(degree, 0), 36);
32
57
  this.order = Math.min(Math.max(order, 0), 36);
@@ -16,13 +16,13 @@
16
16
  */
17
17
 
18
18
  import { Earth, J2000, Vector, Vector3D } from 'ootk-core';
19
- import { AtmosphericDrag } from './AtmosphericDrag';
20
- import { EarthGravity } from './EarthGravity';
21
- import { Force } from './Force';
22
- import { Gravity } from './Gravity';
23
- import { SolarRadiationPressure } from './SolarRadiationPressure';
24
- import { ThirdBodyGravity } from './ThirdBodyGravity';
25
- import { Thrust } from './Thrust';
19
+ import { AtmosphericDrag } from './AtmosphericDrag.js';
20
+ import { EarthGravity } from './EarthGravity.js';
21
+ import { Force } from './Force.js';
22
+ import { Gravity } from './Gravity.js';
23
+ import { SolarRadiationPressure } from './SolarRadiationPressure.js';
24
+ import { ThirdBodyGravity } from './ThirdBodyGravity.js';
25
+ import { Thrust } from './Thrust.js';
26
26
 
27
27
  // / Force model for spacecraft propagation.
28
28
 
@@ -51,6 +51,14 @@ export class ForceModel {
51
51
  this._solarRadiationPressure = new SolarRadiationPressure(mass, area, coeff);
52
52
  }
53
53
 
54
+ /**
55
+ * Sets the atmospheric drag for the force model.
56
+ * @deprecated This is still a work in progress!
57
+ * @param mass - The mass of the object.
58
+ * @param area - The cross-sectional area of the object.
59
+ * @param coeff - The drag coefficient. Default value is 2.2.
60
+ * @param cosine - The cosine of the angle between the object's velocity vector and the drag force vector.
61
+ */
54
62
  setAtmosphericDrag(mass: number, area: number, coeff = 2.2, cosine = 4): void {
55
63
  this._atmosphericDrag = new AtmosphericDrag(mass, area, coeff, cosine);
56
64
  }
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { Earth, J2000, Vector3D } from 'ootk-core';
19
- import { Force } from './Force';
19
+ import { Force } from './Force.js';
20
20
 
21
21
  // / Simple central-body gravity model.
22
22
  export class Gravity implements Force {
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { astronomicalUnit, J2000, Sun, Vector3D } from 'ootk-core';
19
- import { Force } from './Force';
19
+ import { Force } from './Force.js';
20
20
 
21
21
  // / Solar radiation pressure model.
22
22
  export class SolarRadiationPressure extends Force {
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { J2000, Moon, Sun, Vector3D } from 'ootk-core';
19
- import { Force } from './Force';
19
+ import { Force } from './Force.js';
20
20
 
21
21
  // / Third-body gravity model.
22
22
  export class ThirdBodyGravity implements Force {
@@ -26,7 +26,7 @@ import {
26
26
  SecondsPerMeterPerSecond,
27
27
  Vector3D,
28
28
  } from 'ootk-core';
29
- import { Force } from './Force';
29
+ import { Force } from './Force.js';
30
30
 
31
31
  // / Thrust force model.
32
32
  export class Thrust implements Force {
@@ -0,0 +1 @@
1
+ export { ForceModel } from './ForceModel.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @author Theodore Kruczek.
3
- * @license MIT
3
+ * @license AGPL-3.0-or-later
4
4
  * @copyright (c) 2022-2024 Theodore Kruczek Permission is
5
5
  * hereby granted, free of charge, to any person obtaining a copy of this
6
6
  * software and associated documentation files (the "Software"), to deal in the
@@ -21,10 +21,16 @@
21
21
  * SOFTWARE.
22
22
  */
23
23
 
24
- import { Degrees, SensorParams } from 'ootk-core';
24
+ import { Degrees } from 'ootk-core';
25
+ import { DetailedSensorParams } from '../types/types.js';
25
26
 
26
- export interface RfSensorParams extends SensorParams {
27
- coneHalfAngle: Degrees;
28
- boresightAz: Degrees;
29
- boresightEl: Degrees;
27
+ export interface RfSensorParams extends DetailedSensorParams {
28
+ /** The azimuth angles at boresight of the sensor */
29
+ boresightAz: Degrees[];
30
+ /** The elevation angles at boresight of the sensor */
31
+ boresightEl: Degrees[];
32
+ /** The width of the beam */
33
+ beamwidth: Degrees;
34
+ /** The frequency this sensor operate in */
35
+ freqBand?: string;
30
36
  }
@@ -1 +1 @@
1
- export type { RfSensorParams } from './RfSensorParams';
1
+ export type { RfSensorParams } from './RfSensorParams.js';
@@ -16,8 +16,8 @@
16
16
  */
17
17
 
18
18
  import { EpochUTC, EpochWindow, J2000 } from 'ootk-core';
19
- import { ChebyshevCoefficients } from './ChebyshevCoefficients';
20
- import { StateInterpolator } from './StateInterpolator';
19
+ import { ChebyshevCoefficients } from './ChebyshevCoefficients.js';
20
+ import { StateInterpolator } from './StateInterpolator.js';
21
21
 
22
22
  /**
23
23
  * Compressed Chebyshev ephemeris interpolator.
@@ -16,8 +16,8 @@
16
16
  */
17
17
 
18
18
  import { EpochUTC, EpochWindow, J2000, Kilometers, KilometersPerSecond, Vector3D } from 'ootk-core';
19
- import { CubicSpline } from './CubicSpline';
20
- import { StateInterpolator } from './StateInterpolator';
19
+ import { CubicSpline } from './CubicSpline.js';
20
+ import { StateInterpolator } from './StateInterpolator.js';
21
21
 
22
22
  /**
23
23
  * Cubic spline ephemeris interpolator.
@@ -18,7 +18,7 @@
18
18
  /* eslint-disable @typescript-eslint/no-unused-vars */
19
19
  /* eslint-disable class-methods-use-this */
20
20
 
21
- import { Interpolator } from './Interpolator';
21
+ import { Interpolator } from './Interpolator.js';
22
22
 
23
23
  // / Base class for arbitrary field interpolators.
24
24
  export abstract class FieldInterpolator extends Interpolator {
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { EpochUTC, EpochWindow, J2000, Kilometers, KilometersPerSecond, Seconds, Vector3D } from 'ootk-core';
19
- import { StateInterpolator } from './StateInterpolator';
19
+ import { StateInterpolator } from './StateInterpolator.js';
20
20
 
21
21
  export class LagrangeInterpolator extends StateInterpolator {
22
22
  private t_: Float64Array;
@@ -19,7 +19,7 @@ import { EpochUTC, J2000 } from 'ootk-core';
19
19
  /* eslint-disable @typescript-eslint/no-unused-vars */
20
20
  /* eslint-disable class-methods-use-this */
21
21
 
22
- import { Interpolator } from './Interpolator';
22
+ import { Interpolator } from './Interpolator.js';
23
23
 
24
24
  // / Base class for state vector interpolators.
25
25
  export abstract class StateInterpolator extends Interpolator {
@@ -26,9 +26,9 @@ import {
26
26
  Seconds,
27
27
  Vector3D,
28
28
  } from 'ootk-core';
29
- import { CubicSplineInterpolator } from './CubicSplineInterpolator';
30
- import { LagrangeInterpolator } from './LagrangeInterpolator';
31
- import { StateInterpolator } from './StateInterpolator';
29
+ import { CubicSplineInterpolator } from './CubicSplineInterpolator.js';
30
+ import { LagrangeInterpolator } from './LagrangeInterpolator.js';
31
+ import { StateInterpolator } from './StateInterpolator.js';
32
32
 
33
33
  /**
34
34
  * Two-body Velocity Verlet Blend interpolator.
package/src/main.ts CHANGED
@@ -21,11 +21,13 @@
21
21
  */
22
22
 
23
23
  export * from 'ootk-core';
24
- export * from './enums';
25
- export * from './types/types';
26
- export * from './interfaces';
27
- export * from './coordinate';
28
- export * from './objects';
29
- export * from './operations';
30
- export * from './transforms';
31
- export * from './utils';
24
+ export * from './enums/index.js';
25
+ export * from './types/types.js';
26
+ export * from './interfaces/index.js';
27
+ export * from './coordinate/index.js';
28
+ export * from './objects/index.js';
29
+ export * from './operations/index.js';
30
+ export * from './force/index.js';
31
+ export * from './propagator/index.js';
32
+ export * from './transforms/index.js';
33
+ export * from './utils/index.js';
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { Earth, EpochUTC, MetersPerSecond, Seconds, SecondsPerMeterPerSecond } from 'ootk-core';
19
- import { Thrust } from '../force/Thrust';
19
+ import { Thrust } from '../force/Thrust.js';
20
20
 
21
21
  // / Container for a two-burn orbit transfer.
22
22
  export class TwoBurnOrbitTransfer {
@@ -25,12 +25,12 @@ import {
25
25
  SecondsPerMeterPerSecond,
26
26
  Vector3D,
27
27
  } from 'ootk-core';
28
- import { Thrust } from '../force/Thrust';
29
- import { StateInterpolator } from '../interpolator/StateInterpolator';
30
- import { ForceModel } from './../force/ForceModel';
31
- import { DownhillSimplex } from './../optimize/DownhillSimplex';
32
- import { LambertIOD } from './../orbit_determination/LambertIOD';
33
- import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator';
28
+ import { Thrust } from '../force/Thrust.js';
29
+ import { StateInterpolator } from '../interpolator/StateInterpolator.js';
30
+ import { ForceModel } from './../force/ForceModel.js';
31
+ import { DownhillSimplex } from './../optimize/DownhillSimplex.js';
32
+ import { LambertIOD } from './../orbit_determination/LambertIOD.js';
33
+ import { RungeKutta89Propagator } from './../propagator/RungeKutta89Propagator.js';
34
34
 
35
35
  // / Relative waypoint targeting.
36
36
  export class Waypoint {
@@ -25,8 +25,8 @@ import {
25
25
  TleLine1,
26
26
  TleLine2,
27
27
  } from 'ootk-core';
28
- import { DetailedSatelliteParams } from '../types/types';
29
- import { CatalogSource } from '../main';
28
+ import { DetailedSatelliteParams } from '../types/types.js';
29
+ import { CatalogSource } from '../main.js';
30
30
 
31
31
  /**
32
32
  * Represents a detailed satellite object with launch, spacecraft, and operations details.
@@ -56,8 +56,8 @@ export class DetailedSatellite extends Satellite {
56
56
  span: string = '';
57
57
  user: string = '';
58
58
  source: string = '';
59
- vmag?: number|null;
60
- rcs?: number|null;
59
+ vmag: number|null;
60
+ rcs: number|null;
61
61
  altId: string = '';
62
62
  altName: string = '';
63
63
 
@@ -179,4 +179,8 @@ export class DetailedSatellite extends Satellite {
179
179
  dryMass: this.dryMass,
180
180
  };
181
181
  }
182
+
183
+ clone(): DetailedSatellite {
184
+ return new DetailedSatellite(this);
185
+ }
182
186
  }
@@ -15,54 +15,45 @@
15
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
- import { BaseObjectParams, Degrees, Milliseconds, Radians, Sensor, SensorParams } from 'ootk-core';
19
- import { DetailedSensorParams, ZoomValue } from '../types/types';
18
+ import { Milliseconds, Sensor } from 'ootk-core';
19
+ import { DetailedSensorParams, ZoomValue } from '../types/types.js';
20
+ import { CommLink } from '../enums/CommLink.js';
20
21
 
21
22
  export class DetailedSensor extends Sensor {
22
- country?: string;
23
- latRad: Radians;
24
- lonRad: Radians;
25
- shortName?: string;
26
- beamwidth?: Degrees;
27
- changeObjectInterval?: Milliseconds;
28
- linkAehf?: boolean;
29
- linkGalileo?: boolean;
30
- linkIridium?: boolean;
31
- linkStarlink?: boolean;
32
- linkWgs?: boolean;
33
- static?: boolean;
34
23
  sensorId?: number;
35
- url?: string;
36
- volume?: boolean;
37
- zoom: ZoomValue;
38
- band?: string;
39
24
  objName?: string;
25
+ shortName?: string;
40
26
  uiName?: string;
27
+ country?: string;
28
+ dwellTime?: Milliseconds;
29
+ freqBand?: string;
30
+ commLinks: CommLink[];
31
+ /** Is this sensor volumetric? */
32
+ isVolumetric?: boolean;
33
+ /** The ideal zoom to see the sensor's full FOV */
34
+ zoom?: ZoomValue | number;
41
35
  system?: string;
42
36
  operator?: string;
37
+ url?: string;
43
38
 
44
- constructor(info: DetailedSensorParams & SensorParams & BaseObjectParams) {
39
+ constructor(info: DetailedSensorParams) {
45
40
  super(info);
41
+ this.commLinks = info.commLinks ?? [];
46
42
  this.country = info.country;
47
- this.latRad = (info.lat * (Math.PI / 180)) as Radians;
48
- this.lonRad = (info.lon * (Math.PI / 180)) as Radians;
49
- this.shortName = info.shortName;
50
- this.beamwidth = info.beamwidth;
51
- this.changeObjectInterval = info.changeObjectInterval;
52
- this.linkAehf = info.linkAehf;
53
- this.linkGalileo = info.linkGalileo;
54
- this.linkIridium = info.linkIridium;
55
- this.linkStarlink = info.linkStarlink;
56
- this.linkWgs = info.linkWgs;
57
- this.static = info.static;
43
+ this.dwellTime = info.changeObjectInterval;
44
+ this.freqBand = info.freqBand;
45
+ this.isVolumetric = info.volume;
46
+ this.objName = info.objName;
47
+ this.operator = info.operator;
58
48
  this.sensorId = info.sensorId;
49
+ this.shortName = info.shortName;
50
+ this.system = info.system;
51
+ this.uiName = info.uiName;
59
52
  this.url = info.url;
60
- this.volume = info.volume;
61
53
  this.zoom = info.zoom;
62
- this.band = info.band;
63
- this.objName = info.objName;
64
- this.uiName = info.uiName;
65
- this.system = info.system;
66
- this.operator = info.operator;
54
+ }
55
+
56
+ isStatic(): boolean {
57
+ return true;
67
58
  }
68
59
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @author Theodore Kruczek.
3
- * @license MIT
3
+ * @license AGPL-3.0-or-later
4
4
  * @copyright (c) 2022-2024 Theodore Kruczek Permission is
5
5
  * hereby granted, free of charge, to any person obtaining a copy of this
6
6
  * software and associated documentation files (the "Software"), to deal in the
@@ -21,13 +21,15 @@
21
21
  * SOFTWARE.
22
22
  */
23
23
 
24
- import { DEG2RAD, Degrees, RAD2DEG, Radians, Sensor, SpaceObjectType } from 'ootk-core';
25
- import { azel2uv, uv2azel, RfSensorParams } from '../main';
24
+ import { DEG2RAD, Degrees, RAD2DEG, Radians, SpaceObjectType } from 'ootk-core';
25
+ import { azel2uv, uv2azel, RfSensorParams } from '../main.js';
26
+ import { DetailedSensor } from './DetailedSensor.js';
26
27
 
27
- export class RfSensor extends Sensor {
28
- coneHalfAngle: Degrees;
29
- boresightAz: Degrees;
30
- boresightEl: Degrees;
28
+ export class RfSensor extends DetailedSensor {
29
+ boresightAz: Degrees[];
30
+ boresightEl: Degrees[];
31
+ faces: number;
32
+ beamwidth: Degrees;
31
33
 
32
34
  constructor(info: RfSensorParams) {
33
35
  super(info);
@@ -41,38 +43,85 @@ export class RfSensor extends Sensor {
41
43
  throw new Error('Invalid sensor type');
42
44
  }
43
45
 
44
- this.coneHalfAngle = info.coneHalfAngle;
45
46
  this.boresightAz = info.boresightAz;
46
47
  this.boresightEl = info.boresightEl;
48
+ if (info.boresightAz.length !== info.boresightEl.length) {
49
+ throw new Error('Boresight azimuth and elevation arrays must be the same length');
50
+ }
51
+ this.faces = info.boresightAz.length;
52
+ this.beamwidth = info.beamwidth;
47
53
  }
48
54
 
49
- uvFromAzEl(az: Degrees, el: Degrees) {
55
+ /**
56
+ * Converts azimuth and elevation angles to unit vector coordinates.
57
+ * @param az - The azimuth angle in degrees.
58
+ * @param el - The elevation angle in degrees.
59
+ * @param face - The face number (optional).
60
+ * @returns The unit vector coordinates.
61
+ */
62
+ uvFromAzEl(az: Degrees, el: Degrees, face?: number) {
50
63
  const azRad = (az * DEG2RAD) as Radians;
51
64
  const elRad = (el * DEG2RAD) as Radians;
52
- const azDiff = (azRad - this.boresightAzRad) as Radians;
53
- const elDiff = (elRad - this.boresightElRad) as Radians;
65
+ const azDiff = (azRad - this.boresightAzRad(face ?? 0)) as Radians;
66
+ const elDiff = (elRad - this.boresightElRad(face ?? 0)) as Radians;
54
67
 
55
- return azel2uv(azDiff, elDiff, this.coneHalfAngleRad);
68
+ return azel2uv(azDiff, elDiff, this.beamwidthRad);
56
69
  }
57
70
 
58
- azElFromUV(u: number, v: number) {
59
- const { az, el } = uv2azel(u, v, this.coneHalfAngleRad);
71
+ /**
72
+ * Converts the given UV coordinates to azimuth and elevation angles.
73
+ * @param u - The U coordinate.
74
+ * @param v - The V coordinate.
75
+ * @param face - The face number for multi-faced sensors. (optional)
76
+ * @returns An object containing the azimuth and elevation angles in degrees.
77
+ * @throws Error if face number is not specified for multi-faced sensors.
78
+ */
79
+ azElFromUV(u: number, v: number, face?: number) {
80
+ if (!face && this.faces > 1) {
81
+ throw new Error('Face number must be specified for multi-faced sensors');
82
+ }
83
+
84
+ const { az, el } = uv2azel(u, v, this.beamwidthRad);
60
85
 
61
86
  return {
62
- az: ((az + this.boresightAz) * RAD2DEG) as Degrees,
63
- el: ((el + this.boresightEl) * RAD2DEG) as Degrees,
87
+ az: ((az + this.boresightAz[face ?? 0]) * RAD2DEG) as Degrees,
88
+ el: ((el + this.boresightEl[face ?? 0]) * RAD2DEG) as Degrees,
64
89
  };
65
90
  }
66
91
 
67
- get boresightAzRad() {
68
- return (this.boresightAz * DEG2RAD) as Radians;
92
+ /**
93
+ * Converts the boresight azimuth angle to radians.
94
+ * @param face - The face number for multi-faced sensors. (Optional)
95
+ * @returns The boresight azimuth angle in radians.
96
+ * @throws An error if the face number is not specified for multi-faced sensors.
97
+ */
98
+ boresightAzRad(face?: number) {
99
+ if (!face && this.faces > 1) {
100
+ throw new Error('Face number must be specified for multi-faced sensors');
101
+ }
102
+
103
+ return (this.boresightAz[face ?? 0] * DEG2RAD) as Radians;
69
104
  }
70
105
 
71
- get boresightElRad() {
72
- return (this.boresightEl * DEG2RAD) as Radians;
106
+ /**
107
+ * Converts the boresight elevation angle of the sensor to radians.
108
+ * @param face - The face number of the sensor (optional for single-faced sensors).
109
+ * @returns The boresight elevation angle in radians.
110
+ * @throws Error if the face number is not specified for multi-faced sensors.
111
+ */
112
+ boresightElRad(face?: number) {
113
+ if (!face && this.faces > 1) {
114
+ throw new Error('Face number must be specified for multi-faced sensors');
115
+ }
116
+
117
+ return (this.boresightEl[face ?? 0] * DEG2RAD) as Radians;
73
118
  }
74
119
 
75
- get coneHalfAngleRad() {
76
- return (this.coneHalfAngle * DEG2RAD) as Radians;
120
+ /**
121
+ * Gets the beamwidth in radians.
122
+ * @returns The beamwidth in radians.
123
+ */
124
+ get beamwidthRad() {
125
+ return (this.beamwidth * DEG2RAD) as Radians;
77
126
  }
78
127
  }
@@ -1,5 +1,5 @@
1
- export { DetailedSatellite } from './DetailedSatellite';
2
- export { DetailedSensor } from './DetailedSensor';
3
- export { LandObject } from './LandObject';
4
- export { Marker } from './Marker';
5
- export { RfSensor } from './RfSensor';
1
+ export { DetailedSatellite } from './DetailedSatellite.js';
2
+ export { DetailedSensor } from './DetailedSensor.js';
3
+ export { LandObject } from './LandObject.js';
4
+ export { Marker } from './Marker.js';
5
+ export { RfSensor } from './RfSensor.js';
@@ -16,9 +16,9 @@
16
16
  */
17
17
 
18
18
  import { EpochUTC, J2000, Matrix, Vector, Vector3D } from 'ootk-core';
19
- import { Propagator } from '../propagator/Propagator';
20
- import { RandomGaussianSource } from './../operations/RandomGaussianSource';
21
- import { PropagatorPairs } from './PropagatorPairs';
19
+ import { Propagator } from '../propagator/Propagator.js';
20
+ import { RandomGaussianSource } from './../operations/RandomGaussianSource.js';
21
+ import { PropagatorPairs } from './PropagatorPairs.js';
22
22
 
23
23
  /* eslint-disable @typescript-eslint/no-unused-vars */
24
24
  /**
@@ -28,11 +28,11 @@ import {
28
28
  Vector,
29
29
  Vector3D,
30
30
  } from 'ootk-core';
31
- import { RandomGaussianSource } from '../operations/RandomGaussianSource';
32
- import { Propagator } from '../propagator/Propagator';
33
- import { Observation } from './Observation';
34
- import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
35
- import { PropagatorPairs } from './PropagatorPairs';
31
+ import { RandomGaussianSource } from '../operations/RandomGaussianSource.js';
32
+ import { Propagator } from '../propagator/Propagator.js';
33
+ import { Observation } from './Observation.js';
34
+ import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils.js';
35
+ import { PropagatorPairs } from './PropagatorPairs.js';
36
36
 
37
37
  // / Optical observation data.
38
38
  export class ObservationOptical extends Observation {
@@ -29,11 +29,11 @@ import {
29
29
  Vector,
30
30
  Vector3D,
31
31
  } from 'ootk-core';
32
- import { RandomGaussianSource } from '../operations/RandomGaussianSource';
33
- import { Propagator } from '../propagator/Propagator';
34
- import { Observation } from './Observation';
35
- import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils';
36
- import { PropagatorPairs } from './PropagatorPairs';
32
+ import { RandomGaussianSource } from '../operations/RandomGaussianSource.js';
33
+ import { Propagator } from '../propagator/Propagator.js';
34
+ import { Observation } from './Observation.js';
35
+ import { normalizeAngle, observationDerivative, observationNoiseFromSigmas } from './ObservationUtils.js';
36
+ import { PropagatorPairs } from './PropagatorPairs.js';
37
37
 
38
38
  // / Radar observation data.
39
39
  export class ObservationRadar extends Observation {
@@ -15,7 +15,7 @@
15
15
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
- import { Propagator } from '../propagator/Propagator';
18
+ import { Propagator } from '../propagator/Propagator.js';
19
19
 
20
20
  export class PropagatorPairs {
21
21
  constructor(private _posStep: number, private _velStep: number) {
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import { Vector, Vector3D } from 'ootk-core';
19
- import { BoxMuller } from './BoxMuller';
19
+ import { BoxMuller } from './BoxMuller.js';
20
20
 
21
21
  export class RandomGaussianSource {
22
22
  private _boxMuller: BoxMuller;