title: How to calculate distance between android devices using Bluetooth signal strength?
body: <pre><code>double getDistance(int rssi, int txPower) {
      return Math.pow(10d, ((double) txPower - rssi) / (10 * 2));
  }
  </code></pre>
  
  <p>I tried calculating distance between the Bluetooth devices using the above equation. But it returns wrong results. The results are in the format "3.4565216E9". But the results varies from "3.4565216E9" to  "9.9645352E9" randomly. Can someone suggest a different method</p>