title: Wifi RSSI signal to distance calculation method with javascript
body: <p>Is there a method  to convert a RSSI signal to an exact distance? We tryed several formulas but all with a different result.</p>
  
  <p>The formula where i'm talking about:</p>
  
  <p><code>
  public double calculateDistance(double signalLevelInDb, double freqInMHz) {
      double exp = (27.55 - (20 * Math.log10(freqInMHz)) + Math.abs(signalLevelInDb)) / 20.0;
      return Math.pow(10.0, exp);
  }
  </code></p>