Parsing GPS sentence
Posted: Fri Aug 05, 2016 4:19 pm
Hi all,
Since 3 days I try to select the right sentence ( $GPRMC ) from an GPS via the uart.
When I use the readline(), no problems all the sentences are read one by one, except that when I print them there is a "b" as the first character of the line.
When I try to identify the good sentence by:
while True:
cad=uart.readline(7) #just read the first 7 characters of the sentence
if (cad == '$GPRMC,'): # compare these 7 characters to $GPRMC,
data=uart.readline() #read the rest of the line for parsing it later
That don't work!
Is there a way for not having the "b" in front of the extracted line ?
See somewhere that tha "b" is displaying by micropython to say that's a binary result.
If someone can help me ?
Best regards
Jiemde
Since 3 days I try to select the right sentence ( $GPRMC ) from an GPS via the uart.
When I use the readline(), no problems all the sentences are read one by one, except that when I print them there is a "b" as the first character of the line.
When I try to identify the good sentence by:
while True:
cad=uart.readline(7) #just read the first 7 characters of the sentence
if (cad == '$GPRMC,'): # compare these 7 characters to $GPRMC,
data=uart.readline() #read the rest of the line for parsing it later
That don't work!
Is there a way for not having the "b" in front of the extracted line ?
See somewhere that tha "b" is displaying by micropython to say that's a binary result.
If someone can help me ?
Best regards
Jiemde