GPS_SmartMode
Chuck Rice
Posts: 210
I am trying to use the GPS_SmartMode object. It works, but the Parallax GPS module is supposed to update about once a second. But to read all of the information, it ends up taking 10 to 12 seconds.
Is this a limit of the Object, or of the GPS module's smart mode. Do I have to go to RAW mode to get true 1Hz data? -Chuck-
Pub getGPSdata GPS.GetInfo(@hwString, @fwString) GPS.GetDateAndTime(@date_string, @time_string) valid := GPS.GetValid satellites:= GPS.GetSats latitude := GPS.GetLatitude longitude := GPS.GetLongitude altitude := GPS.GetAltitude speed := GPS.GetSpeed heading := GPS.GetHeading
Is this a limit of the Object, or of the GPS module's smart mode. Do I have to go to RAW mode to get true 1Hz data? -Chuck-
Comments
You should use the "dumb mode" which only listens.
Here is may latest version, there should be only minor changes needed for the Parallax module
Perry
Did you happen to try the posted code on the Parallax GPS module? Did it work straight away, or did you have to modify it at all?
Thanks,
Jason
The RAW-mode version works much faster. I have modified it a bit, but just to
add some comments and new calls. I am having trouble with the date though.
It always returns 0000000. Everything else seems to work. Here is a picture of it
running: The GPS
is running on one propboard, and sending the output to a second propboard
via a serial link for display. I am still in the middle of testing it, but here is the
code I use to call it:
Thanks to Perry for getting me started!
BTW Perry, what is RMC_Ready? It is always one, so I deleted it. -Chuck-
GPSready inicates that all 3 sat position rmc messages have been seen. used on an ovehead sat view (the mini version does not include this).
nearly every thing returned is a string in my code what is with date as "serial.hex(GPS.date,12)"
Perry
When I try displaying date as a string, I get a null string. To verify that it was a zero length string, I changed to display it as hex.
All three RMC messages? I thought that there was only 1 RMC sentence, but three GSV messages. I may be misunderstanding something.
I tried to attach my edited version of GPS_IO_full.spin, but I get an error trying to attach it. -Chuck-
My suspicion is that you should allocate 80 bytes for the rmc sentence.
The parallax module seems to output a little extra than the SIRF module I use.
It looks like there is still a bug in my code
Perry
I tried giving all sentences 90 bytes and I changed the two limit checks to 82, but no joy.
I think I need to dump the raw sentence. -Chuck-
statement was off by two for my GPS. I only get HHMMSS not HHMMSS.SS
The extra three characters (".SS") Were causing the test to be wrong.
also I added a cptr-- to remove the checksum "*" from the last field. The
star was showing up in the last field.
I also removed the code that tested for the doubled commas. You had
already replaced the comma with a null and that was sufficient to
terminate the null string.
I will post the modified code in the text since I get an error when I try
to attach it to this post.
Thanks for giving me a good start. Your code saved me a lot of time
and it was interesting. You might want to post it in the object exchange.
-Chuck-
if it will help or hurt.
the longfill(gps_buff,0,20)
may need to be changed to longfill(gps_buff,20,0)
From the manual: LONGFILL(StartAddress, Value, Count )
it looks like the value and count are swapped. This causes the buffer
not to be zeroed, but I am not sure it needs to be as it seems to work
as is. -Chuck-
Even the code you quoted above shows the same.
This code, in mini version is in the object exchange obex.parallax.com/objects/225/
Perry
Yikes! I got it backwards too. The format is value,count.
"longfill(gps_buff,20,0)" says to put the value 20 into gps_buff zero times. Sorry for the confusion. -Chuck-
Perry