CLLocation的horizo​​ntalAccuracy和verticalAccuracy是指什么? [英] What do horizontalAccuracy and verticalAccuracy of a CLLocation refer to?

查看:563
本文介绍了CLLocation的horizo​​ntalAccuracy和verticalAccuracy是指什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在研究基于位置的应用,并注意到CLLocation的一些奇怪值。我经常获得1414米的水平精度和-1的垂直精度。有什么迹象表明这是什么意思?据我所知,这些点往往非常准确。 verticalAccuracy和horizo​​ntalAccuracy之间的区别是什么?

I've been working on a location based app recently and am noticing some strange values for CLLocation. I often get a horizontalAccuracy of 1414m and a verticalAccuracy of -1. Any clue what this indicates? As far as I can tell, these points are often very accurate. What is the difference between verticalAccuracy and horizontalAccuracy?

推荐答案

-1A verticalcucracy 表示 CLLocation 中的海拔高度无效。您只能获得具有3D GPS位置的高度。

The -1 for verticalAccuracy indicates that the altitude in the CLLocation is not valid. You only get altitude with a 3D GPS position.

1414 for horizo​​ntalAccuracy 表示水平(纬度/经度)位置最多可达1414米(这个只是一个估计的错误)。这可能是由蜂窝塔三角测量或WiFi位置数据确定的位置。 GPS位置通常报告100米或更好。

The 1414 for horizontalAccuracy indicates that the horizontal (lat/lon) position could be up to 1414m off (this is just an estimated error). This is probably a location determined by cell tower triangulation or WiFi location data. GPS locations usually report 100m or better.

要获得更高精度的位置(300米或更高),您需要设置 desiredAccuracy 并等待GPS接收器锁定至少3颗卫星(或4颗用于3D固定)。在此之前 CLLocationManager 将为您提供最好的WiFi或Cell塔三角测量结果。

To get a higher accuracy location (300m or better) you need to set desiredAccuracy and wait for the GPS receiver to lock onto at least 3 satellites (or 4 for a 3D fix). Until that happens CLLocationManager will give you the best it has which is WiFi or Cell tower triangulation results.

这篇关于CLLocation的horizo​​ntalAccuracy和verticalAccuracy是指什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆