简体   繁体   English

horizo​​ntalAccuracy究竟意味着什么?

[英]What does horizontalAccuracy exactly mean?

I am working on an iOS application using location services. 我正在使用位置服务开发iOS应用程序。 Having a background in experimental physics, I am wondering what exactly horizontalAccuracy in a location found in locationManager:didUpdateToLocation:fromLocation: stands for. 拥有实验物理学的背景,我想知道在location找到的locationManager:didUpdateToLocation:fromLocation:到底是什么horizontalAccuracy locationManager:didUpdateToLocation:fromLocation:代表。 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. 因此,在一定概率下,实际位置在具有horizontalAccuracy精度半径的圆内,但也可以在该区域之外。 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. 如果horizontalAccuracy对应1σ,我有68%的概率,使之与圆周内horizontalAccuracy ,但看着周围的其他方式,在近三分之一的情况下,实际位置将是区域之外。 Thus, in certain cases, I'd rather use 2σ ( 2*horizontalAccuracy ) or even 3σ ( 3*horizontalAccuracy ) to calculate with. 因此,在某些情况下,我宁愿使用2σ( 2*horizontalAccuracy )或甚至3σ( 3*horizontalAccuracy )来计算。

To put it short: is there any indication somewhere, which confidence interval horizontalAccuracy has? 简而言之:在某处有任何迹象, horizontalAccuracy有哪些置信区间?

Comment to all who respond "Apple says it is within": Well - the measurement can not be exact. 评论所有回答“Apple说它在其中”的人:嗯 - 测量结果不准确。 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. 但如果准确度是3sigma,我们有99.7% - 这是接近确定的。 To put it short - I doubt the documentation from Apple. 简而言之 - 我怀疑Apple的文档。

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σ: 我唯一的指针是,在Android上,他们使用的是1σ:

http://developer.android.com/reference/android/location/Location.html#getAccuracy%28%29 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 ;) 我的猜测是,在iOS上也是如此,但没有办法确定 - 除了询问编写代码的人;)

Edit: 编辑:

After some playing around and checking location updates vs. physical location it seems like it is more likely 3σ on iOS. 经过一些游戏并检查位置更新与物理位置之后,似乎在iOS上更有可能是3σ。 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. 在来自WiFi三角测量的Android位置通常被报告为具有20到50米之间的准确度。 On iOS it's between 65 and 165 meters. 在iOS上,它介于65到165米之间。
  • 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. 在测量报告位置与设备物理位置之间的距离时,每次到目前为止,它都在报告的准确度范围内。

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. iOS文档没有指定包含的概率,但是android会报告一个sigma水平精度,它们定义为表示真实位置在圆圈内的概率为68%。

Their explanation is that location errors follow a normal distribution, and therefore +/- one-sigma represents 68% probability. 他们的解释是位置误差遵循正态分布,因此+/- one-sigma代表68%的概率。 However, 68% is the probability for a one-dimensional normal distribution. 然而,68%是一维正态分布的概率。 In two dimensions, a one-sigma error represents 39% probability of containment within a circle (the distance error follows a Rayleigh distribution, aka a chi distribution with two degrees of freedom). 在二维中,一西格玛误差表示一个圆内遏制的概率为39%(距离误差遵循瑞利分布,即具有两个自由度的气分布)。

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%. 圆形真正代表68%的遏制概率,在这种情况下,Android开发人员将一维sigma缩放了大约1.5倍,因此圆圈恰好代表68%。 In this case, their choice of 68% is completely arbitrary. 在这种情况下,他们选择68%完全是任意的。
  2. The circle actually represents 39% probability of containment. 圆圈实际上代表了39%的遏制概率。 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 iOS: https//developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/index.html#//apple_ref/occ/instp/CLLocation/horizo​​ntalAccuracy

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

Which is denoting the Accuracy Level of Location. 这表示位置的准确度。 Example: If horizontalAccuracy is 0 means high accuracy and 500 as horizontalAccuracy means low accuracy. 示例:如果horizo​​ntalAccuracy为0表示高精度,500表示horizo​​ntalAccuracy表示精度低。 Location Services Provider updates the location based on the consolidated best value of cellular, WiFi (in the case of WiFi connections) and GPS. 位置服务提供商基于蜂窝,WiFi(在WiFi连接的情况下)和GPS的合并最佳值来更新位置。 So, the location value will be oscillating base on coverage. 因此,位置值将基于覆盖范围振荡。 You can filter it by using this horizontalAccuracy. 您可以使用此horizo​​ntalAccuracy过滤它。

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. X的水平精度表示您的水平位置可以是X米关闭。记住位置可以使用GPS,手机信号塔三角测量或wifi位置数据找到。 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. CLLocationManager通过这3种方法为您提供最准确的位置..并且说它有可能在最远X米处关闭。

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. 您对置信区间的假设不正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM