mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
Draw aids to navigation as buoys
A buoy, beacon, RACON, light or IALA mark in the vessel feed was drawn as a ship. A vessel record whose type names one, or whose MMSI is an aid-to-navigation station's (99MIDxxxx), is now isAidToNavigation and vesselModelSpec draws it as the fleet set's buoy of its mark (cardinal N/E/S/W, port or starboard hand, safe water, isolated danger, special mark; a red can when the type names no mark), at its built size and flagged fixed so its model does not turn to a heading. Its icon is a disc instead of a chevron. AISStream now subscribes to AidsToNavigationReport by default, and the server names each report's aid type code (0 to 31) as its kind instead of reading it as a ship type.
This commit is contained in:
1 parent
f24abfc88f
commit
279aedb2f4
14 files changed
+345
-14
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { isRecognizedAisEnvelope } from '../../../src/data/aisStreamAdapter.js';
|
||||
import { aidToNavigationTypeName } from '../../../src/data/vesselTypes.js';
|
||||
export const AISSTREAM_CACHE_MAX = 50000;
|
||||
export const AISSTREAM_STALE_MS = 30 * 60 * 1000;
|
||||
// Per-MMSI recent-path ring buffers (PRD WS-F F3). Float32 lat/lon (~1m
|
||||
@@ -118,7 +119,12 @@ export function ingestAisStreamEnvelope(envelope) {
|
||||
name: vesselNameFromAis(metadata, message, staticData) || `MMSI ${mmsi}`,
|
||||
mmsi,
|
||||
imo: stringValue(message.ImoNumber ?? message.IMO ?? staticData.imo),
|
||||
type: vesselTypeFromAis(message, staticData),
|
||||
// An aid-to-navigation report's type is the kind of aid (0 to 31), not
|
||||
// a ship type: it is carried as the aid's name ("Cardinal Mark N").
|
||||
type:
|
||||
messageType === 'AidsToNavigationReport'
|
||||
? aidToNavigationTypeName(message.Type)
|
||||
: vesselTypeFromAis(message, staticData),
|
||||
destination: stringValue(message.Destination ?? staticData.destination),
|
||||
length: staticData.length ?? null,
|
||||
beam: staticData.beam ?? null,
|
||||
|
||||
Reference in new issue
Block a user