fix(satellites): stop matching a mission to a namesake from another year

The mission orbit lookup reads each loaded satellite's launch year from its
international designator, but satellite.js never parses that field, so the
year check never ran and a new payload could take an older namesake's orbit
and position. The loaded catalog now keeps the designator from the TLE line.
This commit is contained in:
Aditya committed 2026-10-28 17:15:48 +05:30
1 parent a4d3701c3c
commit 46b3864d61
4 files changed
+38

No files matched your search

+2
View File
@@ -114,6 +114,8 @@ export function createCatalog({ state: layerState, services, parts, source }) {
const entry = entries[i];
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 (layerState._catalog.has(noradId)) continue; // core catalog keeps priority
const pos = parts.orbits.propagatePosition(satrec, now);