float txPower
Transmitter power at 1 meter (in dBm).
Definition distance.cpp:45
float nFactor
Path-loss exponent (environmental factor).
Definition distance.cpp:56
bool hasAvg
Flag to indicate whether the RSSI average has been initialized.
Definition distance.cpp:33
float rssiAvg
Stores the current smoothed RSSI average.
Definition distance.cpp:38
float estimateDistanceMeters(float rssi, float txPower, float n)
Estimate distance from RSSI using the log-distance path loss model.
Definition distance.cpp:91
void updateRssiAvg(int rssi)
Update the exponential moving average of the RSSI.
Definition distance.cpp:70