From 77b485d619e79fa59994a07909c78de4ff023590 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 24 Oct 2026 21:10:12 -0700 Subject: [PATCH] fix(ais): refresh changed static metadata without advancing position --- changelog.d/1351-ais-static-keeps-motion.md | 3 + docs/CURRENT-STATE.md | 8 + server/providers/vessels/ais-store.js | 60 ++++++-- src/data/aisStreamSentinels.test.mjs | 159 ++++++++++++++++++++ 4 files changed, 220 insertions(+), 10 deletions(-) diff --git a/changelog.d/1351-ais-static-keeps-motion.md b/changelog.d/1351-ais-static-keeps-motion.md index 78b0804f7..52dd9bede 100644 --- a/changelog.d/1351-ais-static-keeps-motion.md +++ b/changelog.d/1351-ais-static-keeps-motion.md @@ -1,3 +1,6 @@ - Keep a tracked vessel's speed, course, heading and fix time when AISStream static data arrives; the static message only merges name, type, destination and IMO (rudycelekli, #1351). +- Apply changed static metadata immediately, retaining known fields when a + later static report omits them, without refreshing the vessel's position + (samehkhamis, #1351). diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index ede889fdc..282181df3 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -459,6 +459,14 @@ than a reading. Heading keeps its existing separate check for its own sentinel. Genuine readings are unchanged, including a stopped vessel's zero and the highest speed and course the fields can encode. +For an already tracked vessel, AISStream static messages update name, type, +destination and IMO without changing its position, motion, fix timestamps, +position freshness or trail. Non-empty static values replace earlier values; +omitted, empty or unavailable fields retain known metadata across Class B's +separate reports and in the cache used by the next position update. Position +reports still prefer their own metadata name. Invalid Class B parts are ignored; +absent fields prefer the latest live value over the static cache. + Native `