1

I'm basing calculation of distance to Kontakt beacon by: RSSI (dBm) = -10n log10(d) + A I set n=2, which is in free space. A is supposed to be received RSSI at 1m distance.

Leading to the following calculation method:

private double getDistance(double rssi) {
    // TODO Auto-generated method stub
    return Math.pow(10.0,((rssi-(-54.0))/-25.0));

}

-54 is one of the average values i meassured at 1m. The beacons are set to TxPower 4dB. Anybody have done more testing to figure out the ideal value for distance at 1m for kontakt beacons? Or any improved formula?

Best regards

snovva
  • 11
  • 1
  • 4

1 Answers1

3

When developing the Android Beacon Library, we started with a similar formula, but found we got better results for BLE beacon ranging by doing a best fit power curve. The forumula we came up with is described in detail here: https://stackoverflow.com/a/20434019/1461050

That formula was optimized for the Nexus 4. Since each Android device has a different antenna gain, the constants need to be adjusted for each. You can read more about this process here.

It is also important to understand that RSSI fluctuates quite a bit from one reading to the next due to radio noise, so you get better results if you average together multiple readings. The Android Beacon Library by default takes the most recent 30 seconds worth of readings, throws out the top and bottom 10%, and uses the mean of those that remain. The latest version of the library also implements an ARMA filter which gives better results in some cases.

Community
  • 1
  • 1
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • I have looked at all of this documentation. I don't think you want to throw highs or lows just because they are high or low. You need to look at all the values in the sample to know exactly which points to throw out. I think you should do this every other second, and only keep the samples with high reliability. Then do a moving average of the accepted means/samples over a time period. mov avg is also very affected by static meassurement errors, so combination of low pass and moving average is probably a good idea. Using statistics one can figure out the parameters for standard deviation etc. – snovva May 12 '15 at 20:02