Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


nmea_validator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
nmea_validator [2017/10/02 13:58] adminnmea_validator [2017/10/02 13:59] admin
Line 9: Line 9:
  
 # Example string # Example string
-# $GPGGA,054917.000,5150.8585,N,00420.4585,E,1,06,1.23,-24.7,M,47.1,M,,*71+# $GPGGA,054917.000,5100.0000,N,00400.0000,E,1,06,1.23,-24.7,M,47.1,M,,*71
  
 # Match only lines starting with $ and ending with *<checksum> # Match only lines starting with $ and ending with *<checksum>
-pattern = re.compile("^\$.*\*[0-9a-fA-F]{2}")+pattern = re.compile("^\$(.*)\*[0-9a-fA-F]{2}")
  
 with open("nmea.log") as nmea: with open("nmea.log") as nmea:
nmea_validator.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1