How to measure distance between two iphone devices using bluetooth? [closed]
I'd like to do something in the following using bluetooth.
- Measure and display how far my iPhone is from another iPhone.
- Display direction of my iPhone.
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?
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.