mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(ais): keep a tracked vessel's motion when static data arrives
This commit is contained in:
1 parent
9d3548c27c
commit
2bcd27c1e0
2 files changed
+41
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user