How does Bluetooth device calculate distance based on RSSI value？
Normally, in our Bluetooth beacon or Bluetooth gateway positioning project, the distance is calculated by RSSI, then how do we calculate it? The following is the specific formula:
d means calculated distance
RSSI means received signal strength (negative value)
A means The signal strength when the transmitting end and the receiving end are separated by 1 meter.
n means Environmental attenuation factor.
The calculation formula Python code is implemented as def rssiRange(rssi):
A = -38.0
n = 27.0
iRssi = abs(rssi)
power = float(( iRssi – A) / (10 * n ))
result = pow(10, power)
In practical applications, because of different deployment environments, such as signal interference and other factors. For example, if two devices are deployed together, if the same n is used to calculate the distance, there will be a certain deviation. Therefore, when deploying equipment, you need to manually correct the setting of n according to the deployment situation of the equipment. Generally, it can be set by calculating the average value.