GPS Drift

Discussion in 'iOS Programming' started by xArtx, Apr 6, 2013.

  1. xArtx macrumors 6502a

    Joined:
    Mar 30, 2012
    #1
    Hi Guys,
    Since I started looking at GPX files made with different GPS units,
    it has become obvious that their quality differs with regard to drift.
    Judging by a log I captured with iPhone 4 in 2012, I think the iPhone
    will show the same problem with distance calculation and clean looking track logs.

    GPS drift (small GPS built into head cam) :
    http://www.youtube.com/watch?v=B2nHh8s985M

    Hiking GPS (Garmin 60csx - I think) :
    http://www.youtube.com/watch?v=EqEAcw2vV0Y

    You can see the first one is shaky, and all those zig-zag lines on the
    track log accumulate extra bogus distance if you're counting it.

    I assume any way that you calculate distance with a track log you have to do
    it yourself,
    even if you use map kit, and native code to calc the distance of the individual
    legs of the trip.
    Is there an easy way to overcome this?
    The only way I can think of is CPU hungry, measuring the distance
    of every track point from it's surrounding track points.
     
  2. Punkjumper macrumors member

    Joined:
    Jan 12, 2013
    #2
    I did a GPS tracking app and simply measure the distance between points. My paths are very smooth when driving or walking. Play with how often it updates and use the accuracy property. You should be able to get a pretty smooth track.
     
  3. xArtx thread starter macrumors 6502a

    Joined:
    Mar 30, 2012
    #3
    It would be ok if you could guarantee good accuracy on any given day,
    but some days, in mountains, in weather, it could be poor the whole trip.
    I haven't seen any of this problem driving, but it's not that kind of GPS.

    Also if I don't capture points at regular intervals, playback of the log will distort time.

    I'm not sure there really is a programmatic solution that can occur in reasonable time.
     
  4. Punkjumper macrumors member

    Joined:
    Jan 12, 2013
    #4
    Maybe the best you could do is just inform the user of the accuracy of the path or points. If you can't get a signal not much you do I suppose.
     
  5. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #5

    You probably want to run some sort of smoothing algorithm on the data you get. A low pass filter would be a good start. That would remove the "jittery" movements in the data.

    You'd want to collect all the data points "as is", and then run the smoothing algorithm on the path.

    The problem is, if the user really does veer off-trail to look at something, or they just act like a puppy off it's leash, you would filter that away. You might want to add a setting to turn filtering on and off.
     
  6. xArtx thread starter macrumors 6502a

    Joined:
    Mar 30, 2012
    #6
    Best I can think of is,
    If the accuracy is good, then let it go as its,
    otherwise push a number of the last location updates through a FILO buffer,
    and discard any updates that drastically change bearing, unless the following
    updates confirm the drastic change in bearing was for real.
     

Share This Page