Shop OBEX P1 Docs P2 Docs Learn Events
stamp code for GPS decoding — Parallax Forums

stamp code for GPS decoding

ArchiverArchiver Posts: 46,084
edited 2001-04-02 05:39 in General Discussion
I have been posting on and off about a GPS project I am working on in robotics at eastern illinois university. I am not the great programmer that I need to be and therefore need some help with the code. What I need it do is read a sentance, say $GPRMC and enter each part into an array. This array will be updated every second as new information comes in and is processed, from there I can handle it but my problem is that the GPS sends out all of this information with commas seperating the info. How do I count the commas? The info is coming SERIN via serial port and I also have my computer hooked up at this point to debug the system.

Thanks in advance,
Matthew Klarich


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-04-01 10:47
    An idea to acquire, display and control robots.

    Your question has just given me a thought. Rather then use the BS as
    the "Brain" to control a robot. Why not use a PocketPC as the
    "Brain"
    and the Stamp as a hardware extension to gather telemetry and input
    from sensors and operate the motors. A single "Standard"
    program
    could be used for all stamps used in robot projects. The Stamp
    program would have all the common robot functions and a few auxiliary
    functions which could be "Called" from a PPC. Development
    time of
    extremely sophisticated robot projects could be greatly reduced and
    you would have a sleek, sharp and powerful, color touch screen
    display to control your robot. It also somewhat simplifies using a
    robot for data acquisition

    But I digress……..




    --- In basicstamps@y..., Matthew K <m_klarich@y...> wrote:
    >
    > I have been posting on and off about a GPS project I am working on
    in robotics at eastern illinois university. I am not the great
    programmer that I need to be and therefore need some help with the
    code. What I need it do is read a sentance, say $GPRMC and enter each
    part into an array. This array will be updated every second as new
    information comes in and is processed, from there I can handle it but
    my problem is that the GPS sends out all of this information with
    commas seperating the info. How do I count the commas? The info is
    coming SERIN via serial port and I also have my
    >
    > Thanks in advance,
    > Matthew Klarich
    >
    >
    >
    >
    > Do You Yahoo!?
    > Yahoo! Mail Personal Address - Get email at your own domain with
    Yahoo! Mail.computer hooked up at this point to debug the system.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-02 02:02
    That was actually one of my thoughts about the project and with the power that is built into todays PDA such as palm pilots and other machines that run Windows CE it is a large possibility. Eventually when I have the·truck running it will be sending back video feed(s) and also telemetry data that I can take and put into a moving map of the area. The R/C airplane is next semesters project along with this summer I will work on it on my own, this project started out on my own and it sounds like the Society of Manufacturing Engineers (SME) that is here at eastern illinois university may turn the plane or the car into next years student project which would be great to have another pair of hands at the keyboard doing some programming. The hardware for this has yet to be a problem, which I am sure it will be sometime because I can't have all the luck.

    As I was saying a new color palm pilot with some on screen instructions would be great, they are lightweight, they don't care much about vibration and their batteries would last just as long as the GPS batteries. I need to find some webpages about unmanned vehicles such as this, I know people make them. I wonder how big I could make a plane and how high/far it could go. The possiblities are endless, I know of one guy that sent one across the atlantic. Unfortunately the money is not endless, darn it.

    Thanks for all the input, I will put some pictures up on my website in the next couple weeks. Don't expect them soon though I have some nasty exams and papers coming up and finals are in 3 weeks. Yeah remember those damn things,·I hate them already. I love learning, hate the tests. Website is at www.stoneflyers.com , you can check out my aerials pictures·from my plane. They are pretty cool along with a couple movies at the same place. No a stamp was no involved with it but it is still cool.

    Matt Klarich


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Do You Yahoo!?
    Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-02 05:39
    Reading the output from a GPS device with a PPC is fairly easy using
    the Comm ActiveX control for PPC's. This example is from the help
    file that comes with the VB tool kit for WindowsCE and should work
    with the free Microsoft® eMbedded Visual Tools 3.0 for PocketPC's at
    http://www.microsoft.com/mobile/downloads/emvt30.asp

    First connect the RS-232 output from your GPS to the RS-232 input of
    the PPC and ground the two devices togeather. Using eMbedded, add a
    text box and a Comm control to a form and in the Form_Load event set
    the comm's settings like this

    Private Sub Form_Load()

    'Set input to text mode
    Comm1.InputMode = comInputModeText
    'Read whole buffer
    Comm1.InputLen = 0
    'Set com port
    Comm1.CommPort = 1
    'configure comm port settings
    Comm1.Settings = "9600,8,N,1"
    'every character is received one at a time from the input buffer
    Comm1.RThreshold = 1
    'every character is sent one at a time to the remote machine
    Comm1.SThreshold = 1
    `Open the comm port
    Comm1.PortOpen = True

    End Sub

    With the comm port open, every time data comes in on the RS-232 line
    the Comm1_OnComm() event is fired. Use this event to read the
    comm1.input buffer.

    Private Sub Comm1_OnComm()

    Select Case Comm1.CommEvent

    Case comEvReceive 'data inbound

    'add all text in the input buffer to a receive text box
    txtReceive.Text = txtReceive.Text & Comm1.Input

    Case comEvEOF 'end of file

    `Call the GetDelimitedText function
    Call GetDelimitedText

    End Select

    End Sub

    This example just displays the output from the GPS in a text box on
    the PPC but it illustrates how easy it is to use the PPC for data
    acquisition. The Comm example that comes with eMbedded also contains
    many other useful functions like error checking and handshaking that
    can be used as is or with very little modifications.
Sign In or Register to comment.