查找两个蓝牙设备之间的方向(本地化) [英] Finding the direction between two bluetooth devices (localization)

查看:230
本文介绍了查找两个蓝牙设备之间的方向(本地化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,该应用程序扫描另一个电话正在广播的特定UUID,并测量它们之间的信号强度,并告诉您您是离它们越来越近还是更远.我想添加一个方向箭头.我知道如果您有3个点,就可以使用三角剖分,但是我想得到2个点有点准确.

I have an app that scans for a specific UUID that another phone is broadcasting and measures the signal strength between them and tells you whether you're getting closer or further away from them. I want to add an arrow for direction. I know you can use triangulation if you have 3 points but I want to get something somewhat accurate with 2 points.

有什么算法或建议会有所帮助吗?

Any algorithm or suggestion that would help?

我当前的想法(由于该应用程序的用例,一个节点将相对静止)是在您行走时进行一些算法学习.就像您走得更远一样,箭头知道您会忽略该方向,并且会在您沿着不同的方向行走时不断完善自己.

My current idea (since for this app's use case one node will be relatively still) is to have some algorithm learning as you walk. Like if you get further away the arrow knows to disregard this direction and keep refining itself as you walk different directions.

我找到了很多关于该主题的研究论文,但我不是电气工程师,因此很容易迷路.我也阅读了这篇文章,并了解了许多陷阱如何用蓝牙测量两个iPhone设备之间的距离?

I found a bunch of research papers on the topic but I'm not an electrical engineer so it's easy to get lost. Also I read this post and understand the many pitfalls How to measure distance between two iphone devices using bluetooth?

谢谢!

推荐答案

这样的解决方案非常复杂.

Such a solution is extremely convoluted.

获取信号方向所需的数据远远超出普通应用程序所能提供的数据.用户必须在获取所有方向的许多样本的同时缓慢旋转手机.

Getting the direction of the signal requires far more data than normal app usage can provide. The user would have to slowly rotate the phone while taking many samples of all directions.

使用以下公式,可以在12米范围内获得相对距离(如您所说的靠近"或走得更远").超过12米时,越野车非常容易行驶.但这很复杂,需要您使用移动平均解法,并且您认为长度足够.

Getting the relative distance, as you said like "getting closer" or "going farther away" is kinda possible within a 12 meter range using the formula posted below. Above 12 meters it gets very buggy. But it's quite complex and requires you to use a moving average solution with a length that you consider adequate.

您可以使用以下公式计算RSSI与距离之间的关系:

You can calculate the relation between RSSI and distance using the following formula:

RSSI = -(10*n*log10(d) + A)

在这种情况下, n =路径损耗指数,因为您不想要确切的距离,而只是一种检查距离是否更近的方法,因此可以使用2作为值,我发现这在大多数情况下是最现实的一个. A =在1米距离处测得的RSSI值,您需要事先对其进行测量以进行计算,但是由于变化很大,因此请使用-60dB之类的值.而且,在大多数情况下,这大约是平均水平.

In this case, n = path loss exponent, since you don't want an exact distance, just a way to check if it's closer or further, you can use 2 as a value, I found this the most realistic one in most cases. A = the measured RSSI value at 1 meter distance, you need to measure this in advance to do your calculations, but since this varies a lot, just use a value like -60dB. Also this one is about average in most situations.

因此,可以通过以下公式获得以米为单位的粗略猜测距离:

So getting a crudely guessed distance in meters can be achieved by the formula:

distance = 10 ^ ((-RSSI - 60) / (10 * 2));

这不是很准确,但是足以告诉您它是否在有限范围内更近或更远.

This isn't very exact but will be sufficient to tell you if it is closer/farther within a limited range.

这篇关于查找两个蓝牙设备之间的方向(本地化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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