ootk 3.0.0 → 4.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +235 -10
- package/README.md +27 -40
- package/dist/coordinate/Hill.d.ts +49 -0
- package/dist/coordinate/Hill.js +222 -0
- package/dist/coordinate/Hill.js.map +1 -0
- package/dist/coordinate/index.d.ts +1 -0
- package/dist/coordinate/index.js +2 -0
- package/dist/coordinate/index.js.map +1 -0
- package/dist/covariance/CovarianceSample.d.ts +43 -0
- package/dist/covariance/CovarianceSample.js +147 -0
- package/dist/covariance/CovarianceSample.js.map +1 -0
- package/dist/covariance/StateCovariance.d.ts +42 -0
- package/dist/covariance/StateCovariance.js +65 -0
- package/dist/covariance/StateCovariance.js.map +1 -0
- package/dist/force/AtmosphericDrag.d.ts +31 -0
- package/dist/force/AtmosphericDrag.js +73 -0
- package/dist/force/AtmosphericDrag.js.map +1 -0
- package/dist/force/EarthGravity.d.ts +27 -0
- package/dist/force/EarthGravity.js +117 -0
- package/dist/force/EarthGravity.js.map +1 -0
- package/{lib/ootk.d.ts → dist/force/Force.d.ts} +12 -11
- package/dist/force/Force.js +31 -0
- package/dist/force/Force.js.map +1 -0
- package/dist/force/ForceModel.d.ts +37 -0
- package/dist/force/ForceModel.js +75 -0
- package/dist/force/ForceModel.js.map +1 -0
- package/dist/force/Gravity.d.ts +38 -0
- package/dist/force/Gravity.js +47 -0
- package/dist/force/Gravity.js.map +1 -0
- package/dist/{ootk.d.ts → force/SolarRadiationPressure.d.ts} +12 -11
- package/dist/force/SolarRadiationPressure.js +44 -0
- package/dist/force/SolarRadiationPressure.js.map +1 -0
- package/dist/force/ThirdBodyGravity.d.ts +26 -0
- package/dist/force/ThirdBodyGravity.js +57 -0
- package/dist/force/ThirdBodyGravity.js.map +1 -0
- package/dist/force/Thrust.d.ts +34 -0
- package/dist/force/Thrust.js +58 -0
- package/dist/force/Thrust.js.map +1 -0
- package/dist/interfaces/RfSensorParams.d.ts +28 -0
- package/dist/interfaces/RfSensorParams.js +24 -0
- package/dist/interfaces/RfSensorParams.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interpolator/ChebyshevCoefficients.d.ts +50 -0
- package/dist/interpolator/ChebyshevCoefficients.js +94 -0
- package/dist/interpolator/ChebyshevCoefficients.js.map +1 -0
- package/dist/interpolator/ChebyshevInterpolator.d.ts +38 -0
- package/dist/interpolator/ChebyshevInterpolator.js +71 -0
- package/dist/interpolator/ChebyshevInterpolator.js.map +1 -0
- package/dist/interpolator/CubicSpline.d.ts +35 -0
- package/dist/interpolator/CubicSpline.js +69 -0
- package/dist/interpolator/CubicSpline.js.map +1 -0
- package/dist/interpolator/CubicSplineInterpolator.d.ts +36 -0
- package/dist/interpolator/CubicSplineInterpolator.js +80 -0
- package/dist/interpolator/CubicSplineInterpolator.js.map +1 -0
- package/dist/interpolator/FieldInterpolator.d.ts +28 -0
- package/dist/interpolator/FieldInterpolator.js +34 -0
- package/dist/interpolator/FieldInterpolator.js.map +1 -0
- package/dist/interpolator/Interpolator.d.ts +22 -0
- package/dist/interpolator/Interpolator.js +47 -0
- package/dist/interpolator/Interpolator.js.map +1 -0
- package/dist/interpolator/LagrangeInterpolator.d.ts +40 -0
- package/dist/interpolator/LagrangeInterpolator.js +159 -0
- package/dist/interpolator/LagrangeInterpolator.js.map +1 -0
- package/dist/interpolator/StateInterpolator.d.ts +27 -0
- package/dist/interpolator/StateInterpolator.js +35 -0
- package/dist/interpolator/StateInterpolator.js.map +1 -0
- package/dist/interpolator/VerletBlendInterpolator.d.ts +43 -0
- package/dist/interpolator/VerletBlendInterpolator.js +118 -0
- package/dist/interpolator/VerletBlendInterpolator.js.map +1 -0
- package/{lib/ootk.js → dist/main.d.ts} +13 -10
- package/dist/{objects/space-object.d.ts → main.js} +17 -23
- package/dist/main.js.map +1 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.d.ts +41 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.js +65 -0
- package/dist/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
- package/dist/maneuver/Waypoint.d.ts +91 -0
- package/dist/maneuver/Waypoint.js +179 -0
- package/dist/maneuver/Waypoint.js.map +1 -0
- package/{lib/objects/detailed-sat.d.ts → dist/objects/DetailedSatellite.d.ts} +40 -36
- package/dist/objects/DetailedSatellite.js +136 -0
- package/dist/objects/DetailedSatellite.js.map +1 -0
- package/dist/objects/DetailedSensor.d.ts +42 -0
- package/dist/objects/DetailedSensor.js +65 -0
- package/dist/objects/DetailedSensor.js.map +1 -0
- package/dist/objects/LandObject.d.ts +33 -0
- package/dist/objects/LandObject.js +34 -0
- package/dist/objects/LandObject.js.map +1 -0
- package/dist/objects/Marker.d.ts +20 -0
- package/dist/objects/Marker.js +24 -0
- package/dist/objects/Marker.js.map +1 -0
- package/dist/objects/RfSensor.d.ts +41 -0
- package/dist/objects/RfSensor.js +67 -0
- package/dist/objects/RfSensor.js.map +1 -0
- package/dist/objects/index.d.ts +5 -4
- package/dist/objects/index.js +6 -0
- package/dist/objects/index.js.map +1 -0
- package/dist/observation/Observation.d.ts +89 -0
- package/dist/observation/Observation.js +102 -0
- package/dist/observation/Observation.js.map +1 -0
- package/dist/observation/ObservationOptical.d.ts +48 -0
- package/dist/observation/ObservationOptical.js +105 -0
- package/dist/observation/ObservationOptical.js.map +1 -0
- package/dist/observation/ObservationRadar.d.ts +46 -0
- package/dist/observation/ObservationRadar.js +96 -0
- package/dist/observation/ObservationRadar.js.map +1 -0
- package/dist/observation/ObservationUtils.d.ts +20 -0
- package/dist/observation/ObservationUtils.js +32 -0
- package/dist/observation/ObservationUtils.js.map +1 -0
- package/dist/observation/PropagatorPairs.d.ts +32 -0
- package/dist/observation/PropagatorPairs.js +43 -0
- package/dist/observation/PropagatorPairs.js.map +1 -0
- package/dist/operations/BoxMuller.d.ts +46 -0
- package/dist/operations/BoxMuller.js +77 -0
- package/dist/operations/BoxMuller.js.map +1 -0
- package/dist/operations/EulerAngles.d.ts +105 -0
- package/dist/operations/EulerAngles.js +161 -0
- package/dist/operations/EulerAngles.js.map +1 -0
- package/dist/operations/Quaternion.d.ts +56 -0
- package/dist/operations/Quaternion.js +167 -0
- package/dist/operations/Quaternion.js.map +1 -0
- package/dist/operations/RandomGaussianSource.d.ts +24 -0
- package/dist/operations/RandomGaussianSource.js +43 -0
- package/dist/operations/RandomGaussianSource.js.map +1 -0
- package/dist/operations/index.d.ts +4 -0
- package/dist/operations/index.js +5 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/optimize/ChebyshevCompressor.d.ts +32 -0
- package/dist/optimize/ChebyshevCompressor.js +83 -0
- package/dist/optimize/ChebyshevCompressor.js.map +1 -0
- package/dist/optimize/DownhillSimplex.d.ts +64 -0
- package/dist/optimize/DownhillSimplex.js +182 -0
- package/dist/optimize/DownhillSimplex.js.map +1 -0
- package/dist/optimize/GoldenSection.d.ts +39 -0
- package/dist/optimize/GoldenSection.js +55 -0
- package/dist/optimize/GoldenSection.js.map +1 -0
- package/dist/optimize/PolynomialRegression.d.ts +49 -0
- package/dist/optimize/PolynomialRegression.js +83 -0
- package/dist/optimize/PolynomialRegression.js.map +1 -0
- package/dist/optimize/PolynomicalRegressionResult.d.ts +31 -0
- package/dist/optimize/PolynomicalRegressionResult.js +38 -0
- package/dist/optimize/PolynomicalRegressionResult.js.map +1 -0
- package/dist/optimize/SimpleLinearRegression.d.ts +44 -0
- package/dist/optimize/SimpleLinearRegression.js +112 -0
- package/dist/optimize/SimpleLinearRegression.js.map +1 -0
- package/dist/optimize/SimplexEntry.d.ts +32 -0
- package/dist/optimize/SimplexEntry.js +42 -0
- package/dist/optimize/SimplexEntry.js.map +1 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.d.ts +65 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.js +143 -0
- package/dist/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
- package/dist/orbit_determination/BatchLeastSquaresResult.d.ts +31 -0
- package/{lib/objects/space-object.d.ts → dist/orbit_determination/BatchLeastSquaresResult.js} +21 -23
- package/dist/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
- package/dist/orbit_determination/GibbsIOD.d.ts +38 -0
- package/dist/orbit_determination/GibbsIOD.js +76 -0
- package/dist/orbit_determination/GibbsIOD.js.map +1 -0
- package/dist/orbit_determination/GoodingIOD.d.ts +51 -0
- package/dist/orbit_determination/GoodingIOD.js +247 -0
- package/dist/orbit_determination/GoodingIOD.js.map +1 -0
- package/dist/orbit_determination/HerrickGibbsIOD.d.ts +33 -0
- package/dist/orbit_determination/HerrickGibbsIOD.js +50 -0
- package/dist/orbit_determination/HerrickGibbsIOD.js.map +1 -0
- package/dist/orbit_determination/LambertIOD.d.ts +59 -0
- package/dist/orbit_determination/LambertIOD.js +213 -0
- package/dist/orbit_determination/LambertIOD.js.map +1 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.d.ts +40 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.js +83 -0
- package/dist/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
- package/dist/propagator/DormandPrince54Propagator.d.ts +28 -0
- package/dist/propagator/DormandPrince54Propagator.js +64 -0
- package/dist/propagator/DormandPrince54Propagator.js.map +1 -0
- package/dist/propagator/KeplerPropagator.d.ts +35 -0
- package/dist/propagator/KeplerPropagator.js +84 -0
- package/dist/propagator/KeplerPropagator.js.map +1 -0
- package/dist/propagator/Propagator.d.ts +34 -0
- package/dist/propagator/Propagator.js +162 -0
- package/dist/propagator/Propagator.js.map +1 -0
- package/dist/propagator/RkCheckpoint.d.ts +22 -0
- package/dist/propagator/RkCheckpoint.js +27 -0
- package/dist/propagator/RkCheckpoint.js.map +1 -0
- package/dist/propagator/RkResult.d.ts +23 -0
- package/dist/propagator/RkResult.js +30 -0
- package/dist/propagator/RkResult.js.map +1 -0
- package/dist/propagator/RungeKutta4Propagator.d.ts +50 -0
- package/dist/propagator/RungeKutta4Propagator.js +141 -0
- package/dist/propagator/RungeKutta4Propagator.js.map +1 -0
- package/dist/propagator/RungeKutta89Propagator.d.ts +28 -0
- package/dist/propagator/RungeKutta89Propagator.js +126 -0
- package/dist/propagator/RungeKutta89Propagator.js.map +1 -0
- package/dist/propagator/RungeKuttaAdaptive.d.ts +54 -0
- package/dist/propagator/RungeKuttaAdaptive.js +159 -0
- package/dist/propagator/RungeKuttaAdaptive.js.map +1 -0
- package/dist/propagator/Sgp4Propagator.d.ts +34 -0
- package/dist/propagator/Sgp4Propagator.js +56 -0
- package/dist/propagator/Sgp4Propagator.js.map +1 -0
- package/dist/smoothing/ExponentialSmoothing.d.ts +23 -0
- package/dist/smoothing/ExponentialSmoothing.js +81 -0
- package/dist/smoothing/ExponentialSmoothing.js.map +1 -0
- package/dist/transforms/index.d.ts +1 -0
- package/dist/transforms/index.js +2 -0
- package/dist/transforms/index.js.map +1 -0
- package/dist/transforms/transforms.d.ts +56 -92
- package/dist/transforms/transforms.js +94 -0
- package/dist/transforms/transforms.js.map +1 -0
- package/dist/types/types.d.ts +105 -584
- package/dist/types/types.js +23 -0
- package/dist/types/types.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/jacobian.d.ts +11 -0
- package/dist/utils/jacobian.js +29 -0
- package/dist/utils/jacobian.js.map +1 -0
- package/package.json +34 -42
- package/src/coordinate/Hill.ts +326 -0
- package/src/coordinate/index.ts +1 -0
- package/src/covariance/CovarianceSample.ts +194 -0
- package/src/covariance/StateCovariance.ts +69 -0
- package/src/force/AtmosphericDrag.ts +101 -0
- package/src/force/EarthGravity.ts +157 -0
- package/src/force/Force.ts +33 -0
- package/src/force/ForceModel.ts +91 -0
- package/src/force/Gravity.ts +53 -0
- package/src/force/SolarRadiationPressure.ts +42 -0
- package/src/force/ThirdBodyGravity.ts +62 -0
- package/src/force/Thrust.ts +83 -0
- package/src/interfaces/RfSensorParams.ts +30 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interpolator/ChebyshevCoefficients.ts +109 -0
- package/src/interpolator/ChebyshevInterpolator.ts +87 -0
- package/src/interpolator/CubicSpline.ts +72 -0
- package/src/interpolator/CubicSplineInterpolator.ts +90 -0
- package/src/interpolator/FieldInterpolator.ts +37 -0
- package/src/interpolator/Interpolator.ts +56 -0
- package/src/interpolator/LagrangeInterpolator.ts +192 -0
- package/src/interpolator/StateInterpolator.ts +39 -0
- package/src/interpolator/VerletBlendInterpolator.ts +146 -0
- package/src/main.ts +32 -0
- package/src/maneuver/TwoBurnOrbitTransfer.ts +79 -0
- package/src/maneuver/Waypoint.ts +267 -0
- package/src/objects/DetailedSatellite.ts +159 -0
- package/src/objects/DetailedSensor.ts +68 -0
- package/src/objects/LandObject.ts +46 -0
- package/src/objects/Marker.ts +25 -0
- package/src/objects/RfSensor.ts +78 -0
- package/src/objects/index.ts +5 -0
- package/src/observation/Observation.ts +125 -0
- package/src/observation/ObservationOptical.ts +146 -0
- package/src/observation/ObservationRadar.ts +131 -0
- package/src/observation/ObservationUtils.ts +40 -0
- package/src/observation/PropagatorPairs.ts +45 -0
- package/src/operations/BoxMuller.ts +87 -0
- package/src/operations/EulerAngles.ts +183 -0
- package/src/operations/Quaternion.ts +222 -0
- package/src/operations/RandomGaussianSource.ts +51 -0
- package/src/operations/index.ts +4 -0
- package/src/optimize/ChebyshevCompressor.ts +96 -0
- package/src/optimize/DownhillSimplex.ts +212 -0
- package/src/optimize/GoldenSection.ts +71 -0
- package/src/optimize/PolynomialRegression.ts +109 -0
- package/src/optimize/PolynomicalRegressionResult.ts +32 -0
- package/src/optimize/SimpleLinearRegression.ts +127 -0
- package/src/optimize/SimplexEntry.ts +50 -0
- package/src/orbit_determination/BatchLeastSquaresOD.ts +174 -0
- package/src/orbit_determination/BatchLeastSquaresResult.ts +33 -0
- package/src/orbit_determination/GibbsIOD.ts +95 -0
- package/src/orbit_determination/GoodingIOD.ts +380 -0
- package/src/orbit_determination/HerrickGibbsIOD.ts +51 -0
- package/src/orbit_determination/LambertIOD.ts +260 -0
- package/src/orbit_determination/ModifiedGoodingIOD.ts +133 -0
- package/src/propagator/DormandPrince54Propagator.ts +73 -0
- package/src/propagator/KeplerPropagator.ts +102 -0
- package/src/propagator/Propagator.ts +253 -0
- package/src/propagator/RkCheckpoint.ts +25 -0
- package/src/propagator/RkResult.ts +26 -0
- package/src/propagator/RungeKutta4Propagator.ts +179 -0
- package/src/propagator/RungeKutta89Propagator.ts +132 -0
- package/src/propagator/RungeKuttaAdaptive.ts +232 -0
- package/src/propagator/Sgp4Propagator.ts +71 -0
- package/src/smoothing/ExponentialSmoothing.ts +90 -0
- package/src/transforms/index.ts +1 -0
- package/src/transforms/transforms.ts +117 -0
- package/src/types/types.ts +135 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/jacobian.ts +38 -0
- package/.eslintrc.json +0 -244
- package/.prettierrc +0 -17
- package/babel.config.js +0 -16
- package/codecov.yml +0 -21
- package/dist/objects/base-object.d.ts +0 -40
- package/dist/objects/detailed-sat.d.ts +0 -66
- package/dist/objects/sat.d.ts +0 -92
- package/dist/objects/sensor.d.ts +0 -93
- package/dist/objects/star.d.ts +0 -46
- package/dist/ootk.js +0 -2
- package/dist/ootk.js.LICENSE.txt +0 -77
- package/dist/sgp4/sgp4.d.ts +0 -82
- package/dist/tle/tle-format-data.d.ts +0 -6
- package/dist/tle/tle.d.ts +0 -375
- package/dist/utils/constants.d.ts +0 -34
- package/dist/utils/moon-math.d.ts +0 -113
- package/dist/utils/sun-math.d.ts +0 -230
- package/dist/utils/utils.d.ts +0 -39
- package/jest.config.ts +0 -30
- package/lib/objects/base-object.d.ts +0 -40
- package/lib/objects/base-object.js +0 -79
- package/lib/objects/base-object.js.map +0 -1
- package/lib/objects/detailed-sat.js +0 -149
- package/lib/objects/detailed-sat.js.map +0 -1
- package/lib/objects/index.d.ts +0 -4
- package/lib/objects/index.js +0 -5
- package/lib/objects/index.js.map +0 -1
- package/lib/objects/sat.d.ts +0 -92
- package/lib/objects/sat.js +0 -188
- package/lib/objects/sat.js.map +0 -1
- package/lib/objects/sensor.d.ts +0 -93
- package/lib/objects/sensor.js +0 -273
- package/lib/objects/sensor.js.map +0 -1
- package/lib/objects/space-object.js +0 -60
- package/lib/objects/space-object.js.map +0 -1
- package/lib/objects/star.d.ts +0 -46
- package/lib/objects/star.js +0 -91
- package/lib/objects/star.js.map +0 -1
- package/lib/ootk.js.map +0 -1
- package/lib/sgp4/sgp4.d.ts +0 -82
- package/lib/sgp4/sgp4.js +0 -3262
- package/lib/sgp4/sgp4.js.map +0 -1
- package/lib/tle/tle-format-data.d.ts +0 -6
- package/lib/tle/tle-format-data.js +0 -10
- package/lib/tle/tle-format-data.js.map +0 -1
- package/lib/tle/tle.d.ts +0 -375
- package/lib/tle/tle.js +0 -611
- package/lib/tle/tle.js.map +0 -1
- package/lib/transforms/transforms.d.ts +0 -94
- package/lib/transforms/transforms.js +0 -308
- package/lib/transforms/transforms.js.map +0 -1
- package/lib/types/types.d.ts +0 -605
- package/lib/types/types.js +0 -36
- package/lib/types/types.js.map +0 -1
- package/lib/utils/constants.d.ts +0 -34
- package/lib/utils/constants.js +0 -35
- package/lib/utils/constants.js.map +0 -1
- package/lib/utils/moon-math.d.ts +0 -113
- package/lib/utils/moon-math.js +0 -387
- package/lib/utils/moon-math.js.map +0 -1
- package/lib/utils/sun-math.d.ts +0 -230
- package/lib/utils/sun-math.js +0 -422
- package/lib/utils/sun-math.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -39
- package/lib/utils/utils.js +0 -102
- package/lib/utils/utils.js.map +0 -1
- package/sandbox.html +0 -8
- package/tsconfig.base.json +0 -31
- package/tsconfig.build.json +0 -14
- /package/{LICENSE.MD → LICENSE.md} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DEG2RAD, RAD2DEG, TAU } from 'ootk-core';
|
|
2
|
+
/**
|
|
3
|
+
* Converts Azimuth and Elevation to U and V.
|
|
4
|
+
* Azimuth is the angle off of boresight in the horizontal plane.
|
|
5
|
+
* Elevation is the angle off of boresight in the vertical plane.
|
|
6
|
+
* Cone half angle is the angle of the cone of the radar max field of view.
|
|
7
|
+
* @param az - Azimuth in radians
|
|
8
|
+
* @param el - Elevation in radians
|
|
9
|
+
* @param coneHalfAngle - Cone half angle in radians
|
|
10
|
+
* @returns U and V in radians
|
|
11
|
+
*/
|
|
12
|
+
export function azel2uv(az, el, coneHalfAngle) {
|
|
13
|
+
if (az > coneHalfAngle && az < coneHalfAngle) {
|
|
14
|
+
throw new RangeError(`Azimuth is out of bounds: ${az}`);
|
|
15
|
+
}
|
|
16
|
+
if (el > coneHalfAngle && el < coneHalfAngle) {
|
|
17
|
+
throw new RangeError(`Elevation is out of bounds: ${el}`);
|
|
18
|
+
}
|
|
19
|
+
const alpha = (az / (coneHalfAngle * RAD2DEG)) * 90;
|
|
20
|
+
const beta = (el / (coneHalfAngle * RAD2DEG)) * 90;
|
|
21
|
+
const u = Math.sin(alpha);
|
|
22
|
+
let v = -Math.sin(beta);
|
|
23
|
+
v = Object.is(v, -0) ? 0 : v;
|
|
24
|
+
return { u, v };
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Determine azimuth and elevation off of boresight based on sensor orientation and RAE.
|
|
28
|
+
* @param rae Range, Azimuth, Elevation
|
|
29
|
+
* @param sensor Radar sensor object
|
|
30
|
+
* @param maxSensorAz Maximum sensor azimuth
|
|
31
|
+
* @returns Azimuth and Elevation off of boresight
|
|
32
|
+
*/
|
|
33
|
+
export function rae2raeOffBoresight(rae, sensor, maxSensorAz) {
|
|
34
|
+
let az = (rae.az * DEG2RAD);
|
|
35
|
+
let el = (rae.el * DEG2RAD);
|
|
36
|
+
// Correct azimuth for sensor orientation.
|
|
37
|
+
az = az > maxSensorAz * DEG2RAD ? (az - TAU) : az;
|
|
38
|
+
az = (az - sensor.boresightAz);
|
|
39
|
+
el = (el - sensor.boresightEl);
|
|
40
|
+
return { az, el };
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Converts Range Az El to Range U V.
|
|
44
|
+
* @param rae Range, Azimuth, Elevation
|
|
45
|
+
* @param sensor Radar sensor object
|
|
46
|
+
* @param maxSensorAz Maximum sensor azimuth
|
|
47
|
+
* @returns Range, U, V
|
|
48
|
+
*/
|
|
49
|
+
export function rae2ruv(rae, sensor, maxSensorAz) {
|
|
50
|
+
const { az, el } = rae2raeOffBoresight(rae, sensor, maxSensorAz);
|
|
51
|
+
const { u, v } = azel2uv(az, el, sensor.coneHalfAngleRad);
|
|
52
|
+
return { rng: rae.rng, u, v };
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Converts U and V to Azimuth and Elevation off of boresight.
|
|
56
|
+
* @param u The U coordinate.
|
|
57
|
+
* @param v The V coordinate.
|
|
58
|
+
* @param coneHalfAngle The cone half angle of the radar.
|
|
59
|
+
* @returns Azimuth and Elevation off of boresight.
|
|
60
|
+
*/
|
|
61
|
+
export function uv2azel(u, v, coneHalfAngle) {
|
|
62
|
+
if (u > 1 || u < -1) {
|
|
63
|
+
throw new RangeError(`u is out of bounds: ${u}`);
|
|
64
|
+
}
|
|
65
|
+
if (v > 1 || v < -1) {
|
|
66
|
+
throw new RangeError(`v is out of bounds: ${v}`);
|
|
67
|
+
}
|
|
68
|
+
const alpha = Math.asin(u);
|
|
69
|
+
const beta = Math.asin(v);
|
|
70
|
+
const az = ((alpha / 90) * (coneHalfAngle * RAD2DEG));
|
|
71
|
+
const el = ((beta / 90) * (coneHalfAngle * RAD2DEG));
|
|
72
|
+
return { az, el };
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Converts coordinates from East-North-Up (ENU) to Right-Front-Up (RF) coordinate system.
|
|
76
|
+
* @param enu - The ENU coordinates to be converted.
|
|
77
|
+
* @param enu.x - The east coordinate.
|
|
78
|
+
* @param enu.y - The north coordinate.
|
|
79
|
+
* @param enu.z - The up coordinate.
|
|
80
|
+
* @param az - The azimuth angle in radians.
|
|
81
|
+
* @param el - The elevation angle in radians.
|
|
82
|
+
* @returns The converted RF coordinates.
|
|
83
|
+
*/
|
|
84
|
+
export function enu2rf({ x, y, z }, az, el) {
|
|
85
|
+
const xrf = Math.cos(el) * Math.cos(az) * x - Math.sin(az) * y + Math.sin(el) * Math.cos(az) * z;
|
|
86
|
+
const yrf = Math.cos(el) * Math.sin(az) * x + Math.cos(az) * y + Math.sin(el) * Math.sin(az) * z;
|
|
87
|
+
const zrf = -Math.sin(el) * x + Math.cos(el) * z;
|
|
88
|
+
return {
|
|
89
|
+
x: xrf,
|
|
90
|
+
y: yrf,
|
|
91
|
+
z: zrf,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=transforms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../src/transforms/transforms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoB,OAAO,EAAoB,GAAG,EAAE,MAAM,WAAW,CAAC;AAItF;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,EAAW,EAAE,EAAW,EAAE,aAAsB;IACtE,IAAI,EAAE,GAAG,aAAa,IAAI,EAAE,GAAG,aAAa,EAAE;QAC5C,MAAM,IAAI,UAAU,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;KACzD;IAED,IAAI,EAAE,GAAG,aAAa,IAAI,EAAE,GAAG,aAAa,EAAE;QAC5C,MAAM,IAAI,UAAU,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAC;KAC3D;IAED,MAAM,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,aAAa,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IACpD,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,aAAa,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IAEnD,MAAM,CAAC,GAAG,IAAI,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