Calibrating iBeacons
Helping the app make the best possible guess on distance
If you are using iBeacon advertisements to trigger actions in your app, you probably want them to trigger at a certain distance.
CoreLocation gives the current distance (as it figures it) - but how does it get that?
The beacon hardware must be calibrated to find the 'measured power at 1m" - according to Apple.
This value is found by holding an iPhone 1m away from the beacon. For 10s, move the phone up and down 10cms for 10s.
The average RSSI value you see in CoreLocation over that time is the value to supply to the iBeacon "measured power" value.
Once the iBeacon advertises the new value, the distance calculated by CoreLocation should be more precise.
For more detail, see the guide from Apple - https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf