Shop OBEX P1 Docs P2 Docs Learn Events
Parallax GPS module with SX/B — Parallax Forums

Parallax GPS module with SX/B

Ben_08Ben_08 Posts: 1
edited 2009-05-02 11:25 in General Discussion
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

  • ChetChet Posts: 150
    edited 2009-05-01 12:51
    The manual gives example programs to get the speed (and other) information. Download it at : http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/GPSManualV1.1.pdf

    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
  • RS_JimRS_Jim Posts: 1,771
    edited 2009-05-02 11:25
    Ben
    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
Sign In or Register to comment.