ootk 1.0.8 → 1.5.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/{asc → .asc}/asconfig.json +0 -0
- package/{asc → .asc}/assembly/index.ts +0 -0
- package/{asc → .asc}/ex/asconfig.json +0 -0
- package/{asc → .asc}/ex/assembly/index.ts +0 -0
- package/{asc → .asc}/ex/index.html +0 -0
- package/{asc → .asc}/ex/package.json +0 -0
- package/{asc → .asc}/ex/tests/index.js +0 -0
- package/{asc → .asc}/package.json +0 -0
- package/{asc → .asc}/tests/index.js +0 -0
- package/.eslintrc.json +244 -0
- package/CHANGELOG.md +21 -1
- package/LICENSE.MD +299 -21
- package/README.md +17 -22
- package/dist/objects/base-object.d.ts +40 -0
- package/dist/objects/detailed-sat.d.ts +66 -0
- package/dist/objects/index.d.ts +4 -0
- package/dist/objects/sat.d.ts +88 -0
- package/dist/objects/sensor.d.ts +40 -0
- package/dist/objects/space-object.d.ts +38 -0
- package/dist/objects/star.d.ts +46 -0
- package/dist/ootk.d.ts +16 -21
- package/dist/ootk.js +2 -1
- package/dist/ootk.js.LICENSE.txt +77 -0
- package/dist/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
- package/dist/tle/tle-format-data.d.ts +6 -0
- package/dist/tle/tle.d.ts +374 -0
- package/{lib → dist/transforms}/transforms.d.ts +14 -17
- package/dist/{types.d.ts → types/types.d.ts} +111 -3
- package/dist/utils/constants.d.ts +34 -0
- package/dist/utils/moon-math.d.ts +104 -0
- package/dist/utils/sun-math.d.ts +230 -0
- package/dist/utils/utils.d.ts +36 -0
- package/lib/objects/base-object.d.ts +40 -0
- package/lib/objects/base-object.js +109 -0
- package/lib/objects/base-object.js.map +1 -0
- package/lib/objects/detailed-sat.d.ts +66 -0
- package/lib/objects/detailed-sat.js +149 -0
- package/lib/objects/detailed-sat.js.map +1 -0
- package/lib/objects/index.d.ts +4 -0
- package/lib/objects/index.js +5 -0
- package/lib/objects/index.js.map +1 -0
- package/lib/objects/sat.d.ts +88 -0
- package/lib/objects/sat.js +141 -0
- package/lib/objects/sat.js.map +1 -0
- package/lib/objects/sensor.d.ts +40 -0
- package/lib/objects/sensor.js +88 -0
- package/lib/objects/sensor.js.map +1 -0
- package/lib/objects/space-object.d.ts +38 -0
- package/lib/objects/space-object.js +60 -0
- package/lib/objects/space-object.js.map +1 -0
- package/lib/objects/star.d.ts +46 -0
- package/lib/objects/star.js +91 -0
- package/lib/objects/star.js.map +1 -0
- package/lib/ootk.d.ts +16 -21
- package/lib/ootk.js +16 -21
- package/lib/ootk.js.map +1 -1
- package/lib/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
- package/lib/{sgp4.js → sgp4/sgp4.js} +1064 -898
- package/lib/sgp4/sgp4.js.map +1 -0
- package/lib/tle/tle-format-data.d.ts +6 -0
- package/lib/tle/tle-format-data.js +10 -0
- package/lib/tle/tle-format-data.js.map +1 -0
- package/lib/tle/tle.d.ts +374 -0
- package/lib/tle/tle.js +611 -0
- package/lib/tle/tle.js.map +1 -0
- package/{dist → lib/transforms}/transforms.d.ts +14 -17
- package/lib/{transforms.js → transforms/transforms.js} +44 -40
- package/lib/transforms/transforms.js.map +1 -0
- package/lib/{types.d.ts → types/types.d.ts} +111 -3
- package/lib/types/types.js +34 -0
- package/lib/types/types.js.map +1 -0
- package/lib/utils/constants.d.ts +19 -15
- package/lib/utils/constants.js +20 -16
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/moon-math.d.ts +104 -0
- package/lib/utils/moon-math.js +387 -0
- package/lib/utils/moon-math.js.map +1 -0
- package/lib/utils/sun-math.d.ts +230 -0
- package/lib/utils/sun-math.js +421 -0
- package/lib/utils/sun-math.js.map +1 -0
- package/lib/utils/utils.d.ts +36 -0
- package/lib/utils/utils.js +81 -0
- package/lib/utils/utils.js.map +1 -0
- package/package.json +4 -3
- package/dist/utils.d.ts +0 -34
- package/lib/sgp4.js.map +0 -1
- package/lib/transforms.js.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/lib/utils.d.ts +0 -34
- package/lib/utils.js +0 -62
- package/lib/utils.js.map +0 -1
package/lib/tle/tle.js
ADDED
|
@@ -0,0 +1,611 @@
|
|
|
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 TLE module contains a collection of functions for working with TLEs.
|
|
7
|
+
*
|
|
8
|
+
* @license AGPL-3.0-or-later
|
|
9
|
+
* @Copyright (c) 2020-2022 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 __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
import { TleFormatData } from './tle-format-data';
|
|
34
|
+
import { Utils } from '../utils/utils';
|
|
35
|
+
var Tle = /** @class */ (function () {
|
|
36
|
+
function Tle() {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Parses the TLE into orbital data.
|
|
40
|
+
*
|
|
41
|
+
* If you want all of the data then use parseTleFull instead.
|
|
42
|
+
* @param {TleLine1} tleLine1 TLE line 1
|
|
43
|
+
* @param {TleLine2} tleLine2 TLE line 2
|
|
44
|
+
* @returns {TleData} Returns most commonly used orbital data from TLE
|
|
45
|
+
*/
|
|
46
|
+
Tle.parseTle = function (tleLine1, tleLine2) {
|
|
47
|
+
var line1 = Tle.parseLine1(tleLine1);
|
|
48
|
+
var line2 = Tle.parseLine2(tleLine2);
|
|
49
|
+
if (line1.satNum !== line2.satNum) {
|
|
50
|
+
throw new Error('Satellite numbers do not match');
|
|
51
|
+
}
|
|
52
|
+
if (line1.satNumRaw !== line2.satNumRaw) {
|
|
53
|
+
throw new Error('Raw satellite numbers do not match');
|
|
54
|
+
}
|
|
55
|
+
if (line1.lineNumber1 !== 1) {
|
|
56
|
+
throw new Error('First line number must be 1');
|
|
57
|
+
}
|
|
58
|
+
if (line2.lineNumber2 !== 2) {
|
|
59
|
+
throw new Error('Second line number must be 2');
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
satNum: line1.satNum,
|
|
63
|
+
intlDes: line1.intlDes,
|
|
64
|
+
epochYear: line1.epochYear,
|
|
65
|
+
epochDay: line1.epochDay,
|
|
66
|
+
meanMoDev1: line1.meanMoDev1,
|
|
67
|
+
meanMoDev2: line1.meanMoDev2,
|
|
68
|
+
bstar: line1.bstar,
|
|
69
|
+
inclination: line2.inclination,
|
|
70
|
+
raan: line2.raan,
|
|
71
|
+
eccentricity: line2.eccentricity,
|
|
72
|
+
argOfPerigee: line2.argOfPerigee,
|
|
73
|
+
meanAnomaly: line2.meanAnomaly,
|
|
74
|
+
meanMotion: line2.meanMotion,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Parses all of the data contained in the TLE.
|
|
79
|
+
*
|
|
80
|
+
* If you only want the most commonly used data then use parseTle instead.
|
|
81
|
+
* @param {TleLine1} tleLine1 The first line of the TLE to parse.
|
|
82
|
+
* @param {TleLine2} tleLine2 The second line of the TLE to parse.
|
|
83
|
+
* @returns {TleDataFull} Returns all of the data from the TLE.
|
|
84
|
+
*/
|
|
85
|
+
Tle.parseTleFull = function (tleLine1, tleLine2) {
|
|
86
|
+
var line1 = Tle.parseLine1(tleLine1);
|
|
87
|
+
var line2 = Tle.parseLine2(tleLine2);
|
|
88
|
+
if (line1.satNum !== line2.satNum) {
|
|
89
|
+
throw new Error('Satellite numbers do not match');
|
|
90
|
+
}
|
|
91
|
+
if (line1.satNumRaw !== line2.satNumRaw) {
|
|
92
|
+
throw new Error('Raw satellite numbers do not match');
|
|
93
|
+
}
|
|
94
|
+
if (line1.lineNumber1 !== 1) {
|
|
95
|
+
throw new Error('First line number must be 1');
|
|
96
|
+
}
|
|
97
|
+
if (line2.lineNumber2 !== 2) {
|
|
98
|
+
throw new Error('Second line number must be 2');
|
|
99
|
+
}
|
|
100
|
+
return __assign(__assign({}, line1), line2);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Parse the first line of the TLE.
|
|
104
|
+
* @param {TleLine1} tleLine1 The first line of the TLE to parse.
|
|
105
|
+
* @returns {Line1Data} Returns the data from the first line of the TLE.
|
|
106
|
+
*/
|
|
107
|
+
Tle.parseLine1 = function (tleLine1) {
|
|
108
|
+
var lineNumber1 = Tle.getLineNumber(tleLine1);
|
|
109
|
+
var satNum = Tle.getSatNum(tleLine1);
|
|
110
|
+
var satNumRaw = Tle.getRawSatNum(tleLine1);
|
|
111
|
+
var classification = Tle.getClassification(tleLine1);
|
|
112
|
+
var intlDes = Tle.getIntlDes(tleLine1);
|
|
113
|
+
var intlDesYear = Tle.getIntlDesYear(tleLine1);
|
|
114
|
+
var intlDesLaunchNum = Tle.getIntlDesLaunchNum(tleLine1);
|
|
115
|
+
var intlDesLaunchPiece = Tle.getIntlDesLaunchPiece(tleLine1);
|
|
116
|
+
var epochYear = Tle.getEpochYear(tleLine1);
|
|
117
|
+
var epochYearFull = Tle.getEpochYearFull(tleLine1);
|
|
118
|
+
var epochDay = Tle.getEpochDay(tleLine1);
|
|
119
|
+
var meanMoDev1 = Tle.getMeanMoDev1(tleLine1);
|
|
120
|
+
var meanMoDev2 = Tle.getMeanMoDev2(tleLine1);
|
|
121
|
+
var bstar = Tle.getBstar(tleLine1);
|
|
122
|
+
var ephemerisType = Tle.getEphemerisType(tleLine1);
|
|
123
|
+
var elsetNum = Tle.getElsetNum(tleLine1);
|
|
124
|
+
var checksum1 = Tle.getChecksum(tleLine1);
|
|
125
|
+
return {
|
|
126
|
+
lineNumber1: lineNumber1,
|
|
127
|
+
satNum: satNum,
|
|
128
|
+
satNumRaw: satNumRaw,
|
|
129
|
+
classification: classification,
|
|
130
|
+
intlDes: intlDes,
|
|
131
|
+
intlDesYear: intlDesYear,
|
|
132
|
+
intlDesLaunchNum: intlDesLaunchNum,
|
|
133
|
+
intlDesLaunchPiece: intlDesLaunchPiece,
|
|
134
|
+
epochYear: epochYear,
|
|
135
|
+
epochYearFull: epochYearFull,
|
|
136
|
+
epochDay: epochDay,
|
|
137
|
+
meanMoDev1: meanMoDev1,
|
|
138
|
+
meanMoDev2: meanMoDev2,
|
|
139
|
+
bstar: bstar,
|
|
140
|
+
ephemerisType: ephemerisType,
|
|
141
|
+
elsetNum: elsetNum,
|
|
142
|
+
checksum1: checksum1,
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Parse the second line of the TLE.
|
|
147
|
+
* @param {TleLine2} tleLine2 The second line of the TLE to parse.
|
|
148
|
+
* @returns {Line2Data} Returns the data from the second line of the TLE.
|
|
149
|
+
*/
|
|
150
|
+
Tle.parseLine2 = function (tleLine2) {
|
|
151
|
+
var lineNumber2 = Tle.getLineNumber(tleLine2);
|
|
152
|
+
var satNum = Tle.getSatNum(tleLine2);
|
|
153
|
+
var satNumRaw = Tle.getRawSatNum(tleLine2);
|
|
154
|
+
var inclination = Tle.getInclination(tleLine2);
|
|
155
|
+
var raan = Tle.getRaan(tleLine2);
|
|
156
|
+
var eccentricity = Tle.getEccentricity(tleLine2);
|
|
157
|
+
var argOfPerigee = Tle.getArgOfPerigee(tleLine2);
|
|
158
|
+
var meanAnomaly = Tle.getMeanAnomaly(tleLine2);
|
|
159
|
+
var meanMotion = Tle.getMeanMotion(tleLine2);
|
|
160
|
+
var revNum = Tle.getRevNum(tleLine2);
|
|
161
|
+
var checksum2 = Tle.getChecksum(tleLine2);
|
|
162
|
+
return {
|
|
163
|
+
lineNumber2: lineNumber2,
|
|
164
|
+
satNum: satNum,
|
|
165
|
+
satNumRaw: satNumRaw,
|
|
166
|
+
inclination: inclination,
|
|
167
|
+
raan: raan,
|
|
168
|
+
eccentricity: eccentricity,
|
|
169
|
+
argOfPerigee: argOfPerigee,
|
|
170
|
+
meanAnomaly: meanAnomaly,
|
|
171
|
+
meanMotion: meanMotion,
|
|
172
|
+
revNum: revNum,
|
|
173
|
+
checksum2: checksum2,
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* This should always return a 1 or a 2.
|
|
178
|
+
* @param {string} tleLine The first line of the TLE to parse.
|
|
179
|
+
* @returns {number} The line number of the TLE.
|
|
180
|
+
*/
|
|
181
|
+
Tle.getLineNumber = function (tleLine) {
|
|
182
|
+
var lineNum = parseInt(tleLine.substring(Tle.lineNumber.start, Tle.lineNumber.stop));
|
|
183
|
+
if (lineNum !== 1 && lineNum !== 2) {
|
|
184
|
+
throw new Error('Invalid line number');
|
|
185
|
+
}
|
|
186
|
+
return lineNum;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* See https://en.wikipedia.org/wiki/Satellite_Catalog_Number
|
|
190
|
+
*
|
|
191
|
+
* Range: 0 to 99999 or 26999.
|
|
192
|
+
*
|
|
193
|
+
* NOTE: To support Alpha-5, the first digit can be a letter.
|
|
194
|
+
* This will be converted to a number in order to expand the range to 26999.
|
|
195
|
+
*
|
|
196
|
+
* Example: 25544 or B1234 (e.g. Sputnik's rocket body was number 00001)
|
|
197
|
+
*
|
|
198
|
+
* @param {string} tleLine The first line of the TLE to parse.
|
|
199
|
+
* @returns {number} NORAD catalog number.
|
|
200
|
+
*/
|
|
201
|
+
Tle.getSatNum = function (tleLine) {
|
|
202
|
+
var satNumStr = tleLine.substring(Tle.satNum.start, Tle.satNum.stop);
|
|
203
|
+
var leadingChar = satNumStr.split('')[0].toLowerCase(); // Using uppercase will break the -96 math.
|
|
204
|
+
if (isNaN(parseInt(leadingChar))) {
|
|
205
|
+
return parseInt(leadingChar.charCodeAt(0) - 96 + 9 + satNumStr.slice(1, 5));
|
|
206
|
+
}
|
|
207
|
+
return parseInt(satNumStr);
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* See https://en.wikipedia.org/wiki/Satellite_Catalog_Number
|
|
211
|
+
*
|
|
212
|
+
* Range: 0 to 99999 or 26999.
|
|
213
|
+
*
|
|
214
|
+
* NOTE: To support Alpha-5, the first digit can be a letter.
|
|
215
|
+
* This will NOT be converted to a number. Use getSatNum() for that.
|
|
216
|
+
*
|
|
217
|
+
* Example: 25544 or B1234 (e.g. Sputnik's rocket body was number 00001)
|
|
218
|
+
*
|
|
219
|
+
* @param {string} tleLine The first line of the TLE to parse.
|
|
220
|
+
* @returns {string} NORAD catalog number.
|
|
221
|
+
*/
|
|
222
|
+
Tle.getRawSatNum = function (tleLine) {
|
|
223
|
+
return tleLine.substring(Tle.satNum.start, Tle.satNum.stop);
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Satellite classification.
|
|
227
|
+
* * 'U' = unclassified
|
|
228
|
+
* * 'C' = confidential
|
|
229
|
+
* * 'S' = secret
|
|
230
|
+
*
|
|
231
|
+
* Example: 'U'
|
|
232
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
233
|
+
* @returns {string} The classification.
|
|
234
|
+
*/
|
|
235
|
+
Tle.getClassification = function (tleLine1) {
|
|
236
|
+
return tleLine1.substring(Tle.classification.start, Tle.classification.stop);
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* International Designator (COSPAR ID)
|
|
240
|
+
* See https://en.wikipedia.org/wiki/International_Designator
|
|
241
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
242
|
+
* @returns {string} The International Designator.
|
|
243
|
+
*/
|
|
244
|
+
Tle.getIntlDes = function (tleLine1) {
|
|
245
|
+
return tleLine1.substring(Tle.intlDes.start, Tle.intlDes.stop).trim();
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* International Designator (COSPAR ID): Last 2 digits of launch year.
|
|
249
|
+
*
|
|
250
|
+
* Range: 00 to 99
|
|
251
|
+
*
|
|
252
|
+
* Example: 98
|
|
253
|
+
*
|
|
254
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
255
|
+
* @returns {number} The year of the International Designator.
|
|
256
|
+
*/
|
|
257
|
+
Tle.getIntlDesYear = function (tleLine1) {
|
|
258
|
+
return parseInt(tleLine1.substring(Tle.intlDesYear.start, Tle.intlDesYear.stop));
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* International Designator (COSPAR ID): Launch number of the year.
|
|
262
|
+
*
|
|
263
|
+
* Range: 1 to 999
|
|
264
|
+
*
|
|
265
|
+
* Example: 67
|
|
266
|
+
*
|
|
267
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
268
|
+
* @returns {number} The launch number of the International Designator.
|
|
269
|
+
*/
|
|
270
|
+
Tle.getIntlDesLaunchNum = function (tleLine1) {
|
|
271
|
+
return parseInt(tleLine1.substring(Tle.intlDesLaunchNum.start, Tle.intlDesLaunchNum.stop));
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* International Designator (COSPAR ID): Piece of the launch.
|
|
275
|
+
*
|
|
276
|
+
* Range: A to ZZZ
|
|
277
|
+
*
|
|
278
|
+
* Example: 'A'
|
|
279
|
+
*
|
|
280
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
281
|
+
* @returns {string} The launch piece of the International Designator.
|
|
282
|
+
*/
|
|
283
|
+
Tle.getIntlDesLaunchPiece = function (tleLine1) {
|
|
284
|
+
return tleLine1.substring(Tle.intlDesLaunchPiece.start, Tle.intlDesLaunchPiece.stop).trim();
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Year when the TLE was generated (TLE epoch), last two digits.
|
|
288
|
+
*
|
|
289
|
+
* Range: 00 to 99
|
|
290
|
+
*
|
|
291
|
+
* Example: 17
|
|
292
|
+
*
|
|
293
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
294
|
+
* @returns {number} The year the TLE was generated.
|
|
295
|
+
*/
|
|
296
|
+
Tle.getEpochYear = function (tleLine1) {
|
|
297
|
+
var epochYear = parseInt(tleLine1.substring(Tle.epochYear.start, Tle.epochYear.stop));
|
|
298
|
+
if (epochYear < 0 || epochYear > 99) {
|
|
299
|
+
throw new Error('Invalid epoch year');
|
|
300
|
+
}
|
|
301
|
+
return epochYear;
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Year when the TLE was generated (TLE epoch), four digits.
|
|
305
|
+
*
|
|
306
|
+
* Range: 1957 to 2056
|
|
307
|
+
*
|
|
308
|
+
* Example: 2008
|
|
309
|
+
*
|
|
310
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
311
|
+
* @returns {number} The year the TLE was generated.
|
|
312
|
+
*/
|
|
313
|
+
Tle.getEpochYearFull = function (tleLine1) {
|
|
314
|
+
var epochYear = parseInt(tleLine1.substring(Tle.epochYear.start, Tle.epochYear.stop));
|
|
315
|
+
if (epochYear < 0 || epochYear > 99) {
|
|
316
|
+
throw new Error('Invalid epoch year');
|
|
317
|
+
}
|
|
318
|
+
if (epochYear < 57) {
|
|
319
|
+
return epochYear + 2000;
|
|
320
|
+
}
|
|
321
|
+
return epochYear + 1900;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Fractional day of the year when the TLE was generated (TLE epoch).
|
|
325
|
+
*
|
|
326
|
+
* Range: 1 to 365.99999999
|
|
327
|
+
*
|
|
328
|
+
* Example: 206.18396726
|
|
329
|
+
*
|
|
330
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
331
|
+
* @returns {number} The day of the year the TLE was generated.
|
|
332
|
+
*/
|
|
333
|
+
Tle.getEpochDay = function (tleLine1) {
|
|
334
|
+
var epochDay = parseFloat(tleLine1.substring(Tle.epochDay.start, Tle.epochDay.stop));
|
|
335
|
+
if (epochDay < 1 || epochDay > 365.99999999) {
|
|
336
|
+
throw new Error('Invalid epoch day');
|
|
337
|
+
}
|
|
338
|
+
return Utils.roundToNDecimalPlaces(epochDay, 8);
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* First Time Derivative of the Mean Motion divided by two. Defines how mean motion changes
|
|
342
|
+
* over time, so TLE propagators can still be used to make reasonable guesses when
|
|
343
|
+
* times are distant from the original TLE epoch.
|
|
344
|
+
*
|
|
345
|
+
* Units: Orbits / day ^ 2
|
|
346
|
+
*
|
|
347
|
+
* Example: 0.00001961
|
|
348
|
+
*
|
|
349
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
350
|
+
* @returns {number} The first derivative of the mean motion.
|
|
351
|
+
*/
|
|
352
|
+
Tle.getMeanMoDev1 = function (tleLine1) {
|
|
353
|
+
var meanMoDev1 = parseFloat(tleLine1.substring(Tle.meanMoDev1.start, Tle.meanMoDev1.stop));
|
|
354
|
+
if (isNaN(meanMoDev1)) {
|
|
355
|
+
throw new Error('Invalid first derivative of mean motion.');
|
|
356
|
+
}
|
|
357
|
+
return Utils.roundToNDecimalPlaces(meanMoDev1, 8);
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Second Time Derivative of Mean Motion divided by six (decimal point assumed). Measures rate
|
|
361
|
+
* of change in the Mean Motion Dot so software can make reasonable guesses when times are
|
|
362
|
+
* distant from the original TLE epoch.
|
|
363
|
+
*
|
|
364
|
+
* Usually zero, unless the satellite is manuevering or in a decaying orbit.
|
|
365
|
+
*
|
|
366
|
+
* Units: Orbits / day ^ 3.
|
|
367
|
+
*
|
|
368
|
+
* Example: 0 ('00000-0' in the original TLE [= 0.00000 * 10 ^ 0])
|
|
369
|
+
*
|
|
370
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
371
|
+
* @returns {number} The second derivative of the mean motion.
|
|
372
|
+
*/
|
|
373
|
+
Tle.getMeanMoDev2 = function (tleLine1) {
|
|
374
|
+
var meanMoDev2 = parseFloat(tleLine1.substring(Tle.meanMoDev2.start, Tle.meanMoDev2.stop));
|
|
375
|
+
if (isNaN(meanMoDev2)) {
|
|
376
|
+
throw new Error('Invalid second derivative of mean motion.');
|
|
377
|
+
}
|
|
378
|
+
// NOTE: Should this limit to a specific number of decimals?
|
|
379
|
+
return meanMoDev2;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* BSTAR drag term (decimal point assumed). Estimates the effects of
|
|
383
|
+
* atmospheric drag on the satellite's motion.
|
|
384
|
+
*
|
|
385
|
+
* Units: EarthRadii ^ -1
|
|
386
|
+
*
|
|
387
|
+
* Example: 0.000036771 ('36771-4' in the original TLE [= 0.36771 * 10 ^ -4])
|
|
388
|
+
*
|
|
389
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
390
|
+
* @returns {number} The drag coefficient.
|
|
391
|
+
*/
|
|
392
|
+
Tle.getBstar = function (tleLine1) {
|
|
393
|
+
var BSTAR_PART_2 = Tle.bstar.start + 1;
|
|
394
|
+
var BSTAR_PART_3 = Tle.bstar.start + 6;
|
|
395
|
+
var BSTAR_PART_4 = Tle.bstar.stop - 1;
|
|
396
|
+
var bstarSymbol = tleLine1.substring(Tle.bstar.start, BSTAR_PART_2);
|
|
397
|
+
// Decimal place is assumed
|
|
398
|
+
var bstar1 = parseFloat("0.".concat(tleLine1.substring(BSTAR_PART_2, BSTAR_PART_3)));
|
|
399
|
+
var exponentSymbol = tleLine1.substring(BSTAR_PART_3, BSTAR_PART_4);
|
|
400
|
+
var exponent = parseInt(tleLine1.substring(BSTAR_PART_4, Tle.bstar.stop));
|
|
401
|
+
if (exponentSymbol === '-') {
|
|
402
|
+
exponent *= -1;
|
|
403
|
+
}
|
|
404
|
+
else if (exponentSymbol !== '+') {
|
|
405
|
+
throw new Error("Invalid BSTAR symbol: ".concat(bstarSymbol));
|
|
406
|
+
}
|
|
407
|
+
bstar1 *= Math.pow(10, exponent);
|
|
408
|
+
if (bstarSymbol === '-') {
|
|
409
|
+
bstar1 *= -1;
|
|
410
|
+
}
|
|
411
|
+
else if (bstarSymbol === '+' || bstarSymbol === ' ') {
|
|
412
|
+
// Do nothing
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
throw new Error("Invalid BSTAR symbol: ".concat(bstarSymbol));
|
|
416
|
+
}
|
|
417
|
+
return Utils.roundToNDecimalPlaces(bstar1, 14);
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Private value - used by United States Space Force to reference the orbit model used to
|
|
421
|
+
* generate the TLE. Will always be seen as zero externally (e.g. by "us", unless you are
|
|
422
|
+
* "them" - in which case, hello!).
|
|
423
|
+
*
|
|
424
|
+
* Example: 0
|
|
425
|
+
*
|
|
426
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
427
|
+
* @returns {number} The ephemeris type.
|
|
428
|
+
*/
|
|
429
|
+
Tle.getEphemerisType = function (tleLine1) {
|
|
430
|
+
return parseInt(tleLine1.substring(Tle.ephemerisType.start, Tle.ephemerisType.stop));
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* TLE element set number, incremented for each new TLE generated. 999 seems to mean the TLE
|
|
434
|
+
* has maxed out.
|
|
435
|
+
*
|
|
436
|
+
* Range: Technically 1 to 9999, though in practice the maximum number seems to be 999.
|
|
437
|
+
*
|
|
438
|
+
* Example: 999
|
|
439
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
440
|
+
* @returns {number} The element number.
|
|
441
|
+
*/
|
|
442
|
+
Tle.getElsetNum = function (tleLine1) {
|
|
443
|
+
return parseInt(tleLine1.substring(Tle.elsetNum.start, Tle.elsetNum.stop));
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* TLE line 1 checksum (modulo 10), for verifying the integrity of this line of the TLE.
|
|
447
|
+
*
|
|
448
|
+
* Range: 0 to 9
|
|
449
|
+
* Example: 3
|
|
450
|
+
*
|
|
451
|
+
* @param {string} tleLine1 The first line of the TLE to parse.
|
|
452
|
+
* @returns {number} The checksum value.
|
|
453
|
+
*/
|
|
454
|
+
Tle.getChecksum = function (tleLine1) {
|
|
455
|
+
return parseInt(tleLine1.substring(Tle.checksum.start, Tle.checksum.stop));
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* Inclination relative to the Earth's equatorial plane in degrees. 0 to 90 degrees is a
|
|
459
|
+
* prograde orbit and 90 to 180 degrees is a retrograde orbit.
|
|
460
|
+
*
|
|
461
|
+
* Units: degrees
|
|
462
|
+
*
|
|
463
|
+
* Range: 0 to 180
|
|
464
|
+
*
|
|
465
|
+
* Example: 51.6400
|
|
466
|
+
*
|
|
467
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
468
|
+
* @returns {number} The inclination of the satellite.
|
|
469
|
+
*/
|
|
470
|
+
Tle.getInclination = function (tleLine2) {
|
|
471
|
+
var inc = parseFloat(tleLine2.substring(Tle.inclination.start, Tle.inclination.stop));
|
|
472
|
+
if (inc < 0 || inc > 180) {
|
|
473
|
+
throw new Error("Invalid inclination: ".concat(inc));
|
|
474
|
+
}
|
|
475
|
+
return Utils.roundToNDecimalPlaces(inc, 4);
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* Right ascension of the ascending node in degrees. Essentially, this is the angle of the
|
|
479
|
+
* satellite as it crosses northward (ascending) across the Earth's equator (equatorial
|
|
480
|
+
* plane).
|
|
481
|
+
*
|
|
482
|
+
* Units: degrees
|
|
483
|
+
*
|
|
484
|
+
* Range: 0 to 359.9999
|
|
485
|
+
*
|
|
486
|
+
* Example: 208.9163
|
|
487
|
+
*
|
|
488
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
489
|
+
* @returns {number} The right ascension of the satellite.
|
|
490
|
+
*/
|
|
491
|
+
Tle.getRaan = function (tleLine2) {
|
|
492
|
+
var raan = parseFloat(tleLine2.substring(Tle.raan.start, Tle.raan.stop));
|
|
493
|
+
if (!(raan >= 0 && raan <= 360)) {
|
|
494
|
+
throw new Error("Invalid RAAN: ".concat(raan));
|
|
495
|
+
}
|
|
496
|
+
return Utils.roundToNDecimalPlaces(raan, 4);
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* Orbital eccentricity, decimal point assumed. All artificial Earth satellites have an
|
|
500
|
+
* eccentricity between 0 (perfect circle) and 1 (parabolic orbit).
|
|
501
|
+
*
|
|
502
|
+
* Range: 0 to 1
|
|
503
|
+
*
|
|
504
|
+
* Example: 0.0006317 (`0006317` in the original TLE)
|
|
505
|
+
*
|
|
506
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
507
|
+
* @returns {number} The eccentricity of the satellite.
|
|
508
|
+
*/
|
|
509
|
+
Tle.getEccentricity = function (tleLine2) {
|
|
510
|
+
var ecc = parseFloat("0.".concat(tleLine2.substring(Tle.eccentricity.start, Tle.eccentricity.stop)));
|
|
511
|
+
if (!(ecc >= 0 && ecc <= 1)) {
|
|
512
|
+
throw new Error("Invalid eccentricity: ".concat(ecc));
|
|
513
|
+
}
|
|
514
|
+
return Utils.roundToNDecimalPlaces(ecc, 7);
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Argument of perigee. See https://en.wikipedia.org/wiki/Argument_of_perigee
|
|
518
|
+
*
|
|
519
|
+
* Units: degrees
|
|
520
|
+
*
|
|
521
|
+
* Range: 0 to 359.9999
|
|
522
|
+
*
|
|
523
|
+
* Example: 69.9862
|
|
524
|
+
*
|
|
525
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
526
|
+
* @returns {number} The argument of perigee in degrees.
|
|
527
|
+
*/
|
|
528
|
+
Tle.getArgOfPerigee = function (tleLine2) {
|
|
529
|
+
var argPe = parseFloat(tleLine2.substring(Tle.argPerigee.start, Tle.argPerigee.stop));
|
|
530
|
+
if (!(argPe >= 0 && argPe <= 360)) {
|
|
531
|
+
throw new Error("Invalid argument of perigee: ".concat(argPe));
|
|
532
|
+
}
|
|
533
|
+
return Utils.roundToNDecimalPlaces(argPe, 4);
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Mean anomaly. Indicates where the satellite was located within its orbit at the time of the
|
|
537
|
+
* TLE epoch.
|
|
538
|
+
* See https://en.wikipedia.org/wiki/Mean_Anomaly
|
|
539
|
+
*
|
|
540
|
+
* Units: degrees
|
|
541
|
+
*
|
|
542
|
+
* Range: 0 to 359.9999
|
|
543
|
+
*
|
|
544
|
+
* Example: 25.2906
|
|
545
|
+
*
|
|
546
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
547
|
+
* @returns {number} The mean anomaly of the satellite.
|
|
548
|
+
*/
|
|
549
|
+
Tle.getMeanAnomaly = function (tleLine2) {
|
|
550
|
+
var meanA = parseFloat(tleLine2.substring(Tle.meanAnom.start, Tle.meanAnom.stop));
|
|
551
|
+
if (!(meanA >= 0 && meanA <= 360)) {
|
|
552
|
+
throw new Error("Invalid mean anomaly: ".concat(meanA));
|
|
553
|
+
}
|
|
554
|
+
return Utils.roundToNDecimalPlaces(meanA, 4);
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* Revolutions around the Earth per day (mean motion).
|
|
558
|
+
* See https://en.wikipedia.org/wiki/Mean_Motion
|
|
559
|
+
*
|
|
560
|
+
* Range: 0 to 17 (theoretically)
|
|
561
|
+
* Example: 15.54225995
|
|
562
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
563
|
+
* @returns {number} The mean motion of the satellite.
|
|
564
|
+
*/
|
|
565
|
+
Tle.getMeanMotion = function (tleLine2) {
|
|
566
|
+
var meanMo = parseFloat(tleLine2.substring(Tle.meanMo.start, Tle.meanMo.stop));
|
|
567
|
+
if (!(meanMo >= 0 && meanMo <= 17)) {
|
|
568
|
+
throw new Error("Invalid mean motion: ".concat(meanMo));
|
|
569
|
+
}
|
|
570
|
+
return Utils.roundToNDecimalPlaces(meanMo, 8);
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* Total satellite revolutions when this TLE was generated. This number rolls over
|
|
574
|
+
* (e.g. 99999 -> 0).
|
|
575
|
+
*
|
|
576
|
+
* Range: 0 to 99999
|
|
577
|
+
*
|
|
578
|
+
* Example: 6766
|
|
579
|
+
*
|
|
580
|
+
* @param {string} tleLine2 The second line of the TLE to parse.
|
|
581
|
+
* @returns {number} The revolutions around the Earth per day (mean motion).
|
|
582
|
+
*/
|
|
583
|
+
Tle.getRevNum = function (tleLine2) {
|
|
584
|
+
return parseInt(tleLine2.substring(Tle.revNum.start, Tle.revNum.stop));
|
|
585
|
+
};
|
|
586
|
+
Tle.lineNumber = new TleFormatData(1, 1);
|
|
587
|
+
Tle.satNum = new TleFormatData(3, 7);
|
|
588
|
+
Tle.classification = new TleFormatData(8, 8);
|
|
589
|
+
Tle.intlDes = new TleFormatData(10, 17);
|
|
590
|
+
Tle.intlDesYear = new TleFormatData(10, 11);
|
|
591
|
+
Tle.intlDesLaunchNum = new TleFormatData(12, 14);
|
|
592
|
+
Tle.intlDesLaunchPiece = new TleFormatData(15, 17);
|
|
593
|
+
Tle.epochYear = new TleFormatData(19, 20);
|
|
594
|
+
Tle.epochDay = new TleFormatData(21, 32);
|
|
595
|
+
Tle.meanMoDev1 = new TleFormatData(34, 43);
|
|
596
|
+
Tle.meanMoDev2 = new TleFormatData(45, 52);
|
|
597
|
+
Tle.bstar = new TleFormatData(54, 61);
|
|
598
|
+
Tle.ephemerisType = new TleFormatData(63, 63);
|
|
599
|
+
Tle.elsetNum = new TleFormatData(65, 68);
|
|
600
|
+
Tle.checksum = new TleFormatData(69, 69);
|
|
601
|
+
Tle.inclination = new TleFormatData(9, 16);
|
|
602
|
+
Tle.raan = new TleFormatData(18, 25);
|
|
603
|
+
Tle.eccentricity = new TleFormatData(27, 33);
|
|
604
|
+
Tle.argPerigee = new TleFormatData(35, 42);
|
|
605
|
+
Tle.meanAnom = new TleFormatData(44, 51);
|
|
606
|
+
Tle.meanMo = new TleFormatData(53, 63);
|
|
607
|
+
Tle.revNum = new TleFormatData(64, 68);
|
|
608
|
+
return Tle;
|
|
609
|
+
}());
|
|
610
|
+
export { Tle };
|
|
611
|
+
//# sourceMappingURL=tle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tle.js","sourceRoot":"","sources":["../../src/tle/tle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAmBvC;IAAA;IAqpBA,CAAC;IAxmBC;;;;;;;OAOG;IACW,YAAQ,GAAtB,UAAuB,QAAkB,EAAE,QAAkB;QAC3D,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAEvC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;QAED,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,EAAE;YACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACvD;QAED,IAAI,KAAK,C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GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAErC,YAAQ,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAErC,eAAW,GAAG,IAAI,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEvC,QAAI,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEjC,gBAAY,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEzC,cAAU,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEvC,YAAQ,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAErC,UAAM,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEnC,UAAM,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IA0mBpD,UAAC;CAAA,AArpBD,IAqpBC;SArpBY,GAAG"}
|
|
@@ -7,25 +7,21 @@
|
|
|
7
7
|
* in the original SGP4 library such as ECI to ECF and ECF to RAE. This was based
|
|
8
8
|
* on some of the functions in satellite.js.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* in the Software without restriction, including without limitation the rights
|
|
13
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
* furnished to do so, subject to the following conditions:
|
|
10
|
+
* @license AGPL-3.0-or-later
|
|
11
|
+
* @Copyright (c) 2020-2022 Theodore Kruczek
|
|
16
12
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
|
|
14
|
+
* terms of the GNU Affero General Public License as published by the Free Software
|
|
15
|
+
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
19
16
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* SOFTWARE.
|
|
17
|
+
* Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
18
|
+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
19
|
+
* See the GNU Affero General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU Affero General Public License along with
|
|
22
|
+
* Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
|
|
27
23
|
*/
|
|
28
|
-
import { Degrees, EcfVec3, EciVec3, LlaVec3, Radians, RaeVec3, SezVec3 } from '
|
|
24
|
+
import { Degrees, EcfVec3, EciVec3, LlaVec3, Radians, RaeVec3, SezVec3 } from '../types/types';
|
|
29
25
|
declare class Transforms {
|
|
30
26
|
static getDegLat(radians: Radians): Degrees;
|
|
31
27
|
static getDegLon(radians: Radians): Degrees;
|
|
@@ -35,7 +31,8 @@ declare class Transforms {
|
|
|
35
31
|
static deg2rad(degrees: Degrees): Radians;
|
|
36
32
|
static ecf2eci(ecf: EcfVec3, gmst: number): EciVec3;
|
|
37
33
|
static ecf2rae(lla: LlaVec3, ecf: EcfVec3): RaeVec3;
|
|
38
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* EciToGeodetic converts eci coordinates to lla coordinates
|
|
39
36
|
* @param {vec3} eci takes xyz coordinates
|
|
40
37
|
* @param {number} gmst takes a number in gmst time
|
|
41
38
|
* @returns {array} array containing lla coordinates
|