Raspberry Pi - Serial UART Communication
Given the Python code snippet reading GPS data, what will be printed if the GPS sends the sentence '$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47'?
import serial
ser = serial.Serial('/dev/ttyS0', 9600)
line = ser.readline().decode('ascii', errors='replace')
if line.startswith('$GPGGA'):
print('GPS fix data:', line.strip())
else:
print('Other data')