GPS Ingest v1.0
Paul_H
Posts: 85
Hello All,
It's been a while since I contributed and I've finally gotten my GPS Ingest routines together for your use, comments and review. These routines read and parse GPS NMEA strings to variable locations on the fly. Special thanks for Phil Pilgrim and MK Borri for their inspiration and code snips. So far I have copied the routines out for four common NMEA strings.
The START routine calls a demo which looks for the three $GPxxx strings, parses and displays what ever is available. I've been using the free GPSSimulator program at http://www.sailsoft.nl/ for development.
I want you feedback and comments as this is a work in progress.
Roadmap:
1. Instruct the serial i/o to Not wait for each string so it won't get stuck if a string doesn't arrive.
2. Figure out how to use variables directly (rather than use @ with everything!)
3. Determine if I really need explicit variable size definition.
When this is a little cleaner, I'll post to the object exchange
Thanks for you comments!
Paul
Questions/Comments/Suggestions?
1. Do you think it is better for each PUB procedure to return all the variable when called ie GPRMC, or to assign them to preexisting global variables as I do now?
.
It's been a while since I contributed and I've finally gotten my GPS Ingest routines together for your use, comments and review. These routines read and parse GPS NMEA strings to variable locations on the fly. Special thanks for Phil Pilgrim and MK Borri for their inspiration and code snips. So far I have copied the routines out for four common NMEA strings.
$GPRMC Recommended minimum data ie: $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62 $GPGLL Geographic Position, Latitude/Longitude ie: $GPGLL,4916.45,N,12311.12,W,225444*7B $GPGGA GPS Fix Data ie: $GPGGA,170834,4124.8963,N,08151.6838,W,1,05,1.5,280.2,M,-34.0,M,,,*75 $PGRMZ GARMIN Barometric Pressure Altitude ie: $PGRMZ,707,f,3*1B
The START routine calls a demo which looks for the three $GPxxx strings, parses and displays what ever is available. I've been using the free GPSSimulator program at http://www.sailsoft.nl/ for development.
I want you feedback and comments as this is a work in progress.
Roadmap:
1. Instruct the serial i/o to Not wait for each string so it won't get stuck if a string doesn't arrive.
2. Figure out how to use variables directly (rather than use @ with everything!)
3. Determine if I really need explicit variable size definition.
When this is a little cleaner, I'll post to the object exchange
Thanks for you comments!
Paul
Questions/Comments/Suggestions?
1. Do you think it is better for each PUB procedure to return all the variable when called ie GPRMC, or to assign them to preexisting global variables as I do now?
.
Comments
Paul
Is the GPRMB sentence on your list of sentences to add?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you want a parser for the Garmin simpletext format, feel free to grab it from my sig. Can I mess with your parser a bit and add sentences?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://forums.parallax.com/showthread.php?p=650217
meow, i have my own topic now? (sorta)
Please use, change, add or mod the code anyway you want - change is good, and I appreciate your help as I plodded along
I downloaded your project the day you posted it, and it in mind to put the values (like Lat and Lon or Time) into a mathematically usable formats. I had done these 4 sentences to get the conversation started around what is the best general way to acquire and preserve the data.
Larry,
It is pretty easy to add new sentences - I'll put it in the next release. In the meantime, check out the code and see if it presents the data best way for you (or copy a PUB and give it a try)! Phil Pilgrim's parsing code does all the real work. My part is a pretty repetitive process that needs only 3 thing: VAR names assigned in the VAR section, the sentence grabbed in the PUB GPXXX, and a display, but the display is just to show it is working.
Have fun,
Paul
My next revision will try and get around it, but i'm considering 64 bit math eventually... maybe for the next chip if it has more ram.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://forums.parallax.com/showthread.php?p=650217
meow, i have my own topic now? (sorta)