4

I am developing an iOS application in which I need to know the exact distance and direction of the device from the beacon. I am using Estimote beacon.

I have used iOS's CLLocation as well as Estimote's framework but both of them give an incorrect value for the distance. Moreover, the values fluctuate a lot, the beacon even goes into unknown state (accuracy -1.000) a lot of times.

I have also tried to use the formula given here:

Understanding ibeacon distancing

but in iOS, it seems there is no way to get the txPower or measured power of Beacon.

I have searched a lot but nowhere I found a satisfactory way to find the distance accurately.

is there any other way which can help me in finding accurately the distance and direction of iOS device from Beacon?

Community
  • 1
  • 1
Kartikey
  • 143
  • 1
  • 6

2 Answers2

3

The distance is computed by comparing the received signal strength (RSSI) with the advertised transmitted power (txPower) of the beacon, as the signal strength in theory is inversely proportional to the square of the distance.

But there are lots of other things that can affect RSSI, including obstacles, orientation of the antennas, and possibly multi-path (reflections). So it's difficult to accurately measure distance based on this information.

Another way of measuring distance is using round-trip-time (RTT): you send something to the beacon, and you measure how long it takes to come back. But this requires a fixed response time, and on this sort of scale (meters), there are probably enough variable delays here and there that it might severely affect the calculation.

Direction would require either triangulation or multiple directional antennas, I don't believe that's the case in this scenario.

In short, you can get a rough idea of the distance (which is why it's good for proximity alerts), but accurate distance or direction would require different technologies.

Why do you need them? There may be alternatives based on your specific scenario.

EDIT

If you have a large number of beacons around, and you know their exact positions, it might be possible to pull off the following:

  • use at least 3 beacon distances to compute your exact position by triangulation
  • from there, as you know the position of the beacons, you can compute the distance and direction of any of the beacons (or anything else, really)

Of course, depending on the actual accuracy of the beacon distance measurement provided by the SDK, the result might be more or less accurate. The more beacons you have, the more precise you should be able to get (by picking only those that return a distance, or by eliminating those that are not "compatible" with the others when computing solutions).

jcaron
  • 17,302
  • 6
  • 32
  • 46
  • Thanks jcaron, i need the distance for triangulation purpose only. I want to determine the exact location of device using beacons in the proximity. I am able to find the beacons, select best three among all the found beacons but unable to triangulate because the distance is not accurate. Please advice for calculating distance accurately – Kartikey Jul 11 '14 at 08:57
  • @Bazinga, you might want to try selecting more beacons, and see if by rejecting one or more of them you get consistent results. For instance if you have beacons A, B, C, D, E, you might try to find a solution for the triangulation using A, B, C, if that does not work try ABD, then ACD, BCD, ABE, ACE, ADE, and so on. Though it would help if you have us an indication of the results you actually get (compared to the actual value expected of course). – jcaron Jul 11 '14 at 09:51
0

Even having 3 or more beacons with fixed positions, you still won't be able to receive very accurate positioning without some serious and complex noise reduction. That's because radio waves are prone to being affected by diffraction, multipath propagation, interference and absorption - mostly by metal objects and water particles (therefore human bodies are strong signal blockers). Even phone's alignment (antenna position) can have a significant impact on the proximity readings. Therefore, without implementing alorithms for noise reduction, trilateration can give you accuracy of about 5 meters.

You can find some examples in Obj-C (https://github.com/MatVre/MiBeaconTrilaterationDemo) and Swift (https://github.com/a34729t/TriangulatorSwift) and check how they work for you.

Cheers.

Wojtek Borowicz
  • 465
  • 2
  • 8