Reading GPS NMEA via serial port [message #43090] |
Mon, 21 March 2005 15:17  |
andrew.cool
Messages: 47 Registered: July 2003
|
Member |
|
|
Hello All,
Having read a few recent posts about using the serial DLM from the
RSI user Contrib code site to read GPS data streams, I thought I'd give it
a try with my El Cheapo GPS at home.
Success to date is mixed.
Yes, I'm getting a data stream, and I can pick out an occassional UT
time stamp, but the rest leaves me flummoxed.
I gather that the returned NMEA sntence are human readable ASCII, a la :-
$GPGGA,170834,4124.8963,N,08151.6838,W,1,05,1.5,280.2,M,-34. 0,M,,,*75
and the the buffer returned from the COMM_READ call is of type BYTE.
(I initially had that set to 'string", and Boy was that an IDL Killer!)
So I should be able to spot a byte sequence for "GPGGA" in the above
82 byte long NMEA sentence, i.e. a sequence of 71,80,71,71,65.
But no. Printing out all the STRING'd valid [A..Z,a..z) characters in the data
stream produces rubbish.
What am I not understanding about getting recognizable NMEA sentences
outta my GPS unit?
I spent a balmy evening out on my back lawn, armed with laptop and GPS,
programming and swatting mossies, with not much to show for it other than
goobledeegook and itchy red lumps.
Cheers,
Andrew (aka Itchy & Scratchy)
DSTO, Adelaide, Oz
|
|
|