0

I am trying to come up with an approach for a iOS based solution where the application needs to calculate the distance traversed by a user. The use will be walking and capturing distance traversed from a start point to an end point (marked by the user using "Start" and "Stop" buttons). I have considered the GPS based CLLocationManager approach with kCLLocationAccuracyBestForNavigation as the accuracy setting. But the application needs to capture even a distance of 1 meter and I am doubtful whether GPS would be able to provide data with such accuracy.

So, what would be the best approach here? Thanks in advance for any insight.

Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27
  • `CLLocationManager` might not offer the desired accuracy, but it's going to be the most accurate mechanism at your disposal. Note, the `CLLocation` object it returns includes a `horizontalAccuracy` property, which gives you a sense of how accurate the location is. It sometimes takes a few seconds/minutes to gain optimal accuracy after you start location services. – Rob May 20 '13 at 19:21

1 Answers1

0

The best accuracy "reported" by CLLocationManager iPhone 5 is 5m (15 ft). If you have 5m accuracy being reported from CLLocationManager, then you can compute distance between positions reported, but you are not going to get 1m accuracy. You will see position changes by a few meters (or more) even when you are not moving, and a move of 10 meters might appear as a 5m, 8, 10, 12 or even a 15m move. You have to make sure to ignore the initial cached location that is reported and ignore positions with poor accuracy (>5m >10m ?), see my previous answer on this. You can't measure a 1 meter move, GPS in an iPhone (or any smartphone) just isn't that good. You can get about 2-3m actual accuracy with very good conditions: without interference, no multipath, clear sky (no trees, no buildings), good GPS/GLONASS satellite geometry, etc.

Your options are to accept less accuracy or use a different kind of GPS receiver.

Community
  • 1
  • 1
progrmr
  • 75,956
  • 16
  • 112
  • 147
  • See also [this answer](http://stackoverflow.com/a/10198249/1693173) on how to measure distance traveled. – progrmr May 21 '13 at 20:48