Search code examples
ibeaconrssi

How does an ibeacon compute accuracy in terms of advertising interval and samples collected?


I would like to know how an ibeacon computes accuracy if its advertising interval is set to 200ms . Does it collects 5 samples of rssi, apply noise reducing algorithm and give the accuracy distance per second? Does the advertising interval have an impact of achieving good accuracy?


Solution

  • The exact algorithm that iOS uses to compute the CLBeacon accuracy property is closed source, and Apple has not revealed what it is. That said, experimentation has shown a few things:

    1. The measurement approximates a distance in meters between an iPhone and a beacon.

    2. It is based on a 20 second sample of RSSI measurements. You can see this by plotting a graph of accuracy over time and seeing that an immediate change in position of a mobile device or beacon is not fully reflected in accuracy for 20 seconds.

    3. Because of the inherent noise on RSSI measurements, higher advertising rates will give better distance estimates by having more statistical samples to smooth out the noise. iBeacons transmitting at 10Hz will have 200 statistical samples of RSSI over a 20 second period under ideal conditions.

    4. Because the formula for calculating accuracy is not published by iOS, we came up with an independent algorithm that does something similar for the Android Beacon Library. You can see that formula here.

    You can see a summary of my research into this area in this blog post.