了解信标距离 [英] Understanding ibeacon distancing

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

问题描述

试图掌握与 ibeacon(信标/蓝牙低功耗/BLE)保持距离如何工作的基本概念.是否有任何关于 ibeacon 可以测量多远的真实文档.假设我在 300 英尺外……信标有可能检测到这一点吗?

特别适用于 v4 &.v5 和 iOS,但通常适用于任何 BLE 设备.

蓝牙频率如何&吞吐量影响这个?信标设备可以增强或限制距离/改善底层 BLE 吗?

<代码> |范围 |频率 |吨/秒 |地形||–—––––––––––|––––––––––––|–––––––––––|–––––––––----|蓝牙 v2.1 |高达 100 m |<2.481GHz |<2.1mbit |散网||-------------|------------|------------|------------|蓝牙 v4 |?|<2.481GHz |<305kbit |网||-------------|------------|------------|------------|蓝牙 v5 |?|<2.481GHz |<1306kbit |网|

解决方案

iOS 提供的距离估计基于信标信号强度 (rssi) 与校准发射器功率 (txPower) 的比率.txPower 是 1 米外以 RSSI 为单位的已知测量信号强度.每个信标都必须使用此 txPower 值进行校准,以实现准确的距离估计.

虽然距离估计很有用,但它们并不完美,需要您控制其他变量.请务必阅读复杂性和局限性 在滥用之前.

当我们构建 Android iBeacon 库时,我们不得不想出我们自己的独立算法,因为 iOS CoreLocation 源代码不可用.我们在已知距离处测量了一堆 RSSI 测量值,然后绘制了一条最佳拟合曲线以匹配我们的数据点.我们提出的算法如下所示为 Java 代码.

请注意,此处的准确度"一词是 iOS 中以米为单位的距离.这个公式并不完美,但大致上近似于 iOS 的做法.

protected static double calculateAccuracy(int txPower, double rssi) {如果(rssi == 0){返回-1.0;//如果我们无法确定准确度,则返回 -1.}双倍比率 = rssi*1.0/txPower;如果(比率<1.0){返回 Math.pow(ratio,10);}别的 {双精度 = (0.89976)*Math.pow(ratio,7.7095) + 0.111;返回精度;}}

<块引用>

注意:值 0.89976、7.7095 和 0.111 是在求解与我们测量数据点的最佳拟合曲线时计算的三个常数.赞一个

Trying to grasp a basic concept of how distancing with ibeacon (beacon/ Bluetooth-lowenergy/BLE) can work. Is there any true documentation on how far exactly an ibeacon can measure. Lets say I am 300 feet away...is it possible for an ibeacon to detect this?

Specifically for v4 &. v5 and with iOS but generally any BLE device.

How does Bluetooth frequency & throughput affect this? Can beacon devices enhance or restrict the distance / improve upon underlying BLE?

ie

               | Range       | Freq       | T/sec      | Topo       |      
               |–—–––––––––––|–—––––––––––|–—––––––––––|–—––––––––––|
Bluetooth v2.1 | Up to 100 m | < 2.481ghz | < 2.1mbit  | scatternet |
               |-------------|------------|------------|------------|
Bluetooth v4   |     ?       | < 2.481ghz | < 305kbit  | mesh       |
               |-------------|------------|------------|------------|
Bluetooth v5   |     ?       | < 2.481ghz | < 1306kbit | mesh       |

解决方案

The distance estimate provided by iOS is based on the ratio of the beacon signal strength (rssi) over the calibrated transmitter power (txPower). The txPower is the known measured signal strength in rssi at 1 meter away. Each beacon must be calibrated with this txPower value to allow accurate distance estimates.

While the distance estimates are useful, they are not perfect, and require that you control for other variables. Be sure you read up on the complexities and limitations before misusing this.

When we were building the Android iBeacon library, we had to come up with our own independent algorithm because the iOS CoreLocation source code is not available. We measured a bunch of rssi measurements at known distances, then did a best fit curve to match our data points. The algorithm we came up with is shown below as Java code.

Note that the term "accuracy" here is iOS speak for distance in meters. This formula isn't perfect, but it roughly approximates what iOS does.

protected static double calculateAccuracy(int txPower, double rssi) {
  if (rssi == 0) {
    return -1.0; // if we cannot determine accuracy, return -1.
  }

  double ratio = rssi*1.0/txPower;
  if (ratio < 1.0) {
    return Math.pow(ratio,10);
  }
  else {
    double accuracy =  (0.89976)*Math.pow(ratio,7.7095) + 0.111;    
    return accuracy;
  }
}   

Note: The values 0.89976, 7.7095 and 0.111 are the three constants calculated when solving for a best fit curve to our measured data points. YMMV

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

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