Skip to content

fix: prevent vessels.self fallback on missing MMSI#305

Merged
tkurki merged 4 commits intoSignalK:masterfrom
Bucket1616:fix/mmsi-context-teleportation
Feb 3, 2026
Merged

fix: prevent vessels.self fallback on missing MMSI#305
tkurki merged 4 commits intoSignalK:masterfrom
Bucket1616:fix/mmsi-context-teleportation

Conversation

@Bucket1616
Copy link
Contributor

Fixes SignalK/n2k-signalk#2308.
SignalK/signalk-server#2308

If a misbehaving AIS device sends out a 129041 PGN message without a UserID, the current code will set this to undefined (or maintain undefined). Unfortunately, this causes signalK to assume, 'Self" Context, which means the reported position for self becomes whatever the value of the "failing" ATON is.  This was found because my Anchor Alarm get sporadically going off.  Making the same changes to 129793.js and 129798.js and mmsi-context.js to prevent the same problem across other PGNs.
Same change as was done for 129041.  If an AIS device sends out a message without userId, the file will change/maintain the value at undefined.  When undefined, SignalK interprets this as a "Self" Context, changing the position of self.  It must be set to something; hence 'shore.unknown'.
Same change as was done for 129041.  If an AIS device sends out a message without userId, the file will change/maintain the value at undefined.  When undefined, SignalK interprets this as a "Self" Context, changing the position of self.  It must be set to something; hence 'sar.unknown'.
Same change as was done for 129041.js.  If an AIS device sends out a message without userId, the file will change/maintain the value at undefined.  When undefined, SignalK interprets this as a "Self" Context, changing the position of self.  It must be set to something; hence 'vessels.unknown'.  This was also corrected in 129041, 129793, 129798, all of which are not "vessels", so have their context explicitly handled in the respective .js file.
@tkurki tkurki added the fix label Feb 3, 2026
@tkurki tkurki merged commit 6a57912 into SignalK:master Feb 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants