How to estimate distance between two android devices? (bluetooth preferred)

后端 未结 4 604
既然无缘
既然无缘 2021-02-01 19:14

Target is not to have the real distance. It is something simpler.
Target is to check whether another device is very very close. True or false. Let\'s say 1

相关标签:
4条回答
  • 2021-02-01 19:34

    I've looked into bluetooth positioning and it istn' quite as easy as detecting the signal strength. For really accurate results you also need to take into account the types of phone your using, the battery type and the condition of the battery. You also have to take into account the environment and how it might efffect the signal strength, and also obstacles that may interfere with the signal, such as people, walls, tables, etc.

    To determine the distance you would also need to use triangulation techniques to determine the position of a mobile. You can also set up a number transmitters in your environment and measure against each one. Knowing the positions of these transmitters you can then work out the position of the phone.

    However, the signal strengths will vary and you will have to do a lot of calibration. There a number of scientific papers that give some insight into the algorythms required. There are also a couple of companies that provide this as a service, used in malls, museums etc.

    That said, if you can get the signal strength then you should be able to work out a basic near or far result, it just won't be fully accurate, and in this case i still think having a number of transmitters would still help a lot.

    Paper, some of the pitfalls PDF(download), another paper

    THere are loads of papers i've read from googling bluetooth positioning that will give you some pointers.

    0 讨论(0)
  • 2021-02-01 19:40

    The only feasible way to do it that I can think of is with NFC. To use Bluetooth or Wi-Fi you'd have to do it via signal strength, but every transmitter is different so that wouldn't be reliable at all.

    Latency is rather useless since the radio waves travel at the speed of light and the time difference between traveling an inch and a mile is essentially zero. To measure that difference you'd need a much higher resolution than you have in a phone.

    0 讨论(0)
  • You are not specifying the objective for this distance detection, but if you could add some additional requirements to that (i.e phone orientation and flash light), a totally different approach could probably be used.

    If both devices are oriented in a way that both cameras face each other, the flash light could be used to validate the correct phone and distance. The size of the white spot generated in the camera image decreases rapidly with distance, and a specific flash sequency could differentiate between the other phone flash light and other light sources.

    This could require some tweaking to work outdoors, as for the same distance the spot size will be much smaller ...

    Regards.

    0 讨论(0)
  • 2021-02-01 19:47

    You can measure distance with sound.

    0 讨论(0)
提交回复
热议问题