fix(ais): keep a tracked vessel's motion when static data arrives

This commit is contained in:
Rudy Celekli committed 2026-10-24 00:23:44 -04:00
1 parent 9d3548c27c
commit 2bcd27c1e0
2 files changed
+41

No files matched your search

+5
View File
@@ -51,6 +51,11 @@ export function ingestAisStreamEnvelope(envelope) {
};
_aisStreamStatic.set(mmsi, staticData);
mergeAisStaticIntoLiveVessel(mmsi, staticData);
// AISStream repeats the last known position in a static message's
// MetaData, but the message has no speed, course or heading and is not a
// new fix. Rebuilding a tracked vessel from it would blank its motion and
// restamp its position time, so only merge the static fields.
if (_aisStreamVessels.has(mmsi)) return true;
}
const lat = numberValue(