Parallax GPS module with SX/B
Ben_08
Posts: 1
I have some questions about parsing out some data from the Parallax GPS module string. For testing purposes i am currently only worried about obtaining the speed parameter from the ASCII string. I need some help with writing the code for parsing speed out of the string. Any suggestions would be beneficial.
Comments
This is the a snip that gets it: (BS2 version - debug has to be replaced with a serial out...)
Get_Speed:
SEROUT Sio, Baud, [noparse][[/noparse]"!GPS", GetSpeed]
SERIN Sio, Baud, 3000, No_Response, [noparse][[/noparse]speed.HIGHBYTE, speed.LOWBYTE]
DEBUG MoveTo, FieldLen, 15, DEC (speed / 10), ".", DEC1 (speed // 10), " Knots "
' convert speed from knots to MPH
workVal = speed + (speed ** $2699) ' 1 knot = 1.1507771555 MPH
DEBUG " ( ", DEC (workVal / 10), ".", DEC1 (workVal // 10), " MPH ) "
RETURN
There are also several examples in the SX forum.· do a quick search
Regards
Chet
Post Edited (Chet) : 5/1/2009 8:03:11 PM GMT
Check out the Nuts and Volts Articles posted on downloads section of Paralax Website. There is an article entitled "Hacking the Parallax GPS" that gives a wealth of information about the Gps and how to parse the NEMA strings.
RS_Jim