Re: Reading GPS NMEA via serial port [message #43083] |
Tue, 22 March 2005 13:05  |
b_gom
Messages: 105 Registered: April 2003
|
Senior Member |
|
|
Andrew,
I assume you converted the byte array into a string. Is the NMEA string
you posted what you get, or what you expect to get?
The two main pitfalls are making sure you have the correct port
settings, and making sure that you read a complete NMEA sentence each
time. Try adjusting the port settings until you get a meaningful
looking string printed out.
Brad
Andrew Cool wrote:
> 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
|
|
|