Garmin NEMA Sentences
musictech
Posts: 54
I am trying to read the nema sentence information off of a Garmin GPS 18LVC reciever (www.garmin.com/manuals/GPS18_TechnicalSpecification.pdf). I am using a BS2. I have some sample code from an episode of Nuts and volts but it is designed for the BS2p, and one of the commands isn't compatible with the bs2 (spstr). I can pull data off the gps reciever but its garbled.
Can anyone help me with the parsing?
Thanks
Can anyone help me with the parsing?
Thanks
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
serin gpspin, 2400, no_gps, [noparse][[/noparse]wait"@", dec a, dec b, ..... , dec z]
debug dec a, tab, dec b, tab, ...., tab, dec z, cr
I get back a string of numbers, but nothing resembling the time. I have one other thing to check but kinda at a lost right now.
The data you are getting....is there 'garbage' in there or are they all readable values!?
You might not be getting fixed fields....so, it would drop the LSB 0's when they're there....so what was once a 5digit value would become a 4digit value.· So, by grabbing each individual character and then outputting the variables associated with where they were....then when you lose this digit your pointers all move up....I'm babbling lol!!
You do need to understand what your data looks like....the NMEA 0183 setting on your GPS would give you values separated by comma's.
So you could then do the
serin gpspin, 2400, no_gps, [noparse][[/noparse]wait"@", data1, skip ",", data2, "skip ","...etc...]· somehting like that anyhow!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://ca.geocities.com/steve.brady@rogers.com/index.html
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Based on the information I found elsewhere on the web, the Garmin GPS 18LVC apparently is set to output the NMEA sentence data at 4800 baud, not 2400 baud as you have indicated in your SERIN command, as a default setting from the factory. You can either change the defaut baud rate using the Garmin GPS Configuration Program that should have come with the unit, or with a terminal program like Windows Hyperterminal.
If you haven't changed the default baud rate, this may be the entire problem, as the data coming out WILL look like garbage.
Regards,
Bruce Bates
thanks a lot
Was the snippet you offered in a pseudo-code? If not, then you might not realize that "2400" as a baudrate parameter will not give you 2400 baud. Check the help file for the proper baudrate value for your Stamp model. Or better yet, include Jon's conditional template into your code to make things so much easier (not to mention neater).
HTH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...