-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
executable file
·21 lines (18 loc) · 994 Bytes
/
example.py
File metadata and controls
executable file
·21 lines (18 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3
from nmea.parser import parse
if __name__ == '__main__':
sentences = [
"$GPGGA,031919.542,3653.0286,S,17441.8568,E,0,00,,-26.2,M,26.2,M,,0000*78",
"$GNGGA,123158.60,3653.08804,S,17441.90569,E,1,05,1.68,39.3,M,28.0,M,,*6F",
"$GPRMC,000019.00,A,3653.0891,S,17441.9036,E,0.0719,355.494,240521,19.9,E*41",
"$GPGSV,7,1,27,01,31,256,20,03,21,224,00,04,01,264,00,10,24,041,27*7C",
"$GPGSV,7,2,27,12,06,146,13,21,30,287,13,22,48,232,20,25,28,118,37*7E",
"$GPGSV,7,3,27,26,21,012,23,31,81,317,25,32,45,114,40,42,34,311,00*76",
"$GPGSV,7,4,27,46,18,068,29,50,37,316,00,51,01,083,00,193,56,249,23*4C",
"$GPGSV,7,5,27,194,05,332,00,195,11,325,00,70,41,088,00,71,59,175,15*73",
"$GPGSV,7,6,27,72,22,225,00,73,71,064,00,74,33,353,00,80,35,143,27*76",
"$GPGSV,7,7,27,86,08,294,00,87,13,232,00,88,02,197,00*46",
]
for sentence in sentences:
data = parse(sentence)
print(data)