Commit Graph
3 Commits
Author SHA1 Message Date
Theerayut BoonkirdandClaude Opus 5 75869d0c10 chore: adopt the new AIS test into the explicit formatting scope
scripts/format.mjs skips *.test.mjs during runtime discovery, so a test
added under a discovered root is never seen by format:check until it is
listed in scripts/format-scope.json — which is what CODE-BOUNDARIES.md
means by adding tests to the explicit list as they are adopted. The file
went in unformatted and the check stayed green, hiding it.

Listed and formatted; format:check now covers 917 files instead of 916.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-18 00:43:02 +01:00
Theerayut BoonkirdandClaude Opus 5 b0f5072347 docs: record the AIS unavailable-code handling
CONTRIBUTING asks for docs/CURRENT-STATE.md and CHANGELOG.md in the same PR
as a runtime behaviour change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-18 00:41:06 +01:00
Theerayut BoonkirdandClaude Opus 5 88f6e8bcf8 fix: treat AIS "not available" speed and course as unknown
ITU-R M.1371 encodes speed over ground in 0.1-knot units and course over
ground in 0.1-degree units, reserving the top code of each field for "not
available": SOG 1023 reaches us as 102.3 knots and COG 3600 as 360 degrees.
Both are finite, so numberValue passed them through as ordinary readings and
every consumer — vessel cards, the HUD, voice analyst queries — treated a
missing measurement as a real one.

Observed on a live AISStream feed of 3,062 vessels: exactly 3 records at
102.3 knots with no reading anywhere between 40 and 102.3, and 404 records
at exactly 360 degrees. One Dutch rescue boat moored at its station carried
both sentinels at once, so an analyst summary reported a maximum speed of
102.3 knots — faster than any vessel afloat.

Filter both at the store, where AISStream messages are decoded, so the
sentinels never enter the cache. Heading already had this treatment through
normalizedHeading with its own separate sentinel of 511.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-18 00:41:06 +01:00