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
|
|
|
Re: Reading GPS NMEA via serial port [message #43316 is a reply to message #43083] |
Mon, 04 April 2005 15:43  |
andrew.cool
Messages: 47 Registered: July 2003
|
Member |
|
|
b_gom@hotmail.com wrote in message news:<1111525509.015828.49450@z14g2000cwz.googlegroups.com>...
> 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?
I'll answer my own post - it may help someone else who starts out as
bone ignorant as me of matters GPS.
My GPS unit (Fortuna out of Taiwan) uses the SiRF chipset, which follows
(by default) the SiRF Binary Protocol, which is a whole different kettle
of kippers from human readable NMEA ASCII strings.
Alas, the crappy little manual provided with my GPS unit didn't see fit to
mention any of this...
So the crazy, mixed up stream of bytes I was seeing is entirely kosher
afterall - you just have to decode them according to the SiRF Protocol.
Or, you can send the GPS unit a command to switch it into NMEA mode.
Here's a link to a very good Windows utility called SiRFDemo, that can
toggle between SiRF and NMEA, and display all the GPS info :-
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=25575
And for completeness, here's one place to download a copy of the
SiRF Binary Protocol, so that you can decode all those byte values that
stream out of the GPS unit :-
http://www.rayming.com/download/SiRF%20Binary%20Protocol.pdf
I haven't progressed much further on my own code recently, as I've
been busy renovating the house prior to sale, buying a new car for the
wife, and now the space bar on my laptop at home has done a John Paul II,
and stopped responding.
And Soccer season starts next week for the 3 females in the household,
so there goes my weekends too... :-(
But I remain determined to read this blasted GPS thingy! Certainly the
serial dll from the RSI User Contrib site works well.
Andrew (who's getting there slowly) Cool
Adelaide, Oz
|
|
|