-
I'm not sure if "$" should be accounted in the checksum.
As shown here, NMEA checksum calculation does not include "$" and "*"Lets assume the following NMEA sentence:
$GPGLL,5300.97914,N,00259.98174,E,125926,A*28
In this sentence the checksum is the character representation of the
hexadecimal value 28. The string that the checksum is calculated over
isGPGLL,5300.97914,N,00259.98174,E,125926,A
To calculate the checksum you parse all characters between $ and *
from the NMEA sentence into a new string.
It does, but that happens after the checksum is calculated. The
cmd
going intochecksum()
does not yet contain it.