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.
- package/.eslintrc.json +14 -14
- package/CHANGELOG.md +122 -0
- package/README.md +27 -40
- package/jest.config.ts +30 -0
- package/lib/coordinate/Hill.d.ts +50 -0
- package/lib/coordinate/Hill.js +214 -0
- package/lib/coordinate/Hill.js.map +1 -0
- package/lib/coordinate/index.d.ts +1 -0
- package/lib/coordinate/index.js +2 -0
- package/lib/coordinate/index.js.map +1 -0
- package/lib/covariance/CovarianceSample.d.ts +44 -0
- package/lib/covariance/CovarianceSample.js +146 -0
- package/lib/covariance/CovarianceSample.js.map +1 -0
- package/lib/covariance/StateCovariance.d.ts +41 -0
- package/lib/covariance/StateCovariance.js +62 -0
- package/lib/covariance/StateCovariance.js.map +1 -0
- package/lib/force/AtmosphericDrag.d.ts +32 -0
- package/lib/force/AtmosphericDrag.js +66 -0
- package/lib/force/AtmosphericDrag.js.map +1 -0
- package/{dist/ootk.d.ts → lib/force/EarthGravity.d.ts} +13 -11
- package/lib/force/EarthGravity.js +115 -0
- package/lib/force/EarthGravity.js.map +1 -0
- package/lib/force/Force.d.ts +25 -0
- package/lib/force/Force.js +30 -0
- package/lib/force/Force.js.map +1 -0
- package/lib/force/ForceModel.d.ts +38 -0
- package/lib/force/ForceModel.js +71 -0
- package/lib/force/ForceModel.js.map +1 -0
- package/lib/force/Gravity.d.ts +41 -0
- package/lib/force/Gravity.js +48 -0
- package/lib/force/Gravity.js.map +1 -0
- package/lib/force/SolarRadiationPressure.d.ts +27 -0
- package/lib/force/SolarRadiationPressure.js +42 -0
- package/lib/force/SolarRadiationPressure.js.map +1 -0
- package/lib/force/ThirdBodyGravity.d.ts +27 -0
- package/lib/force/ThirdBodyGravity.js +56 -0
- package/lib/force/ThirdBodyGravity.js.map +1 -0
- package/lib/force/Thrust.d.ts +35 -0
- package/lib/force/Thrust.js +53 -0
- package/lib/force/Thrust.js.map +1 -0
- package/lib/interpolator/ChebyshevCoefficients.d.ts +54 -0
- package/lib/interpolator/ChebyshevCoefficients.js +90 -0
- package/lib/interpolator/ChebyshevCoefficients.js.map +1 -0
- package/lib/interpolator/ChebyshevInterpolator.d.ts +39 -0
- package/lib/interpolator/ChebyshevInterpolator.js +71 -0
- package/lib/interpolator/ChebyshevInterpolator.js.map +1 -0
- package/lib/interpolator/CubicSpline.d.ts +36 -0
- package/lib/interpolator/CubicSpline.js +64 -0
- package/lib/interpolator/CubicSpline.js.map +1 -0
- package/lib/interpolator/CubicSplineInterpolator.d.ts +37 -0
- package/lib/interpolator/CubicSplineInterpolator.js +78 -0
- package/lib/interpolator/CubicSplineInterpolator.js.map +1 -0
- package/lib/interpolator/FieldInterpolator.d.ts +26 -0
- package/lib/interpolator/FieldInterpolator.js +31 -0
- package/lib/interpolator/FieldInterpolator.js.map +1 -0
- package/lib/interpolator/Interpolator.d.ts +23 -0
- package/lib/interpolator/Interpolator.js +48 -0
- package/lib/interpolator/Interpolator.js.map +1 -0
- package/lib/interpolator/LagrangeInterpolator.d.ts +42 -0
- package/lib/interpolator/LagrangeInterpolator.js +156 -0
- package/lib/interpolator/LagrangeInterpolator.js.map +1 -0
- package/lib/interpolator/StateInterpolator.d.ts +29 -0
- package/lib/interpolator/StateInterpolator.js +37 -0
- package/lib/interpolator/StateInterpolator.js.map +1 -0
- package/lib/interpolator/VerletBlendInterpolator.d.ts +44 -0
- package/lib/interpolator/VerletBlendInterpolator.js +115 -0
- package/lib/interpolator/VerletBlendInterpolator.js.map +1 -0
- package/lib/maneuver/TwoBurnOrbitTransfer.d.ts +43 -0
- package/lib/maneuver/TwoBurnOrbitTransfer.js +62 -0
- package/lib/maneuver/TwoBurnOrbitTransfer.js.map +1 -0
- package/lib/maneuver/Waypoint.d.ts +66 -0
- package/lib/maneuver/Waypoint.js +152 -0
- package/lib/maneuver/Waypoint.js.map +1 -0
- package/lib/objects/DetailedSatellite.d.ts +94 -0
- package/lib/objects/DetailedSatellite.js +140 -0
- package/lib/objects/DetailedSatellite.js.map +1 -0
- package/lib/objects/DetailedSensor.d.ts +43 -0
- package/lib/objects/DetailedSensor.js +45 -0
- package/lib/objects/DetailedSensor.js.map +1 -0
- package/lib/objects/{space-object.d.ts → LandObject.d.ts} +19 -21
- package/lib/objects/LandObject.js +28 -0
- package/lib/objects/LandObject.js.map +1 -0
- package/lib/objects/Marker.d.ts +21 -0
- package/lib/objects/Marker.js +25 -0
- package/lib/objects/Marker.js.map +1 -0
- package/lib/objects/index.d.ts +5 -4
- package/lib/objects/index.js +5 -4
- package/lib/objects/index.js.map +1 -1
- package/lib/observation/Observation.d.ts +51 -0
- package/lib/observation/Observation.js +71 -0
- package/lib/observation/Observation.js.map +1 -0
- package/lib/observation/ObservationOptical.d.ts +47 -0
- package/lib/observation/ObservationOptical.js +101 -0
- package/lib/observation/ObservationOptical.js.map +1 -0
- package/lib/observation/ObservationRadar.d.ts +43 -0
- package/lib/observation/ObservationRadar.js +90 -0
- package/lib/observation/ObservationRadar.js.map +1 -0
- package/lib/observation/ObservationUtils.d.ts +21 -0
- package/lib/observation/ObservationUtils.js +33 -0
- package/lib/observation/ObservationUtils.js.map +1 -0
- package/lib/observation/PropagatorPairs.d.ts +31 -0
- package/lib/observation/PropagatorPairs.js +40 -0
- package/lib/observation/PropagatorPairs.js.map +1 -0
- package/lib/ootk.d.ts +10 -9
- package/lib/ootk.js +10 -9
- package/lib/ootk.js.map +1 -1
- package/lib/operations/BoxMuller.d.ts +41 -0
- package/lib/operations/BoxMuller.js +66 -0
- package/lib/operations/BoxMuller.js.map +1 -0
- package/lib/operations/EulerAngles.d.ts +50 -0
- package/lib/operations/EulerAngles.js +111 -0
- package/lib/operations/EulerAngles.js.map +1 -0
- package/lib/operations/Quaternion.d.ts +57 -0
- package/lib/operations/Quaternion.js +164 -0
- package/lib/operations/Quaternion.js.map +1 -0
- package/lib/operations/RandomGaussianSource.d.ts +25 -0
- package/lib/operations/RandomGaussianSource.js +43 -0
- package/lib/operations/RandomGaussianSource.js.map +1 -0
- package/lib/operations/index.d.ts +4 -0
- package/lib/operations/index.js +5 -0
- package/lib/operations/index.js.map +1 -0
- package/lib/optimize/ChebyshevCompressor.d.ts +31 -0
- package/lib/optimize/ChebyshevCompressor.js +80 -0
- package/lib/optimize/ChebyshevCompressor.js.map +1 -0
- package/lib/optimize/DownhillSimplex.d.ts +50 -0
- package/lib/optimize/DownhillSimplex.js +168 -0
- package/lib/optimize/DownhillSimplex.js.map +1 -0
- package/lib/optimize/GoldenSection.d.ts +33 -0
- package/lib/optimize/GoldenSection.js +49 -0
- package/lib/optimize/GoldenSection.js.map +1 -0
- package/lib/optimize/PolynomialRegression.d.ts +37 -0
- package/lib/optimize/PolynomialRegression.js +66 -0
- package/lib/optimize/PolynomialRegression.js.map +1 -0
- package/lib/optimize/PolynomicalRegressionResult.d.ts +28 -0
- package/lib/optimize/PolynomicalRegressionResult.js +32 -0
- package/lib/optimize/PolynomicalRegressionResult.js.map +1 -0
- package/lib/optimize/SimpleLinearRegression.d.ts +41 -0
- package/lib/optimize/SimpleLinearRegression.js +107 -0
- package/lib/optimize/SimpleLinearRegression.js.map +1 -0
- package/lib/optimize/SimplexEntry.d.ts +33 -0
- package/lib/optimize/SimplexEntry.js +39 -0
- package/lib/optimize/SimplexEntry.js.map +1 -0
- package/lib/orbit_determination/BatchLeastSquaresOD.d.ts +54 -0
- package/lib/orbit_determination/BatchLeastSquaresOD.js +118 -0
- package/lib/orbit_determination/BatchLeastSquaresOD.js.map +1 -0
- package/lib/orbit_determination/BatchLeastSquaresResult.d.ts +29 -0
- package/lib/orbit_determination/BatchLeastSquaresResult.js +31 -0
- package/lib/orbit_determination/BatchLeastSquaresResult.js.map +1 -0
- package/lib/orbit_determination/GibbsIOD.d.ts +33 -0
- package/lib/orbit_determination/GibbsIOD.js +70 -0
- package/lib/orbit_determination/GibbsIOD.js.map +1 -0
- package/lib/orbit_determination/GoodingIOD.d.ts +52 -0
- package/lib/orbit_determination/GoodingIOD.js +244 -0
- package/lib/orbit_determination/GoodingIOD.js.map +1 -0
- package/{dist/objects/space-object.d.ts → lib/orbit_determination/HerrickGibbsIOD.d.ts} +17 -22
- package/lib/orbit_determination/HerrickGibbsIOD.js +49 -0
- package/lib/orbit_determination/HerrickGibbsIOD.js.map +1 -0
- package/lib/orbit_determination/LambertIOD.d.ts +46 -0
- package/lib/orbit_determination/LambertIOD.js +199 -0
- package/lib/orbit_determination/LambertIOD.js.map +1 -0
- package/lib/orbit_determination/ModifiedGoodingIOD.d.ts +41 -0
- package/lib/orbit_determination/ModifiedGoodingIOD.js +82 -0
- package/lib/orbit_determination/ModifiedGoodingIOD.js.map +1 -0
- package/lib/propagator/DormandPrince54Propagator.d.ts +29 -0
- package/lib/propagator/DormandPrince54Propagator.js +68 -0
- package/lib/propagator/DormandPrince54Propagator.js.map +1 -0
- package/lib/propagator/KeplerPropagator.d.ts +36 -0
- package/lib/propagator/KeplerPropagator.js +81 -0
- package/lib/propagator/KeplerPropagator.js.map +1 -0
- package/lib/propagator/Propagator.d.ts +35 -0
- package/lib/propagator/Propagator.js +163 -0
- package/lib/propagator/Propagator.js.map +1 -0
- package/lib/propagator/RkCheckpoint.d.ts +23 -0
- package/lib/propagator/RkCheckpoint.js +26 -0
- package/lib/propagator/RkCheckpoint.js.map +1 -0
- package/lib/propagator/RkResult.d.ts +24 -0
- package/lib/propagator/RkResult.js +28 -0
- package/lib/propagator/RkResult.js.map +1 -0
- package/lib/propagator/RungeKutta4Propagator.d.ts +46 -0
- package/lib/propagator/RungeKutta4Propagator.js +132 -0
- package/lib/propagator/RungeKutta4Propagator.js.map +1 -0
- package/lib/propagator/RungeKutta89Propagator.d.ts +29 -0
- package/lib/propagator/RungeKutta89Propagator.js +130 -0
- package/lib/propagator/RungeKutta89Propagator.js.map +1 -0
- package/lib/propagator/RungeKuttaAdaptive.d.ts +52 -0
- package/lib/propagator/RungeKuttaAdaptive.js +152 -0
- package/lib/propagator/RungeKuttaAdaptive.js.map +1 -0
- package/lib/propagator/Sgp4Propagator.d.ts +35 -0
- package/lib/propagator/Sgp4Propagator.js +55 -0
- package/lib/propagator/Sgp4Propagator.js.map +1 -0
- package/lib/smoothing/ExponentialSmoothing.d.ts +24 -0
- package/lib/smoothing/ExponentialSmoothing.js +82 -0
- package/lib/smoothing/ExponentialSmoothing.js.map +1 -0
- package/lib/types/types.d.ts +68 -262
- package/lib/types/types.js +23 -33
- package/lib/types/types.js.map +1 -1
- package/package.json +28 -42
- 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/index.d.ts +0 -4
- package/dist/objects/sat.d.ts +0 -92
- package/dist/objects/sensor.d.ts +0 -87
- 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/Sgp4Assembly.d.ts +0 -5
- 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 -374
- package/dist/transforms/transforms.d.ts +0 -55
- package/dist/types/types.d.ts +0 -280
- 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/lib/objects/base-object.d.ts +0 -40
- package/lib/objects/base-object.js +0 -109
- package/lib/objects/base-object.js.map +0 -1
- package/lib/objects/detailed-sat.d.ts +0 -66
- package/lib/objects/detailed-sat.js +0 -149
- package/lib/objects/detailed-sat.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 -87
- package/lib/objects/sensor.js +0 -255
- 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/sgp4/Sgp4Assembly.d.ts +0 -5
- package/lib/sgp4/Sgp4Assembly.js +0 -75
- package/lib/sgp4/Sgp4Assembly.js.map +0 -1
- package/lib/sgp4/sgp4.d.ts +0 -82
- package/lib/sgp4/sgp4.js +0 -3274
- 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 -374
- package/lib/tle/tle.js +0 -611
- package/lib/tle/tle.js.map +0 -1
- package/lib/transforms/transforms.d.ts +0 -55
- package/lib/transforms/transforms.js +0 -209
- package/lib/transforms/transforms.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 -100
- package/lib/utils/utils.js.map +0 -1
- package/sandbox.html +0 -8
- /package/{LICENSE.MD → LICENSE.md} +0 -0
package/lib/objects/sensor.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Theodore Kruczek.
|
|
3
|
-
* @description Orbital Object ToolKit (OOTK) is a collection of tools for working
|
|
4
|
-
* with satellites and other orbital objects.
|
|
5
|
-
*
|
|
6
|
-
* @file The Sensor class is used for creating ground based observers.
|
|
7
|
-
*
|
|
8
|
-
* @license AGPL-3.0-or-later
|
|
9
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
10
|
-
*
|
|
11
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
12
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
13
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
14
|
-
*
|
|
15
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
16
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
17
|
-
* See the GNU Affero General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
20
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
import { Degrees, Kilometers, Radians, RaeVec3, SpaceObjectType } from '../types/types';
|
|
23
|
-
import { BaseObject } from './base-object';
|
|
24
|
-
import { Sat } from './sat';
|
|
25
|
-
interface ObjectInfo {
|
|
26
|
-
name?: string;
|
|
27
|
-
type?: SpaceObjectType;
|
|
28
|
-
lat: Radians;
|
|
29
|
-
lon: Radians;
|
|
30
|
-
alt: Kilometers;
|
|
31
|
-
minAz?: Degrees;
|
|
32
|
-
maxAz?: Degrees;
|
|
33
|
-
minEl?: Degrees;
|
|
34
|
-
maxEl?: Degrees;
|
|
35
|
-
minRng?: Kilometers;
|
|
36
|
-
maxRng?: Kilometers;
|
|
37
|
-
}
|
|
38
|
-
export declare enum PassType {
|
|
39
|
-
OUT_OF_VIEW = -1,
|
|
40
|
-
ENTER = 0,
|
|
41
|
-
IN_VIEW = 1,
|
|
42
|
-
EXIT = 2
|
|
43
|
-
}
|
|
44
|
-
type Lookangles = {
|
|
45
|
-
type: PassType;
|
|
46
|
-
time: Date;
|
|
47
|
-
az: Degrees;
|
|
48
|
-
el: Degrees;
|
|
49
|
-
rng: Kilometers;
|
|
50
|
-
maxElPass?: Degrees;
|
|
51
|
-
};
|
|
52
|
-
export declare class Sensor extends BaseObject {
|
|
53
|
-
lat: Radians;
|
|
54
|
-
lon: Radians;
|
|
55
|
-
alt: Kilometers;
|
|
56
|
-
minAz: Degrees;
|
|
57
|
-
maxAz: Degrees;
|
|
58
|
-
minEl: Degrees;
|
|
59
|
-
maxEl: Degrees;
|
|
60
|
-
minRng: Kilometers;
|
|
61
|
-
maxRng: Kilometers;
|
|
62
|
-
/**
|
|
63
|
-
* * name: Name as a string - OPTIONAL
|
|
64
|
-
* * type: SpaceObjectType - OPTIONAL
|
|
65
|
-
* * lat: Latitude in Radians
|
|
66
|
-
* * lon: Longitude in Radians
|
|
67
|
-
* * alt: Altitude in Kilometers
|
|
68
|
-
* * minAz: Minimum Azimuth in Degrees
|
|
69
|
-
* * maxAz: Maximum Azimuth in Degrees
|
|
70
|
-
* * minEl: Minimum Elevation in Degrees
|
|
71
|
-
* * maxEl: Maximum Elevation in Degrees
|
|
72
|
-
* * minRng: Minimum Range in Kilometers
|
|
73
|
-
* * maxRng: Maximum Range in Kilometers
|
|
74
|
-
* @param {ObjectInfo} info ObjectInfo object containing the object's information
|
|
75
|
-
*/
|
|
76
|
-
constructor(info: ObjectInfo);
|
|
77
|
-
private validateInputData;
|
|
78
|
-
private validateFov;
|
|
79
|
-
private validateLla;
|
|
80
|
-
setTime(date: Date): Sensor;
|
|
81
|
-
getRae(sat: Sat, date?: Date): RaeVec3;
|
|
82
|
-
isRaeInFov(rae: RaeVec3): boolean;
|
|
83
|
-
isSatInFov(sat: Sat, date?: Date): boolean;
|
|
84
|
-
calculatePasses(planningInterval: number, sat: Sat, date?: Date): Lookangles[];
|
|
85
|
-
private static getPassType;
|
|
86
|
-
}
|
|
87
|
-
export {};
|
package/lib/objects/sensor.js
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Theodore Kruczek.
|
|
3
|
-
* @description Orbital Object ToolKit (OOTK) is a collection of tools for working
|
|
4
|
-
* with satellites and other orbital objects.
|
|
5
|
-
*
|
|
6
|
-
* @file The Sensor class is used for creating ground based observers.
|
|
7
|
-
*
|
|
8
|
-
* @license AGPL-3.0-or-later
|
|
9
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
10
|
-
*
|
|
11
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
12
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
13
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
14
|
-
*
|
|
15
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
16
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
17
|
-
* See the GNU Affero General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
20
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
if (typeof b !== "function" && b !== null)
|
|
31
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
32
|
-
extendStatics(d, b);
|
|
33
|
-
function __() { this.constructor = d; }
|
|
34
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
import { SpaceObjectType } from '../types/types';
|
|
38
|
-
import { BaseObject } from './base-object';
|
|
39
|
-
import { RAD2DEG } from '../utils/constants';
|
|
40
|
-
export var PassType;
|
|
41
|
-
(function (PassType) {
|
|
42
|
-
PassType[PassType["OUT_OF_VIEW"] = -1] = "OUT_OF_VIEW";
|
|
43
|
-
PassType[PassType["ENTER"] = 0] = "ENTER";
|
|
44
|
-
PassType[PassType["IN_VIEW"] = 1] = "IN_VIEW";
|
|
45
|
-
PassType[PassType["EXIT"] = 2] = "EXIT";
|
|
46
|
-
})(PassType || (PassType = {}));
|
|
47
|
-
var TAU = Math.PI * 2;
|
|
48
|
-
var Sensor = /** @class */ (function (_super) {
|
|
49
|
-
__extends(Sensor, _super);
|
|
50
|
-
/**
|
|
51
|
-
* * name: Name as a string - OPTIONAL
|
|
52
|
-
* * type: SpaceObjectType - OPTIONAL
|
|
53
|
-
* * lat: Latitude in Radians
|
|
54
|
-
* * lon: Longitude in Radians
|
|
55
|
-
* * alt: Altitude in Kilometers
|
|
56
|
-
* * minAz: Minimum Azimuth in Degrees
|
|
57
|
-
* * maxAz: Maximum Azimuth in Degrees
|
|
58
|
-
* * minEl: Minimum Elevation in Degrees
|
|
59
|
-
* * maxEl: Maximum Elevation in Degrees
|
|
60
|
-
* * minRng: Minimum Range in Kilometers
|
|
61
|
-
* * maxRng: Maximum Range in Kilometers
|
|
62
|
-
* @param {ObjectInfo} info ObjectInfo object containing the object's information
|
|
63
|
-
*/
|
|
64
|
-
function Sensor(info) {
|
|
65
|
-
var _this = this;
|
|
66
|
-
// If there is a sensor type verify it is valid
|
|
67
|
-
if (info.type) {
|
|
68
|
-
switch (info.type) {
|
|
69
|
-
case SpaceObjectType.OPTICAL:
|
|
70
|
-
case SpaceObjectType.MECHANICAL:
|
|
71
|
-
case SpaceObjectType.PHASED_ARRAY_RADAR:
|
|
72
|
-
case SpaceObjectType.OBSERVER:
|
|
73
|
-
case SpaceObjectType.BISTATIC_RADIO_TELESCOPE:
|
|
74
|
-
break;
|
|
75
|
-
default:
|
|
76
|
-
throw new Error('Invalid sensor type');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
_this = _super.call(this, info) || this;
|
|
80
|
-
_this.validateInputData(info);
|
|
81
|
-
return _this;
|
|
82
|
-
}
|
|
83
|
-
Sensor.prototype.validateInputData = function (info) {
|
|
84
|
-
this.validateLla(info);
|
|
85
|
-
this.validateFov(info);
|
|
86
|
-
};
|
|
87
|
-
Sensor.prototype.validateFov = function (info) {
|
|
88
|
-
if (info.minAz >= 0 && info.minAz <= 360) {
|
|
89
|
-
this.minAz = info.minAz;
|
|
90
|
-
}
|
|
91
|
-
else if (typeof info.minAz === 'undefined') {
|
|
92
|
-
// Default is a telescope
|
|
93
|
-
this.minAz = 0;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
throw new Error('Invalid minimum azimuth - must be between 0 and 360');
|
|
97
|
-
}
|
|
98
|
-
if (info.maxAz >= 0 && info.maxAz <= 360) {
|
|
99
|
-
this.maxAz = info.maxAz;
|
|
100
|
-
}
|
|
101
|
-
else if (typeof info.maxAz === 'undefined') {
|
|
102
|
-
// Default is a telescope
|
|
103
|
-
this.maxAz = 360;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
throw new Error('Invalid maximum azimuth - must be between 0 and 360');
|
|
107
|
-
}
|
|
108
|
-
if (info.minEl >= 0 && info.minEl <= 90) {
|
|
109
|
-
this.minEl = info.minEl;
|
|
110
|
-
}
|
|
111
|
-
else if (typeof info.minEl === 'undefined') {
|
|
112
|
-
// Default is a telescope
|
|
113
|
-
this.minEl = 0;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
throw new Error('Invalid minimum elevation - must be between 0 and 90');
|
|
117
|
-
}
|
|
118
|
-
if (info.maxEl >= 0 && info.maxEl <= 180) {
|
|
119
|
-
this.maxEl = info.maxEl;
|
|
120
|
-
}
|
|
121
|
-
else if (typeof info.maxEl === 'undefined') {
|
|
122
|
-
// Default is a telescope
|
|
123
|
-
this.maxEl = 90;
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
throw new Error('Invalid maximum elevation - must be between 0 and 180');
|
|
127
|
-
}
|
|
128
|
-
if (info.minRng >= 0) {
|
|
129
|
-
this.minRng = info.minRng;
|
|
130
|
-
}
|
|
131
|
-
else if (typeof info.minRng === 'undefined') {
|
|
132
|
-
// Default is a telescope
|
|
133
|
-
this.minRng = 0;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
throw new Error('Invalid minimum range - must be greater than 0');
|
|
137
|
-
}
|
|
138
|
-
if (info.maxRng >= 0) {
|
|
139
|
-
this.maxRng = info.maxRng;
|
|
140
|
-
}
|
|
141
|
-
else if (typeof info.maxRng === 'undefined') {
|
|
142
|
-
// Default is a telescope
|
|
143
|
-
this.maxRng = 50000; // arbitrary large number
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
throw new Error('Invalid maximum range - must be greater than 0');
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
Sensor.prototype.validateLla = function (info) {
|
|
150
|
-
if (info.lat >= -90 && info.lat <= 90) {
|
|
151
|
-
this.lat = info.lat;
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
throw new Error('Invalid latitude');
|
|
155
|
-
}
|
|
156
|
-
if (info.lon >= -180 && info.lon <= 180) {
|
|
157
|
-
this.lon = info.lon;
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
throw new Error('Invalid longitude');
|
|
161
|
-
}
|
|
162
|
-
if (info.alt >= 0) {
|
|
163
|
-
this.alt = info.alt;
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
throw new Error('Invalid altitude');
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
Sensor.prototype.setTime = function (date) {
|
|
170
|
-
this.time = date;
|
|
171
|
-
return this;
|
|
172
|
-
};
|
|
173
|
-
Sensor.prototype.getRae = function (sat, date) {
|
|
174
|
-
if (date === void 0) { date = this.time; }
|
|
175
|
-
return sat.getRae(this, date);
|
|
176
|
-
};
|
|
177
|
-
Sensor.prototype.isRaeInFov = function (rae) {
|
|
178
|
-
if (rae.el * RAD2DEG < this.minEl || rae.el * RAD2DEG > this.maxEl) {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
if (rae.rng < this.minRng || rae.rng > this.maxRng) {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
if (this.minAz * RAD2DEG > this.maxAz) {
|
|
185
|
-
// North Facing Sensors
|
|
186
|
-
if (rae.az * RAD2DEG < this.minAz && rae.az * RAD2DEG > this.maxAz) {
|
|
187
|
-
return false;
|
|
188
|
-
}
|
|
189
|
-
// Normal Facing Sensors
|
|
190
|
-
}
|
|
191
|
-
else if (rae.az * RAD2DEG < this.minAz || rae.az * RAD2DEG > this.maxAz) {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
return true;
|
|
195
|
-
};
|
|
196
|
-
Sensor.prototype.isSatInFov = function (sat, date) {
|
|
197
|
-
if (date === void 0) { date = this.time; }
|
|
198
|
-
return this.isRaeInFov(this.getRae(sat, date));
|
|
199
|
-
};
|
|
200
|
-
Sensor.prototype.calculatePasses = function (planningInterval, sat, date) {
|
|
201
|
-
if (date === void 0) { date = this.time; }
|
|
202
|
-
var isInViewLast = false;
|
|
203
|
-
var maxElThisPass = 0;
|
|
204
|
-
var msnPlanPasses = [];
|
|
205
|
-
var startTime = date.getTime();
|
|
206
|
-
for (var timeOffset = 0; timeOffset < planningInterval; timeOffset++) {
|
|
207
|
-
var curTime = new Date(startTime + timeOffset * 1000);
|
|
208
|
-
var rae = this.getRae(sat, curTime);
|
|
209
|
-
// Radians to Degrees
|
|
210
|
-
var azDeg = ((rae.az * 360) / TAU);
|
|
211
|
-
var elDeg = ((rae.el * 360) / TAU);
|
|
212
|
-
var isInView = this.isRaeInFov(rae);
|
|
213
|
-
if (timeOffset === 0) {
|
|
214
|
-
// Propagate Backwards to get the previous pass
|
|
215
|
-
var oldRae = this.getRae(sat, new Date(Date.now() - 1 * 1000));
|
|
216
|
-
isInViewLast = this.isRaeInFov(oldRae);
|
|
217
|
-
}
|
|
218
|
-
var type = Sensor.getPassType(isInView, isInViewLast);
|
|
219
|
-
maxElThisPass = Math.max(maxElThisPass, rae.el);
|
|
220
|
-
if (type === PassType.ENTER || type === PassType.EXIT) {
|
|
221
|
-
var pass = {
|
|
222
|
-
type: type,
|
|
223
|
-
time: curTime,
|
|
224
|
-
az: azDeg,
|
|
225
|
-
el: elDeg,
|
|
226
|
-
rng: rae.rng,
|
|
227
|
-
};
|
|
228
|
-
// Only set maxEl for EXIT passes
|
|
229
|
-
if (type === PassType.EXIT) {
|
|
230
|
-
pass.maxElPass = maxElThisPass;
|
|
231
|
-
}
|
|
232
|
-
msnPlanPasses.push(pass);
|
|
233
|
-
maxElThisPass = 0;
|
|
234
|
-
}
|
|
235
|
-
isInViewLast = isInView;
|
|
236
|
-
}
|
|
237
|
-
return msnPlanPasses;
|
|
238
|
-
};
|
|
239
|
-
Sensor.getPassType = function (isInView, isInViewLast) {
|
|
240
|
-
var type = PassType.OUT_OF_VIEW;
|
|
241
|
-
if (isInView && !isInViewLast) {
|
|
242
|
-
type = PassType.ENTER;
|
|
243
|
-
}
|
|
244
|
-
else if (!isInView && isInViewLast) {
|
|
245
|
-
type = PassType.EXIT;
|
|
246
|
-
}
|
|
247
|
-
else if (isInView && isInViewLast) {
|
|
248
|
-
type = PassType.IN_VIEW;
|
|
249
|
-
}
|
|
250
|
-
return type;
|
|
251
|
-
};
|
|
252
|
-
return Sensor;
|
|
253
|
-
}(BaseObject));
|
|
254
|
-
export { Sensor };
|
|
255
|
-
//# sourceMappingURL=sensor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sensor.js","sourceRoot":"","sources":["../../src/objects/sensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAyC,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAiB7C,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAA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,GAAG,CAAC,GAAG;iBACb,CAAC;gBAEF,iCAAiC;gBACjC,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;oBAC1B,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;iBAChC;gBAED,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACzB,aAAa,GAAY,CAAC,CAAC;aAC5B;YAED,YAAY,GAAG,QAAQ,CAAC;SACzB;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEc,kBAAW,GAA1B,UAA2B,QAAiB,EAAE,YAAqB;QACjE,IAAI,IAAI,GAAG,QAAQ,CAAC,WAAW,CAAC;QAEhC,IAAI,QAAQ,IAAI,CAAC,YAAY,EAAE;YAC7B,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC;SACvB;aAAM,IAAI,CAAC,QAAQ,IAAI,YAAY,EAAE;YACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;SACtB;aAAM,IAAI,QAAQ,IAAI,YAAY,EAAE;YACnC,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC;SACzB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjOD,CAA4B,UAAU,GAiOrC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Theodore Kruczek.
|
|
3
|
-
* @description Orbital Object ToolKit (OOTK) is a collection of tools for working
|
|
4
|
-
* with satellites and other orbital objects.
|
|
5
|
-
*
|
|
6
|
-
* @file The SpaceObject class is meant to provide properties to satellites/stars that
|
|
7
|
-
* do not apply to ground based objects.
|
|
8
|
-
*
|
|
9
|
-
* @license AGPL-3.0-or-later
|
|
10
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
11
|
-
*
|
|
12
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
13
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
14
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
17
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
18
|
-
* See the GNU Affero General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
21
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
-
*/
|
|
23
|
-
var __extends = (this && this.__extends) || (function () {
|
|
24
|
-
var extendStatics = function (d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
return function (d, b) {
|
|
31
|
-
if (typeof b !== "function" && b !== null)
|
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
-
extendStatics(d, b);
|
|
34
|
-
function __() { this.constructor = d; }
|
|
35
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
import { BaseObject } from './base-object';
|
|
39
|
-
var SpaceObject = /** @class */ (function (_super) {
|
|
40
|
-
__extends(SpaceObject, _super);
|
|
41
|
-
function SpaceObject(info) {
|
|
42
|
-
var _this = _super.call(this, info) || this;
|
|
43
|
-
if (info.rcs) {
|
|
44
|
-
_this.rcs = info.rcs;
|
|
45
|
-
}
|
|
46
|
-
if (info.vmag) {
|
|
47
|
-
_this.vmag = info.vmag;
|
|
48
|
-
}
|
|
49
|
-
return _this;
|
|
50
|
-
}
|
|
51
|
-
SpaceObject.prototype.getRcs = function () {
|
|
52
|
-
return this.rcs;
|
|
53
|
-
};
|
|
54
|
-
SpaceObject.prototype.getVmag = function () {
|
|
55
|
-
return this.vmag;
|
|
56
|
-
};
|
|
57
|
-
return SpaceObject;
|
|
58
|
-
}(BaseObject));
|
|
59
|
-
export { SpaceObject };
|
|
60
|
-
//# sourceMappingURL=space-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"space-object.js","sourceRoot":"","sources":["../../src/objects/space-object.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C;IAAiC,+BAAU;IAKzC,qBAAY,IAAgB;QAA5B,YACE,kBAAM,IAAI,CAAC,SASZ;QAPC,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,KAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;SACrB;QAED,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SACvB;;IACH,CAAC;IAEM,4BAAM,GAAb;QACE,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEM,6BAAO,GAAd;QACE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IACH,kBAAC;AAAD,CAAC,AAxBD,CAAiC,UAAU,GAwB1C"}
|
package/lib/objects/star.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Theodore Kruczek.
|
|
3
|
-
* @description Orbital Object ToolKit (OOTK) is a collection of tools for working
|
|
4
|
-
* with satellites and other orbital objects.
|
|
5
|
-
*
|
|
6
|
-
* @file The Star class is meant to help with cacluating star positions relative to
|
|
7
|
-
* satellites and earth based sensors.
|
|
8
|
-
*
|
|
9
|
-
* @license AGPL-3.0-or-later
|
|
10
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
11
|
-
*
|
|
12
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
13
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
14
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
17
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
18
|
-
* See the GNU Affero General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
21
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
-
*/
|
|
23
|
-
import { EciVec3, LlaVec3, Radians, RaeVec3, SpaceObjectType } from '../types/types';
|
|
24
|
-
import { SpaceObject } from './space-object';
|
|
25
|
-
interface ObjectInfo {
|
|
26
|
-
name?: string;
|
|
27
|
-
type?: SpaceObjectType;
|
|
28
|
-
vmag?: number;
|
|
29
|
-
ra: Radians;
|
|
30
|
-
dec: Radians;
|
|
31
|
-
pname?: string;
|
|
32
|
-
bf?: string;
|
|
33
|
-
h?: string;
|
|
34
|
-
}
|
|
35
|
-
export declare class Star extends SpaceObject {
|
|
36
|
-
pname: string;
|
|
37
|
-
bf: string;
|
|
38
|
-
h: string;
|
|
39
|
-
dec: Radians;
|
|
40
|
-
ra: Radians;
|
|
41
|
-
constructor(info: ObjectInfo);
|
|
42
|
-
getEci(lla?: LlaVec3, date?: Date): EciVec3;
|
|
43
|
-
getRae(lla?: LlaVec3, date?: Date): RaeVec3;
|
|
44
|
-
private static calculateTimeVariables;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
package/lib/objects/star.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Theodore Kruczek.
|
|
3
|
-
* @description Orbital Object ToolKit (OOTK) is a collection of tools for working
|
|
4
|
-
* with satellites and other orbital objects.
|
|
5
|
-
*
|
|
6
|
-
* @file The Star class is meant to help with cacluating star positions relative to
|
|
7
|
-
* satellites and earth based sensors.
|
|
8
|
-
*
|
|
9
|
-
* @license AGPL-3.0-or-later
|
|
10
|
-
* @Copyright (c) 2020-2023 Theodore Kruczek
|
|
11
|
-
*
|
|
12
|
-
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
13
|
-
* terms of the GNU Affero General Public License as published by the Free Software
|
|
14
|
-
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
17
|
-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
18
|
-
* See the GNU Affero General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU Affero General Public License along with
|
|
21
|
-
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
-
*/
|
|
23
|
-
var __extends = (this && this.__extends) || (function () {
|
|
24
|
-
var extendStatics = function (d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
return function (d, b) {
|
|
31
|
-
if (typeof b !== "function" && b !== null)
|
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
-
extendStatics(d, b);
|
|
34
|
-
function __() { this.constructor = d; }
|
|
35
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
import { DAY_TO_MS, DEG2RAD, RAD2DEG } from '../utils/constants';
|
|
39
|
-
import { SpaceObjectType, } from '../types/types';
|
|
40
|
-
import { Sgp4 } from '../sgp4/sgp4';
|
|
41
|
-
import { SpaceObject } from './space-object';
|
|
42
|
-
import { Transforms } from '../transforms/transforms';
|
|
43
|
-
import { Utils } from '../utils/utils';
|
|
44
|
-
var Star = /** @class */ (function (_super) {
|
|
45
|
-
__extends(Star, _super);
|
|
46
|
-
function Star(info) {
|
|
47
|
-
var _this = this;
|
|
48
|
-
if (info.type && info.type !== SpaceObjectType.STAR) {
|
|
49
|
-
throw new Error('Invalid object type');
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
info.type = SpaceObjectType.STAR;
|
|
53
|
-
}
|
|
54
|
-
_this = _super.call(this, info) || this;
|
|
55
|
-
_this.ra = info.ra;
|
|
56
|
-
_this.dec = info.dec;
|
|
57
|
-
if (info.pname) {
|
|
58
|
-
_this.pname = info.pname;
|
|
59
|
-
}
|
|
60
|
-
if (info.bf) {
|
|
61
|
-
_this.bf = info.bf;
|
|
62
|
-
}
|
|
63
|
-
if (info.h) {
|
|
64
|
-
_this.h = info.h;
|
|
65
|
-
}
|
|
66
|
-
return _this;
|
|
67
|
-
}
|
|
68
|
-
Star.prototype.getEci = function (lla, date) {
|
|
69
|
-
if (lla === void 0) { lla = { lat: (180 * DEG2RAD), lon: 0, alt: 0 }; }
|
|
70
|
-
if (date === void 0) { date = this.time; }
|
|
71
|
-
var rae = this.getRae(lla, date);
|
|
72
|
-
var gmst = Star.calculateTimeVariables(date).gmst;
|
|
73
|
-
// Arbitrary distance to enable using ECI coordinates
|
|
74
|
-
return Transforms.ecf2eci(Transforms.rae2ecf(rae, { lat: 0, lon: 0, alt: 0 }), gmst);
|
|
75
|
-
};
|
|
76
|
-
Star.prototype.getRae = function (lla, date) {
|
|
77
|
-
if (lla === void 0) { lla = { lat: (180 * DEG2RAD), lon: 0, alt: 0 }; }
|
|
78
|
-
if (date === void 0) { date = this.time; }
|
|
79
|
-
var starPos = Utils.SunMath.getStarAzEl(date, (lla.lat * RAD2DEG), (lla.lon * RAD2DEG), this.ra, this.dec);
|
|
80
|
-
return { az: starPos.az, el: starPos.el, rng: 250000 };
|
|
81
|
-
};
|
|
82
|
-
Star.calculateTimeVariables = function (date) {
|
|
83
|
-
var j = Utils.jday(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) +
|
|
84
|
-
date.getUTCMilliseconds() * DAY_TO_MS;
|
|
85
|
-
var gmst = Sgp4.gstime(j);
|
|
86
|
-
return { gmst: gmst, j: j };
|
|
87
|
-
};
|
|
88
|
-
return Star;
|
|
89
|
-
}(SpaceObject));
|
|
90
|
-
export { Star };
|
|
91
|
-
//# sourceMappingURL=star.js.map
|
package/lib/objects/star.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"star.js","sourceRoot":"","sources":["../../src/objects/star.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAQL,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAavC;IAA0B,wBAAW;IAQnC,cAAY,IAAgB;QAA5B,iBAuBC;QAtBC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,EAAE;YACnD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;SAClC;gBAED,kBAAM,IAAI,CAAC;QAEX,KAAI,CAAC,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IAAI,EACK,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,EACnB,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,EAC5B,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,GAAG,CACT,CAAC;QAEF,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAc,MAAM,EAAE,CAAC;IACrE,CAAC;IAEc,2BAAsB,GAArC,UAAsC,IAAU;QAC9C,IAAM,CAAC,GACL,KAAK,CAAC,IAAI,CACR,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,EACtB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,aAAa,EAAE,CACrB;YACD,IAAI,CAAC,kBAAkB,EAAE,GAAG,SAAS,CAAC;QACxC,IAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAE5B,OAAO,EAAE,IAAI,MAAA,EAAE,CAAC,GAAA,EAAE,CAAC;IACrB,CAAC;IACH,WAAC;AAAD,CAAC,AA1ED,CAA0B,WAAW,GA0EpC"}
|
package/lib/sgp4/Sgp4Assembly.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import { Sgp4 } from './sgp4';
|
|
38
|
-
var Sgp4Assembly = /** @class */ (function () {
|
|
39
|
-
function Sgp4Assembly() {
|
|
40
|
-
}
|
|
41
|
-
Sgp4Assembly.prototype.propagateWasm = function () {
|
|
42
|
-
var TLE1 = '1 25544U 98067A 21284.51782528 .00016738 00000-0 10270-3 0 9033';
|
|
43
|
-
var TLE2 = '2 25544 51.6443 82.9991 0004256 95.9687 15.0739 15.48978733306954';
|
|
44
|
-
var satrec = Sgp4.createSatrec(TLE1, TLE2);
|
|
45
|
-
var propagate = this.module.instance.exports.propagate;
|
|
46
|
-
var tsince = 30;
|
|
47
|
-
// eslint-disable-next-line no-console
|
|
48
|
-
console.log(propagate(satrec.a, satrec.am, satrec.alta, satrec.altp, satrec.argpdot, satrec.argpo, satrec.aycof, satrec.bstar, satrec.cc1, satrec.cc4, satrec.cc5, satrec.con41, satrec.d2, satrec.d3, satrec.d4, satrec.d5232, satrec.d5421, satrec.d5433, satrec.dedt, satrec.delmo, satrec.del1, satrec.ecco, satrec.em, satrec.epochdays, satrec.epochyr, satrec.error, satrec.eta, satrec.gsto, satrec.im, satrec.inclo, satrec.init, satrec.isimp, satrec.jdsatepoch, satrec.mdot, satrec.method, satrec.mo, satrec.mm, satrec.nddot, satrec.ndot, satrec.no, satrec.nodecf, satrec.nodedot, satrec.nodeo, satrec.om, satrec.Om, satrec.omgcof, satrec.operationmode, satrec.satnum, satrec.sinmao, satrec.t, satrec.t2cof, satrec.t3cof, satrec.t4cof, satrec.t5cof, satrec.x1mth2, satrec.x7thm1, satrec.xlcof, satrec.xmcof, satrec.xfact, satrec.xlamo, satrec.xli, satrec.xgh4, satrec.xgh3, satrec.xh2, satrec.xi2, satrec.xi3, satrec.xl2, satrec.xl3, satrec.xl4, satrec.zmol, satrec.zmos, satrec.dmdt, satrec.dnodt, satrec.domdt, satrec.e3, satrec.ee2, satrec.peo, satrec.pgho, satrec.pho, satrec.PInco, satrec.plo, satrec.se2, satrec.se3, satrec.sgh2, satrec.sgh3, satrec.sgh4, satrec.sh2, satrec.sh3, satrec.si2, satrec.si3, satrec.sl2, satrec.sl3, satrec.sl4, satrec.xgh2, satrec.xh3, satrec.tumin, satrec.radiusearthkm, satrec.irez, satrec.d3210, satrec.d3222, satrec.d4410, satrec.d4422, satrec.d5220, satrec.del2, satrec.del3, satrec.didt, satrec.atime, satrec.j2, satrec.j3, satrec.j4, satrec.mus, satrec.xke, satrec.j3oj2, satrec.xni, satrec.d2201, satrec.d2211, satrec.nm, tsince));
|
|
49
|
-
};
|
|
50
|
-
Sgp4Assembly.prototype.loadWasm = function (path) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var imports, _a;
|
|
53
|
-
return __generator(this, function (_b) {
|
|
54
|
-
switch (_b.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
imports = {
|
|
57
|
-
env: {
|
|
58
|
-
abort: function (_msg, _file, line, column) {
|
|
59
|
-
throw Error("abort called at ".concat(line, ":").concat(column));
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
_a = this;
|
|
64
|
-
return [4 /*yield*/, WebAssembly.instantiateStreaming(fetch(path), imports)];
|
|
65
|
-
case 1:
|
|
66
|
-
_a.module = (_b.sent());
|
|
67
|
-
return [2 /*return*/];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
return Sgp4Assembly;
|
|
73
|
-
}());
|
|
74
|
-
export { Sgp4Assembly };
|
|
75
|
-
//# sourceMappingURL=Sgp4Assembly.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sgp4Assembly.js","sourceRoot":"","sources":["../../src/sgp4/Sgp4Assembly.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAA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