估算iOS上与iBeacon的距离 [英] Estimating distance to iBeacon on iOS

查看:96
本文介绍了估算iOS上与iBeacon的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试估算从iOS设备到iBeacon的距离。我知道距离估计不是非常准确,我也知道这个公式:

I'm trying to estimate the distance from an iOS device to an iBeacon. I am aware that distance estimation is not super accurate, and I am also aware of this formula:

https://electronics.stackexchange.com/questions/83354/calculate-distance-from-rssi

通过一些研究,我发现iBeacon的BLE广告实际上包含代表校准值的数据。也就是说,在1米远处确定的RSSI实际上是由信标广播的,以供所有人查看。

I have found, through some research, that an iBeacon's BLE advertisement in fact contains data that represents the calibration value. That is to say, the RSSI determined at 1 meter away is actually broadcast by the beacon for all to see.

现在,我认为iOS必须在内部使用此信息来确定距离的近,远,立即和未知分类,但我不知道有任何访问方式这个1米RSSI直接。

Now, I think the iOS must internally use this information to determine the Near, Far, Immediate, and Unknown categorizations of distance but I am not aware of any way to access this 1-meter RSSI directly.

我的问题很简单:有没有办法在iOS设备和信标之间获得距离估计而没有1米校准预先保存在iOS设备上的值?

My question is simply: Is there a way to get the distance estimate between an iOS device and a beacon WITHOUT having the 1-meter calibration value saved on the iOS device beforehand?

有人说CLBeacon类的'准确度'字段实际上是对信标的距离测量。文档不支持此声明,这里是它所说的:

Some people say that the 'accuracy' field of the CLBeacon class is, in fact, the distance measurement to the beacon. The documentation does not support this statement, here's what it says:


准确度接近度值的准确度,以米为单位,以$ b $为单位b灯塔。 (只读)

accuracy The accuracy of the proximity value, measured in meters from the beacon. (read-only)



@property (readonly, nonatomic) CLLocationAccuracy accuracy;




讨论表示以米为单位的一西格玛水平精度。使用
此属性来区分具有相同接近度
值的信标。不要用它来识别信标的精确位置。
准确度值可能因RF干扰而波动。

Discussion Indicates the one sigma horizontal accuracy in meters. Use this property to differentiate between beacons with the same proximity value. Do not use it to identify a precise location for the beacon. Accuracy values may fluctuate due to RF interference.

此属性中的负值表示无法确定实际准确度

A negative value in this property signifies that the actual accuracy could not be determined.


推荐答案


有没有办法在iOS之间获得距离估计没有预先在iOS设备上保存1米校准值的设备和信标?

Is there a way to get the distance estimate between an iOS device and a beacon WITHOUT having the 1-meter calibration value saved on the iOS device beforehand?

,您只需按照您的怀疑读取CLBeacon准确度字段。这是对信标距离的估计,以米为单位。

YES, you simply read the CLBeacon accuracy field as you suspected. This is an estimate of the distance to the beacon in meters.

此估算使用基于RSSI测量的未记录计算(可能是30秒的运行平均值,也许是丢弃异常值)与iBeacon广告中嵌入的1米RSSI校准值相结合。此计算到Android的端口显示为此处

This estimate uses an undocumented calculation that is based on the RSSI measurements (likely a 30 second running average, perhaps discarding outliers) combined with the 1-meter RSSI calibration value embedded in the iBeacon advertisement. A port of this calculation to Android is shown here.

而且,不,没有办法从应用程序读取校准值。它被iOS模糊,不允许看到蓝牙LE广告的细节。请参阅此处详细解释。

And, no, there is no way to read the calibration value from an app. It is obscured by iOS, which disallows seeing the details of Bluetooth LE advertisements. See here for a detailed explanation.

这篇关于估算iOS上与iBeacon的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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