„measurement_main.py“ ändern

Changes GPS monitoring to GPRMC.
This commit is contained in:
2022-11-01 14:18:21 +00:00
parent d5311215ad
commit e5c243f075

2
measurement_main.py Executable file → Normal file
View File

@@ -247,7 +247,7 @@ def monitor_gps(ser, output_file):
while ser.is_open: while ser.is_open:
nmea_sentence = ser.readline() #GPRMC nmea_sentence = ser.readline() #GPRMC
nmea_str = nmea_sentence.decode("utf-8") nmea_str = nmea_sentence.decode("utf-8")
if nmea_str.startswith("$GPGGA"): if nmea_str.startswith("$GPRMC"):
write_to_file(output_file, nmea_str) write_to_file(output_file, nmea_str)
except: except:
if not ser.is_open: if not ser.is_open: