如何使用蓝牙测量两个iPhone设备之间的距离?

发布于 2024-09-17 08:32:33 字数 1435 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

往日情怀 2024-09-24 08:32:33

使用蓝牙进行本地化是一个众所周知的研究领域(ref.)。简短的回答是:你不能。信号强度并不能很好地指示两个连接的蓝牙设备之间的距离,因为它太容易受到环境条件的影响(设备之间是否有人?所有者如何握住他/她的设备?是否有墙?有射频反射面吗?)。使用蓝牙,您最多只能获得几米的距离分辨率,但您无法计算方向,甚至不能粗略地计算。

通过使用多个蓝牙设备并对各种信号强度进行三角测量,您可能会获得更好的结果,但即使在这种情况下,您的估计也很难比几米更准确。

Using bluetooth for localization is a very well known research field (ref.). The short answer is: you can't. Signal strength isn't a good indicator of distance between two connected bluetooth devices, because it is too much subject to environment condition (is there a person between the devices? How is the owner holding his/her device? Is there a wall? Are there any RF reflecting surfaces?). Using bluetooth you can at best obtain a distance resolution of few meters, but you can't calculate the direction, not even roughly.

You may obtain better results by using multiple bluetooth devices and triangulating the various signal strength, but even in this case it's hard to be more accurate than few meters in your estimates.

谁把谁当真 2024-09-24 08:32:33

您可以使用声音和声音速度知识来计算 iPhone 之间的距离。

You could use sound and knowledge of speed sound to calculate the distance between the iphones.

半世蒼涼 2024-09-24 08:32:33

苹果在 iOS7 中引入了 iBeacons。这将为您提供一部手机与另一部手机之间的距离。设置很简单,请查看 WWDC 示例 AirLocate。

In iOS7 Apple introduced iBeacons. This will give you the distance between 1 phone and another. It is simple to setup, check out the WWDC sample AirLocate.

自找没趣 2024-09-24 08:32:33

你不能用蓝牙来做到这一点。您可以通过分析 BT 接收质量来测量两个 BT 设备之间的距离 - 但这在每个新环境中(例如,只是一个新房间或在露天)都会有很大差异。
对于方向:这是完全相同的问题,尤其是在建筑物内。大量的 BT 信号回波将导致几乎无法接收有用的方向数据。
有多种方法可以通过无线连接(无论是 BT、WLAN、ZigBee 还是其他方式)来确定距离和方向 - 不是使用标准的客户设备,而是使用真正的高科技实验室设备。

You can't do this with bluetooth. You could meassure the distance between two BT devices by analysing the BT reception quality - but this will strongly differ in every new environment (e.g. simply a new room or in the open air).
For direction: here is exactly the same problem, especially inside buildings. A lot of BT signal echos will make it almost impossible to receive useful direction data.
There are ways to determine distance and directions via wireless connections (doesn't matter if BT, WLAN or ZigBee or something else) - not with standard customer devices, but with real-hitech laboratory equipment.

做个少女永远怀春 2024-09-24 08:32:33

对于方向,您必须将手机远离您并旋转一圈,以便手机测量信号强度的增加/减少。不确定 iPhone 的信号接收效果如何。

您可以通过查看信号接收强度来估计距离。您将必须在不同的环境中执行许多测试,以获得一些在您的应用程序中使用的半不错的指标。

For direction, you would have to hold the phone away from you and spin in a circle allowing the phone to measure the increase/decrease in signal strength. Not sure how good the iPhone signal reception will be.

You could estimate the distance by looking at the signal receive strength. You will have to perform many tests, in different environments in order to get some half decent metrics to use within your app.

罪歌 2024-09-24 08:32:33

您无法仅对一台蓝牙设备执行此操作,但可以使用 2 个蓝牙设备。假设 2 个远程设备位于静态位置(扬声器),并且您移动移动(双关语)蓝牙设备。您应该能够根据两个设备的距离变化速度得出您的角度。唯一的问题是该解决方案有 2 个值,但如果您知道自己位于飞机的哪一侧,那么这可能是可行的。

You can't do it against only one Bluetooth device, but you might with 2. Assuming the 2 remote devices are in static location (speakers), and you move your mobile (pun intended) Bluetooth device. You should be able to derive your angle based on speed of distance change from the 2 devices. Only problem is that the solution has 2 values, but that might be doable if you know which side of the plane you're on.

罗罗贝儿 2024-09-24 08:32:33

正如朱塞佩·卡多内(Giuseppe Cardone)所提到的,使用信号强度是行不通的。但是,我建议请求其他设备的位置信息(假设您在其他设备上安装了一个响应位置请求的应用程序。)。从其他设备获取位置信息后,您可以将其与您设备的位置进行比较并计算距离和方向。

As what Giuseppe Cardone has mentioned, using the signal strength wont work. However, I would suggest requesting the location information of the other device (let's say that, you install an app on the other device that replies to location requests.). Once you get the location information from the other device you may compare it with your device's location and calculate the distance and the direction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文