Read a satellite's launch year from one TLE parser

The catalog stored the designator on satrec.intldesg for
internationalDesignatorYear, while the active-TLE lookup parsed the same
columns with tleLineLaunchYear. Each catalog entry now keeps launchYear from
tleLineLaunchYear, which moves to src/sources/tle.js beside the other TLE
field readers, and internationalDesignatorYear goes.

A blank designator now reads as an unknown year in both lookups; the
active-TLE lookup read it as 2000.
This commit is contained in:
Sameh Khamis committed 2026-11-01 22:53:35 -08:00
1 parent bfeec17c81
commit 4779432e48
5 files changed
+46 -23

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
import { twoline2satrec } from 'satellite.js';
import * as Cesium from 'cesium';
import { msg } from '../../i18n/index.js';
import { noradIdFromSatnum } from '../../sources/tle.js';
import { noradIdFromSatnum, tleLineLaunchYear } from '../../sources/tle.js';
import { CATALOG_GROUPS, ISS_NORAD, POINT_STYLES } from './policy.js';
export function createIngestion({
@@ -119,8 +119,6 @@ export function createIngestion({
for (const entry of allEntries) {
const satrec = twoline2satrec(entry.line1, entry.line2);
if (!satrec || satrec.error !== 0) continue;
// satellite.js omits the designator the launch-year match reads.
satrec.intldesg = entry.line1.slice(9, 17).trim();
const noradId = noradIdFromSatnum(satrec.satnum);
if (seen.has(noradId)) continue;
@@ -131,6 +129,8 @@ export function createIngestion({
name: entry.name,
satrec,
group: entry.group,
// satellite.js does not keep the designator the year match reads.
launchYear: tleLineLaunchYear(entry.line1),
});
coreStale ||= entry.stale;