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
nmea_validator [2017/10/02 13:59] adminnmea_validator [2021/10/09 15:14] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Python3 - NMEA Validator ======+====== python 3 - NMEA Validator ======
 Print only valid NMEA from file. Print only valid NMEA from file.
  
Line 12: Line 12:
  
 # 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