Long NMEA data strings
Stuarttttt
Posts: 45
Hi,
Whats the simplest and easiest way to retrieve and display long data strings (ie 68 characters) such as a raw GPS NMEA string ?
·········· $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598, *10·
Can the code below be improved to get all the data ?
sData1 VAR Word
Main:
DEBUG HOME
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),STR sdata1\29 ]
PAUSE 100
DEBUG " $GPRMC······ ", STR sdata1,CR,CR
GOTO Main
Thanks for any help
Stuart
·
Whats the simplest and easiest way to retrieve and display long data strings (ie 68 characters) such as a raw GPS NMEA string ?
·········· $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598, *10·
Can the code below be improved to get all the data ?
sData1 VAR Word
Main:
DEBUG HOME
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),STR sdata1\29 ]
PAUSE 100
DEBUG " $GPRMC······ ", STR sdata1,CR,CR
GOTO Main
Thanks for any help
Stuart
·
Comments
Ah I see now. I did play around with 20 to 30 and now I know why.
How about getting data in packets of 26 using SKIP and then displaying it each time ?
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),SKIP 26,STR sdata\26 ]
Any thoughts ?
I suppose the debug/display part would be difficult.
While true that the data could conceiviably change from reading to reading, two or three quick readings should give usable data.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
sData1 VAR Word
Main:
DEBUG HOME
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),STR sdata1\20 ]
PAUSE 100
DEBUG " $GPRMC 1 ", STR sdata1,CR,CR
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),SKIP 20,STR sdata1\20 ]
PAUSE 100
DEBUG " $GPRMC 2 ", STR sdata1,CR,CR
SERIN 12,188,[noparse][[/noparse]WAIT("RMC,"),SKIP 40,STR sdata1\20 ]
PAUSE 100
DEBUG " $GPRMC 3 ", STR sdata1,CR,CR
GOTO Main
Stuart
The CR is the only thing that causes the data to be displayed on separate lines.
However I have never seen a good write up on putting data on the Debug screen where you want it though.
Thanks for your help
Stuart