Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to measure distance between two iphone devices using bluetooth? [closed]

I'd like to do something in the following using bluetooth.

  1. Measure and display how far my iPhone is from another iPhone.
  2. Display direction of my iPhone.

For example,

I'd like to display something in the following on my iPhone application.

My iPhone is connected to another iPhone:Harry's iPhone.

In this case,

  • Distance : 3m 45.3cm (Accuracy:milimeter)
  • Direction : North East(one of 8 available directions)

Does anyone know how to do this?

like image 713
Floppy Max Avatar asked Sep 02 '10 08:09

Floppy Max


People also ask

Can you measure distance with Bluetooth?

Using bluetooth you can at best obtain a distance resolution of few meters, but you can't calculate the direction, not even roughly.

How can I measure the distance between two phones?

WifiNanScan relies on Wi-Fi Aware's core structure and you can use this app to find out how far the other device is from your device. Google describes this app as: The WifiNanScan app measures the distance between two smartphones using the Wi-Fi Aware protocol (also called Neighborhood Aware Networking(NAN)).

What is RSSI Bluetooth?

RSSI (Received Signal Strength Indicator) For Bluetooth, it is the strength of the beacon's signal as seen on the receiving device, e.g. a smartphone. The signal strength depends on distance and Broadcasting Power value.

How do you measure Bluetooth signal strength?

Bluetooth signal strength is measured by the Received Signal Strength Indicator (RSSI). You can access the device's RSSI by accessing the Bluetooth device settings and then reading the RSSI. An ideal RSSI is between -40 and -55.


3 Answers

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.

like image 91
Giuseppe Cardone Avatar answered Sep 28 '22 02:09

Giuseppe Cardone


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

like image 29
Christopher Edwards Avatar answered Sep 28 '22 03:09

Christopher Edwards


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.

like image 30
CW0007007 Avatar answered Sep 28 '22 02:09

CW0007007