Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does horizontalAccuracy exactly mean?

I am working on an iOS application using location services. Having a background in experimental physics, I am wondering what exactly horizontalAccuracy in a location found in locationManager:didUpdateToLocation:fromLocation: stands for. The documentation is a bit sparse...

I assume that the accuracy gives a confidence interval based on a gaussian (or poisson?) distribution. Thus, with a certain probability, the actual position is within a circle with a radius of horizontalAccuracy, but could as well be outside that area. The question is then: how big is that probability? If horizontalAccuracy corresponds to 1σ, I'd have a probability of 68% to be within that circle with horizontalAccuracy, but looking the other way around, in nearly one third of the cases, the actual position will be outside that area. Thus, in certain cases, I'd rather use 2σ (2*horizontalAccuracy) or even 3σ (3*horizontalAccuracy) to calculate with.

To put it short: is there any indication somewhere, which confidence interval horizontalAccuracy has?

Comment to all who respond "Apple says it is within": Well - the measurement can not be exact. It must have a certain level of uncertainty. If you repeat the measurement very often, you will get a distribution of results - probably a gaussian distribution. This gaussian has a certain width, which corresponds to the level of uncertainty of the measurements. Measuring the position more often will reduce the uncertainty and thus increase accuracy, but never will give you a distinct interval where the actual position is guaranteed to be in. You will only get a probability. But if the accuracy is 3sigma, we have 99,7% - which is close to certain. To put it short - I doubt the documentation from Apple.

like image 734
Axel Avatar asked May 17 '12 11:05

Axel


2 Answers

I have been looking for the same information and could not find any answers. The only pointer I have, is that on Android, they are using 1σ:

http://developer.android.com/reference/android/location/Location.html#getAccuracy%28%29

To all the non-believers, this link also explains a little bit how the accuracy thing works.

My guess is, the same is true on iOS, but there is no way to be sure - except for asking the guy who wrote the code ;)

Edit:

After some playing around and checking location updates vs. physical location it seems like it is more likely 3σ on iOS. There are two observations that lead me to believe that is true:

  • On Android locations that come from WiFi triangulation are usually reported as having an accuracy between 20 and 50 meters. On iOS it's between 65 and 165 meters.
  • When measuring the distance between a reported location and the device's physical location, it has been within the reported accuracy every time so far.
like image 180
qingu Avatar answered Nov 15 '22 16:11

qingu


The iOS documentation doesn't specify the probability of containment, but android reports a one-sigma horizontal accuracy, which they define to represent 68% probability that the true location is within the circle.

Their explanation is that location errors follow a normal distribution, and therefore +/- one-sigma represents 68% probability. However, 68% is the probability for a one-dimensional normal distribution. In two dimensions, a one-sigma error represents 39% probability of containment within a circle (the distance error follows a Rayleigh distribution, a.k.a. a chi distribution with two degrees of freedom).

There are two possible explanations.

  1. The circle truly represents 68% probability of containment, in which case android developers have scaled the one-dimensional sigma by a factor of about 1.5 so that the circle happens to represent 68%. In this case, their choice of 68% is completely arbitrary.
  2. The circle actually represents 39% probability of containment. In this case, their description would be correct if you replaced a one-dimensional gaussian with a two-dimensional one and its associated probability.

I think the second explanation is more likely.

iOS: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/index.html#//apple_ref/occ/instp/CLLocation/horizontalAccuracy

Android: http://developer.android.com/reference/android/location/Location.html#getAccuracy%28%29

like image 27
James Thornbrue Avatar answered Nov 15 '22 16:11

James Thornbrue