fulup-bzh / GeoGate

GeoGate is an opensource tracking GPS/AIS framework to implement GTS applications.
Apache License 2.0
74 stars 39 forks source link

Checksum fails when lowercase #46

Closed marcobergman closed 1 year ago

marcobergman commented 1 year ago

I don't know if nmea checksums should be uppercase, but when they are not, the checksum fails when there is a lowercase letter in it. Other software accepts lowercase checksums.

This fails checksum:

!AIVDM,1,1,,A,5@00050000010;7;?@0Pm>1=04pdE:340000001?<Pj??<0Ht<U2C@UBm5@000000000008,0*1f

This does not

!AIVDM,1,1,,A,5@00050000010;7;?@0Pm>1=04pdE:340000001?<Pj??<0Ht<U2C@UBm5@000000000008,0*1F
fulup-bzh commented 1 year ago

I agree they is no reason to refuse a lowercase checksum. Should not be complex to mast for uppercase the checksum before computation. If you propose a merge-request I will be more than happy to integrate it.

marcobergman commented 1 year ago

Ok I made the fix and tested it by making a checksum lowercase in AisEncodeDecodeTest.js; this used to create a checksum error and now its does not. PR created.