Parallax GPS NMEA String comparison code help for near-newbie
WBA Consulting
Posts: 2,935
I am trying to create the Reverse Geo-Cache Project that I posted in the sandbox a while back for my wife's birthday (12/21). In my searching for objects in the OBEX, it seems that parsing the NMEA string data from the GPS in RAW mode is done by typical manipulation of variables (longs, bytes, and arrays). Unfortunately, I am still learning how to do this type of thing in SPIN and it's a bit of a struggle. I am looking at the following to help with this project:
Google Earth SD Card Logger thread (logs incorrectly formatted data, but works for analysis; see my post on that thread about the bug)
GPS to VGA Object
GPS Float Object
It appears that the data from the NMEA string is being stored in an array (buffer) and pointers are created for the different pieces of data so that they can be called individually. This makes sense to me. Here's my dilemma:
What commands should I be looking at so that I can compare a Latitude string with a stored value to give me a result that tells me that I am within X distance from the stored value? My thoughts are that if I am looking for Latitude "38.795150" then I would just make sure the Latitude string begins with "38.7951" (IE: 38.795100-199) and I know I am within 18 feet of my target. That would work for my project.
How do I translate "does lat-string begin with 38.7951" into SPIN?
thanks!!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Google Earth SD Card Logger thread (logs incorrectly formatted data, but works for analysis; see my post on that thread about the bug)
GPS to VGA Object
GPS Float Object
It appears that the data from the NMEA string is being stored in an array (buffer) and pointers are created for the different pieces of data so that they can be called individually. This makes sense to me. Here's my dilemma:
What commands should I be looking at so that I can compare a Latitude string with a stored value to give me a result that tells me that I am within X distance from the stored value? My thoughts are that if I am looking for Latitude "38.795150" then I would just make sure the Latitude string begins with "38.7951" (IE: 38.795100-199) and I know I am within 18 feet of my target. That would work for my project.
How do I translate "does lat-string begin with 38.7951" into SPIN?
thanks!!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Comments
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 12/13/2009 8:18:32 AM GMT
www.srlmproductions.com/projects-home/propeller-objects-1/GPSAssembly.zip?attredirects=0&d=1
It's designed for a 5Hz (?) GPS so you might have to change the buad. I don't have the time to look at it this morning, but let me know and I can see what needs to be changed for you tonight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm
Phil, Does the quit stop the IF routine or the REPEAT routine? (I need to read up more on IF usage in SPIN)
SRLM, I really like your Bacchus clock on your site!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
-P.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
But you·can·call me micro.
Want to·experiment with the SX or just put together a cool project?
SX Spinning light display·
My overstock is killing me.
PM me for absolutly FREE 8-pin Mini Din connectors.