0
votes

I've been playing around with Estimote Beacons for the last few days. I'm starting to doubt the effectiveness for iBeacons becouse of the high latency they have when it comes to determine a Beacons position.

When you move 2-3 meters it takes a few seconds until it gets the position right. A usecase-scenario like, capturing a person walking by a beacon can be quite hard to determine.

Is it possible to manipulate the Update/Refresh Rate of a CLLocationManager or a CLBeaconRegion? e.g. every 0.1 Seconds

1
So you use the beacon capability to have iOS wake your app up, you post a notification to get the user to move you to active, then use Core Bluetooth to get detailed and current data.David H

1 Answers

8
votes

The reason that you are seeing it take so long for the iOS distance measurement (what they call "accuracy" in the CLBeacon object) to stabilize is because it is based on a running average of the RSSI -- the received signal strength. This signal strength measurement is inherently noisy and it bounces all around. That is why collecting multiple samples is necessary to smooth it out.

But because of this averaging, there is a lag. The most recent estimate is based on measurements from several seconds ago.

You cannot change the refresh rate of the CLLocationManager or the CLBeaconRegion, but you may be able to get an iBeacon that transmits more often than the 1s baseline. More transmissions gives you more RSSI measurements to work with, and it may help smooth out the noise. Because I am not sure of the internal implementation of CoreLocation, I am not positive whether a higher iBeacon transmission rate would reduce the noise on the distance measurement.

You can always calculate your own distance measurement, too, based on RSSI and the Power calibration value sent out by an iBeacon. If you use a single RSSI sample, then there will be no lag from averaging with earlier measurements, but you will have a high degree of variability. You basically have to accept a tradeoff between filtering out noise and filtering out old measurements based on different positions.

If you want to try your own calculation, you can use something like below (See my answer to this question for details).

distanceInMeters =  0.89976 * (rssi/txPower)**7.7095 + 0.111

You have to set realistic expectations on how accurate this estimate is going to be. Apple generally recommends that you don't use their "accuracy" measurement inside CLBeacon, unless it is in combination of other rougher measurements like "proximity" that bucketize the distance measurement into "immediate", "near" and "far" groupings.