Created
June 29, 2020 19:45
-
-
Save martinbowling/b99dfc4ab0897ebc1fb2ef221dced3cb to your computer and use it in GitHub Desktop.
calculate distance with BLE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double getDistance(int rssi, int txPower) { | |
return Math.pow(10d, ((double) txPower - rssi) / (10 * 2)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment