mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-12 06:12:18 +00:00
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:
1 parent
a4d3701c3c
commit
46b3864d61
4 files changed
+38
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user