Understanding ibeacon distancing(了解 ibecon 距离)
问题描述
尝试掌握一个基本概念,了解如何使用 ibacon(信标/低功耗蓝牙/BLE)保持距离.是否有任何关于 ibeacon 可以测量多远的真实文档.假设我在 300 英尺外...... ibeacon 是否有可能检测到这一点?
专门针对 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 是在求解与我们的测量数据点的最佳拟合曲线时计算的三个常数.YMMV
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
这篇关于了解 ibecon 距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:了解 ibecon 距离
基础教程推荐
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01