str
Checksum is calculated by xor'ing everything between ? or ! and
the *
>>> checksumStr("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")
'09'
>>> checksumStr("AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0")
'09'
|
checksumStr(data)
Take a NMEA 0183 string and compute the checksum.
|
bool
>>> isChecksumValid("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")
True
Corrupted:
>>> isChecksumValid("!AIVDM,11,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")
False
|
isChecksumValid(nmeaStr,
allowTailData=True)
Return True if the string checks out with the checksum
|
|
buildNmea(aisBits,
prefix='!',
serviceType='AI',
msgType='VDM',
channelSeq=None,
channel='A')
Create one long oversized nmea string for the bits
|