Shop OBEX P1 Docs P2 Docs Learn Events
GPS heading data on a slow-moving vehicle — Parallax Forums

GPS heading data on a slow-moving vehicle

skatjskatj Posts: 88
edited 2008-02-17 05:38 in BASIC Stamp
Hi all

I finally got my GPS navigation problem almost fully operational - with one problem: after weeks of debugging my code, all my navigation math is correct, however the GPS reading for current heading is very inaccurate.

Usually, it will show a 0 for the first several times my navigation routine loops, which makes the robot think it is constantly going north.

When it does get a reading, it is usually way off, presumably because it is moving way too slow (the routine probably loops twice in the 5-meter GPS error area).

So my question is, what are some viable solutions to this problem?

Would adding a couple seconds of pause to the navigation routine help, so that it does not loop as fast?

Or maybe calculating the heading manually with position deltas (I imagine this would take quite a large distance for it to work, since the GPS is inaccurate).

Any ideas anyone?

thanks smile.gif

Comments

  • phil kennyphil kenny Posts: 233
    edited 2008-02-17 03:17
    One of the 'features' of this type of GPS receiver is that the GPS has to be
    moving and getting new coordinates, before it can give reliable direction
    information.

    One way is to have the code wait until the GPS has moved some minimum
    initial distance before accepting the direction as valid. You'll have to experiment
    to find out what that minimum distance is. Maybe you could move the 'robot'
    manually for a short distance so the GPS has a valid initial direction.

    Adding a delay to the navigation loop might work, if the robot moved enough
    for the GPS to get several locations.

    phil
  • LarryLarry Posts: 212
    edited 2008-02-17 03:29
    Ditto Phil's post. read your GPS manual. Mine said it wouldn't be reliable at less than 3 mph.

    try a magnetic compass. Even if it's quite a bit off, the Position correction will correct for the error over time.
  • skatjskatj Posts: 88
    edited 2008-02-17 05:38
    Thanks phil, I added a 30 sec pause of going forward and it was just what I needed!

    It's a great feeling to finally see it work after a month of debugging debugging debugging =]
Sign In or Register to comment.