title: Estimating distance to iBeacon on iOS
body: <p>I'm trying to estimate the distance from an iOS device to an iBeacon. I am aware that distance estimation is not super accurate, and I am also aware of this formula:</p>
  
  <p><a href="https://electronics.stackexchange.com/questions/83354/calculate-distance-from-rssi">https://electronics.stackexchange.com/questions/83354/calculate-distance-from-rssi</a></p>
  
  <p>I have found, through some research, that an iBeacon's BLE advertisement in fact contains data that represents the calibration value. That is to say, the RSSI determined at 1 meter away is actually broadcast by the beacon for all to see. </p>
  
  <p>Now, I think the iOS must internally use this information to determine the Near, Far, Immediate, and Unknown categorizations of distance but I am not aware of any way to access this 1-meter RSSI directly.</p>
  
  <p>My question is simply: Is there a way to get the distance estimate between an iOS device and a beacon WITHOUT having the 1-meter calibration value saved on the iOS device beforehand?</p>
  
  <p>Some people say that the 'accuracy' field of the CLBeacon class is, in fact, the distance measurement to the beacon. The documentation does not support this statement, here's what it says:</p>
  
  <blockquote>
    <p>accuracy The accuracy of the proximity value, measured in meters from
    the beacon. (read-only)</p>
  </blockquote>
  
  <pre><code>@property (readonly, nonatomic) CLLocationAccuracy accuracy;
  </code></pre>
  
  <blockquote>
    <p>Discussion Indicates the one sigma horizontal accuracy in meters. Use
    this property to differentiate between beacons with the same proximity
    value. Do not use it to identify a precise location for the beacon.
    Accuracy values may fluctuate due to RF interference.</p>
    
    <p>A negative value in this property signifies that the actual accuracy
    could not be determined.</p>
  </blockquote>