测量从Android设备iBeacon显示距离 [英] Measure distance to iBeacon from Android device

查看:1143
本文介绍了测量从Android设备iBeacon显示距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作有来衡量一个iBeacon显示距离的应用程序。当用户的距离(1米)范围内,用户应得到通知。

I am working on an app that has to measure the distance to an iBeacon. When a user is within a distance (1 meter) the user should be notified.

这是工作的罚款iOS上,但在Android上我得到不同的结果。我现在用的是Estimote的Andr​​oid SDK( https://github.com/Estimote/Android-SDK )和Android 4.3。

It is working fine on iOS but on Android I get various results. I am using the Estimote Android SDK (https://github.com/Estimote/Android-SDK) and Android 4.3.

下面是从的Nexus 4和The iBeacon显示被放在一米从手机(测量与更多的样本一致)一台Nexus 5.测量:

Below is measurement from a Nexus 4 and a Nexus 5. The iBeacon is placed one meter away from the phone (the measurements are consistent with more samples):

Nexus 4:
08-25 11:39:04.788: : Major: 27485 Accuracy: 0.36351308115918884 Power: -74 Rssi: -67
08-25 11:39:05.880: : Major: 27485 Accuracy: 0.31923897946172497 Power: -74 Rssi: -66
08-25 11:39:06.911: : Major: 27485 Accuracy: 0.31923897946172497 Power: -74 Rssi: -66
08-25 11:39:07.962: : Major: 27485 Accuracy: 0.41856988869951295 Power: -74 Rssi: -68
08-25 11:39:09.003: : Major: 27485 Accuracy: 0.31923897946172497 Power: -74 Rssi: -66

Nexus 5:
08-25 11:35:31.443: : Major: 27485 Accuracy: 0.14058401218665711 Power: -74 Rssi: -61
08-25 11:35:32.483: : Major: 27485 Accuracy: 0.14058401218665711 Power: -74 Rssi: -61
08-25 11:35:33.513: : Major: 27485 Accuracy: 0.17333602268971005 Power: -74 Rssi: -62
08-25 11:35:34.553: : Major: 27485 Accuracy: 0.17333602268971005 Power: -74 Rssi: -62
08-25 11:35:35.593: : Major: 27485 Accuracy: 0.17333602268971005 Power: -74 Rssi: -62

作为其中指出无接近一米。 Nexus的4拥有0.42米最接近的结果。精度由Utils.computeAccuracy采取的Estimote SDK。

As noted none of them is close to one meter. The Nexus 4 has the closest result with 0.42 meters. The Accuracy is taken from Utils.computeAccuracy in the Estimote SDK.

的大问题是,不同的设备提供不同的结果。我想大多数设备(的Nexus 4和Nexus 7,HTC一矿)给出的结果类似的Nexus 4,但Nexus的5指示比其他设备更接近。

The big problem is that different devices gives different results. Most devices I tried (Nexus 4, Nexus 7, HTC One Mine) gives results similar to Nexus 4. However the Nexus 5 indicates to be much closer than other devices.

有没有一种方法,使所有设备给(接近)类似的结果?替代一个知道设备的措施有什么不同(这样的算法可以补偿不同的结果)的方式。

Is there a way to make all devices give (close to) similar results? Alternative a way to know how different devices measure (so an algorithm can compensate for different results)

另外有没有人找到了一种方法,以提高在Android蓝牙LE?

Also has anyone found a way to enhance the sampling rate on Android Bluetooth LE?

我真的想,当用户启动应用程序使用一些校准prevent。

I really would like to prevent using some calibration when the user starts up the app.

我必须使用iBeacons(客户需求),但另一个库可能是一个选项,如果这将有助于解决这一问题。

I have to use iBeacons (customer demand) but another Library could be an option if this would help solving the problem.

推荐答案

开源的 Android的灯塔库(继任者由@tar提到的库包含一个过滤器,保持20秒滚动平均值RSSI测量,丢弃的顶部和样品的底部10%。这给出了一个距离估计那是相当稳定,它在时间上滞后作为用户的权衡相对移动的灯塔。这就是说,它是类似于iOS设备的估计的行为。

The open source Android Beacon Library (the successor to the library mentioned by @tar contains a filter that keeps a 20 second running average of RSSI measurements, discarding the top and bottom 10 percent of samples. This gives a distance estimate that is quite stable, with the tradeoff that it lags in time as the user moves relative to the beacon. That said, it is similar to the behavior of iOS device estimates.

与Android设备的另一个挑战是,每个模型具有不同的增益不同的蓝牙天线。这意味着,平均接收信号电平在两个不同的设备模型的相对完全相同的位置中的信标将是不同的。我可以从我测试的的Nexus 4和Nexus 5的有非常不同的天线增益确认。

The other challenge with Android devices is that each model has a different Bluetooth antenna with a different gain. This means that the average received signal level on two different device models in the exact same position relative to a beacon will be different. I can confirm from my testing that the Nexus 4 and the Nexus 5 have very different antenna gains.

Android的灯塔库中的配方是专为Nexus 5,但它是开源的,所以你可以自定义code为任何你想要的设备型号。为了使新的公式不同的设备,你需要采取不同距离的多个60秒的平均RSSI测量(0.5M,1M,2M,3M,10M,12米... 20米),然后做一个最好的拟合计算

The formula in the Android Beacon Library is designed for the Nexus 5, but it is open source so you can customize the code for any device model you wish. To make a new formula for a different device, you need to take several 60 sec average RSSI measurements at various distances (0.5m, 1m, 2m, 3m,... 10m, 12m ... 20m) then do a best fit calculation.

对于开源库未来的计划是内置了用于最常见的设备型号不同的公式和关键的距离公式采用基于设备检查。这是一个大量的工作,所以如果你能帮助的志愿者,请点击我的写真与我联系!

The future plan for the open source library is to have a different formula built in for the most common device models, and key the distance formula used based on a device check. This is a lot of work, so if you can help volunteer, please tap on my photo to contact me!

这篇关于测量从Android设备iBeacon显示距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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