简体   繁体   English

如何找到蓝牙设备之间的距离

[英]How to find the distance between bluetooth devices

Description:描述:

I'm trying to find a way to calculate the distance between the application, and nearby Bluetooth devices.我正在尝试找到一种方法来计算应用程序与附近蓝牙设备之间的距离。

That, or only detect devices that are x meters away from the device with the application.那个,或者只检测距离应用程序设备x米远的设备。

Tried so far:到目前为止尝试过:

I tried using the Bluetooth's signal strength, but it is not reliable, as it has so many variables other than the distance (rotation of the device, objects between the 2 devices, etc).我尝试使用蓝牙的信号强度,但它并不可靠,因为除了距离(设备的旋转、两个设备之间的物体等)之外,它还有很多变量。 For example, I kept an eye on a device that was still on a table, and the numbers went up by 10 mBw without neither of the devices moving.例如,我密切关注仍在桌子上的设备,并且在没有任何设备移动的情况下,数字增加了 10 mBw。

I also thought of using GPS for distance calculation, but GPS's accuracy is vary big compared to the accuracy I'm looking for (+-1m).我也想过使用 GPS 进行距离计算,但与我正在寻找的精度(+-1m)相比,GPS 的精度差异很大。

I look for lowering the strength of the Bluetooth signal before searching (on newer Bluetooth versions), to find less devices within a lower range.在搜索(在较新的蓝牙版本上)之前,我会寻找降低蓝牙信号的强度,以在较低范围内找到更少的设备。 But the people who have tried it say it is unreliable because even at the lowest energy for Bluetooth, the Bluetooth was able to find devices that are about 10m away.但是尝试过的人说它不可靠,因为即使在蓝牙的最低能量下,蓝牙也能够找到大约 10m 以外的设备。

Examples around us:我们身边的例子:

If anyone has an Apple Watch and a Mac, they'd know that it is possible to unlock your Mac by simpley being close to your Mac while wearing your Watch.如果有人拥有 Apple Watch 和 Mac,他们就会知道可以通过在佩戴 Watch 时靠近 Mac 来解锁 Mac。

Also, car keys.还有车钥匙。 When you get close enough to the car while carrying the key on you, the car is unlocked.当您随身携带钥匙时离汽车足够近时,汽车就会解锁。

Notes:笔记:

Assume all the devices are Android devices with high their hardware.假设所有设备都是硬件较高的 Android 设备。 It's a special implementation, not for everyone这是一个特殊的实现,并不适合所有人

A good discussion of techniques for calculating distance using Bluetooth devices is here: https://vimeo.com/171186055#t=40m15s .此处对使用蓝牙设备计算距离的技术进行了很好的讨论: https://vimeo.com/171186055#t=40m15s

With respect to the Apple Watch and Mac, Apple is using Time-of-Flight via peer-to-peer WiFi to determine proximity at that level of accuracy.对于 Apple Watch 和 Mac,Apple 正在通过点对点 WiFi 使用飞行时间来确定该精度级别的接近度。

Typical automatic remote keyless entry systems utilize radio pulse, not bluetooth.典型的自动遥控无钥匙进入系统使用无线电脉冲,而不是蓝牙。 More advanced systems, like Tesla's Phone key, uses Bluetooth on the phone device, but relies on the driver to physically touch the door handle to complete the process.更先进的系统,如特斯拉的电话钥匙,在电话设备上使用蓝牙,但依靠驾驶员物理触摸门把手来完成该过程。

This might be possible but not much accurately.这可能是可能的,但不太准确。

You should approach to it like this:- You should measure the signal strength, and then measure the distance using the speed of bluetooth (it usually travels 1cm in 100ps).你应该这样接近它: - 你应该测量信号强度,然后使用蓝牙的速度测量距离(它通常在 100ps 中移动 1cm)。 Timing it would be difficult though.不过,时间安排会很困难。

Then, using the data you can easily measure the distance ( it is usually less that 10 m but can go farther).然后,使用数据您可以轻松测量距离(通常小于 10 m,但可以 go 更远)。

You would get an answer but it would be really an approximate one.你会得到一个答案,但它实际上是一个近似值。 As per me, the exact measuring is not possible.据我所知,精确的测量是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM