What does horizontalAccuracy exactly mean?
Asked Answered
E

5

17

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.

Enmesh answered 17/5, 2012 at 11:20 Comment(5)
woooo man we all are programmers here this stuff is above my head.I just know that it is the approximate radius that user can be within this circle. That's it.Microparasite
Re your edit - are you talking about the accuracy of the location, or the accuracy of the accuracy? It's not clear what practical problem you are trying to sove here.Meill
Well - en.wikipedia.org/wiki/68-95-99.7_rule has a good explanation. If the accuracy has a confidence level of 3sigma, in my calculation, I can be pretty sure that the actual position is indeed in that circle. If it was only 1sigma, in 1 of 3 cases, the position is actual outside the circle. I then would have to calculate with 3* horizontalAccuracy (corresponding to 3sigma), which makes quite a difference in some cases.Enmesh
FYI I opened a tech support question similar to what you're asking. Apple responded and I put their response into my own stack overflow question; #30674127Unusual
To be clear, "Sigma" is just a symbol for Standard Deviation, or the average distance between the lat/long you receive and the actual lat/long of the phone. iOS and Android presumably calculate this based on a number of factors like proximity to cell towers, recent locations, etcBijou
E
14

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.
Elbring answered 21/10, 2013 at 17:2 Comment(2)
Forget the wifi triangulation, let us stay how GPS horr accuracy is calculated: i doubt it is 3sigma at ios, The 1sigma value for the Gps accuracy is 2.5 - 3m when using EGNOS or WAAS, (US and Europe) otherwise 5m. So a device should show 3-5m for horr accuracy on average when using a 1sigma base. 3 sigma would be 9(WAAS/ EGNOS)-15m (otherwise), So that is to much. ios shows less. So I asume a 1 or maybe a 2-sigma value.Michelinamicheline
sirfIII is 9 years old. And many recreational receivers use Waas/Egnos. Just look at uBlox devices.Michelinamicheline
P
3

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

Porch answered 6/7, 2015 at 21:19 Comment(1)
According to this discussion the HDOP scaled by the UERE * 2 gives two-dimensional 2-sigma, so (Android using 1-sigma) the circle probably corresponds to 68% probability but Android did not scale the sigma because it was a two-dimensional gaussian to begin with. All just guesses, of course…Freckly
Y
2

Which is denoting the Accuracy Level of Location. Example: If horizontalAccuracy is 0 means high accuracy and 500 as horizontalAccuracy means low accuracy. Location Services Provider updates the location based on the consolidated best value of cellular, WiFi (in the case of WiFi connections) and GPS. So, the location value will be oscillating base on coverage. You can filter it by using this horizontalAccuracy.

Yseulta answered 4/1, 2018 at 5:38 Comment(0)
Q
-3

Horizontal accuracy of X indicates that your horizontal position can be X meters off.. Remember location can be found out using GPS, cell tower triangulation or wifi location data. CLLocationManager gives you a most accurate location from these 3 methods.. And say there is a chance it may be off by atmost X meters.

Quiddity answered 17/5, 2012 at 11:54 Comment(1)
You have not understood his question. ".. a chance it may be off": which chance? that is his question. (But Apple cannot know the answer, since the chipo manufacturer does not give this information, and the hor accuracy is calculated by the chkip manufacturer)Michelinamicheline
M
-4

In what way is the documentation sparse?

The radius of uncertainty for the location, measured in meters. (read-only)

The location’s latitude and longitude identify the center of the circle, and this value indicates the radius of that circle. A negative value indicates that the location’s latitude and longitude are invalid.

So your location is within the circle. It isn't outside the circle, or the radius would be bigger. Your assumption about confidence intervals is incorrect.

Meill answered 17/5, 2012 at 11:49 Comment(2)
Sorry, no. GPS measurements always have an associated error, so the only error circle that guarantees the reported value's inside would be about 20,037 kilometers ;) Android uses 1σ, which means there's a 68% probability that the true location is inside the circle, and 32% that it's outside. If Apple uses 3σ, then there's a 99.73% probability that the value's inside the circle and 0.27% it's outside. But it's a much bigger circle. Finally, keep in mind that these are probabilities, not guarantees.Weeper
Thanks, that's really interesting!Meill

© 2022 - 2024 — McMap. All rights reserved.