本文介绍了iBeacon“远"、“近"和“立即"的标称距离是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 iOS 设备作为广播器和接收器,使用 iOS 7 中的新 iBeacon API.

I've been playing around with using iOS devices as both broadcasters and receivers using the new iBeacon API's in iOS 7.

文档没有详细说明接收设备应该看到每个接近度指示器的距离,并特别将它们称为相对".在试用演示应用程序时,我观察到这些距离(iPhone == 接收器,iPad == 广播器):

The docs don't go into detail at which distances the receiving device should see each proximity indicator, and specifically calls them out as "relative". When experimenting a with a demo app, I observed these distances (iPhone == receiver, iPad == broadcaster):

- 50 英尺?

- 2-3 英尺

立即 - 2 英寸

这些对我来说似乎很小,并且在 CLBeaconRegion 类参考中可能有一个提示,它允许您指定 1m 外设备的信号强度.

These seemed really small to me, and there is perhaps a hint in the CLBeaconRegion class reference, which allows you to specify the signal strength of your device from 1m away.

peripheralDataWithMeasuredPower:

检索可用于将当前设备宣传为信标的数据.

Retrieves data that can be used to advertise the current device as a beacon.

参数

测量功率

接收信号强度指示(RSSI)设备的值(以分贝为单位).这个值代表从一米外测量信标的强度,并在不等.指定 nil 以使用设备的默认值.

The received signal strength indicator (RSSI)value (measured in decibels) for the device. This value represents themeasured strength of the beacon from one meter away and is used duringranging. Specify nil to use the default value for the device.

我的业余校准结果为 -60,我对其进行了设置和重新测试:

My amateur calibration yielded -60, which I set and re-tested:

- 数百(ish)英尺

Far - hundreds(ish) feet

- ~50 英尺

立即 - 1 米(略少)

我第二次测试的结果是理想的"吗?范围根据苹果?他们离默认"真的很远.我在第一次测试中经历的设置.

Are the results from my second test the "ideal" ranges according to Apple? They are really far away from the "default" setting I experienced in the first test.

或者我应该考虑这些范围可校准"吗?取决于我的需要?

Or should I perhaps consider these ranges "calibratable" depending on my needs?

推荐答案

根据我对 API 的理解,实际距离永远没有保证,您不应将读数视为准确的测量值.接近度用于确定不同信标之间的相对距离,以便您可以根据您的应用程序要求做出相应的响应.

From what I understood of the API is that there is never a guarantee on actual distance, you should not use the readings to be considered an accurate measurement. The proximity is rather used to determine the relative distance between different beacons so that you can respond accordingly based on your applications requirements.

话虽如此,Apple 肯定会在他们的文档中划出一个灰色区域.measuredPower 的描述很有趣,很容易让人产生这样的想法,即您可以使用该值来获得准确的距离读数(当然一旦校准).我只是认为情况并非如此,因为这些显着低功率设备中信号衰减的可能性,我不希望您能够获得一致准确的实际距离读数.

With that said, Apple definitely draws a gray area in their documentation. The description of measuredPower is intriguing and easily instils the thought that you can use this value to get an accurate distance reading (once calibrated of course). I just don't think that is the case however, with the likelihood of signal attenuation in these significantly low powered devices, I don't expect you'd get consistently accurate readings of an actual distance.

CLBeacon 参考 accuracy 读取的描述

From the CLBeacon reference the description of accuracy reads

表示以米为单位的 1 sigma 水平精度.用这个区分具有相同接近度的信标的属性价值.请勿使用它来确定信标的精确位置.由于射频干扰,精度值可能会波动.

我觉得这在 iBeacon 功能的整个使用过程中产生了莫名的共鸣.

I feel that this inexplicably resonates throughout the entire usage of the iBeacon feature.

这就是我的全部解释,随着时间的推移,我没有像在多个环境中测试它那样快速查看是否给出了一致的读数.我不确定这是否有帮助.

This is all my interpretation, I've not gone as fas as testing this in multiple environments over time to see if consistent readings are given. I am not sure if this helps at all.

这篇关于iBeacon“远"、“近"和“立即"的标称距离是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 12:57