How to measure distance between two iphone devices using bluetooth?

Floppy Max picture Floppy Max · Sep 2, 2010 · Viewed 72.3k times · Source

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?

Answer

Giuseppe Cardone picture Giuseppe Cardone · Sep 2, 2010

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.