nmea0183-signalk icon indicating copy to clipboard operation
nmea0183-signalk copied to clipboard

Check for `<` in sentences causes skipping of valid VDM sentences

Open sbender9 opened this issue 8 years ago • 3 comments

The check in parse.js:

  // The (MTK) CRC check doesn't report "invalid" if the input string contains the "<" character, even though it actually isn't valid.
  if (sentence.includes('<')) {
    valid = false
  }

I see some VDM messages that contain this but parse fine if I remove the check, For example: !AIVDM,1,1,,A,352JPU@000JRU4<FCLvaEWOp0000,0*1B

sbender9 avatar Oct 05 '17 02:10 sbender9

Ok, it should not apply to ais sentences. The problem is that that character does not count in the checksum, so it was a way to ignore some corrupted sentences in the test files.

joabakk avatar Oct 05 '17 08:10 joabakk

@fabdrol?

joabakk avatar Oct 05 '17 19:10 joabakk

I ran the offending test file again without the condition, and it works fine. I guess it's a fix no longer needed

joabakk avatar Oct 05 '17 20:10 joabakk