System.Bluetooth.TBluetoothLEManager.RssiToDistance
Delphi
function RssiToDistance(ARssi, ATxPower: Integer; ASignalPropagationConst: Single): Double;
C++
double __fastcall RssiToDistance(int ARssi, int ATxPower, float ASignalPropagationConst);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Bluetooth.pas System.Bluetooth.hpp |
System.Bluetooth | TBluetoothLEManager |
Description
Implementation of the algorithm that transforms RSSI to distance.
Accepts as parameters ARssi
(received signal strength indication in dBm), ATxPower
(signal strength at 1m distance in dBm) and a constant ASignalPropagationConst
. Returns an approximation of the distance to a device in meters.
The parameters needed to call this function are stored in the AdvertisedData property of the device.
Distance formula taken from: IEEE Xplore library paper: RSSI-Based Real-Time User Location Tracking System for Indoor and Outdoor Environments (DOI: 10.1109/ICCIT.2007.253 Pages: 1213 - 1218).
The formula for RSSI is RSSI = -(10*n*log10(d) + A)
.