fix: prevent vessels.self fallback on missing MMSI#305
Merged
tkurki merged 4 commits intoSignalK:masterfrom Feb 3, 2026
Merged
fix: prevent vessels.self fallback on missing MMSI#305tkurki merged 4 commits intoSignalK:masterfrom
tkurki merged 4 commits intoSignalK:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes SignalK/n2k-signalk#2308.
SignalK/signalk-server#2308