viewof rssi_measured = Inputs.range([-100, -40], {
value: -65,
step: 1,
label: "Measured RSSI (dBm)"
})
viewof tx_power = Inputs.range([-70, -50], {
value: -59,
step: 1,
label: "TxPower at 1m (dBm)"
})
viewof path_loss_n = Inputs.range([1.5, 5.0], {
value: 2.5,
step: 0.1,
label: "Path Loss Exponent (n)"
})
distance_estimated = Math.pow(10, (tx_power - rssi_measured) / (10 * path_loss_n))
html`<div style="background: #f8f9fa; padding: 16px; border-radius: 8px; border-left: 4px solid #08766d; margin-top: 12px;">
<div style="font-size: 18px; font-weight: 600; color: #2C3E50; margin-bottom: 8px;">
Estimated Distance: <span style="color: #08766d;">${distance_estimated.toFixed(2)} meters</span>
</div>
<div style="font-size: 14px; color: #526a74;">
Formula: d = 10^((${tx_power} - (${rssi_measured})) / (10 × ${path_loss_n.toFixed(1)})) = 10^(${((tx_power - rssi_measured) / (10 * path_loss_n)).toFixed(2)})
</div>
</div>`RSSI-Based Distance Estimation
RSSI-Based Distance Estimation
animation
location
positioning
Try Change Path Loss Exponent (n) from 2.5 to 3.0.
Observe Watch Estimated Distance as Path Loss Exponent (n) changes to 3.0.
Explain Explain why changing n from 2.0 to 3.0 changes Estimated Distance.
Technical boundaries. Distance follows a path loss model using measured RSSI, TxPower and a chosen path loss exponent. The exponent differs between free space and indoors.
RSSI-Based Distance Estimation
The relationship between RSSI and distance follows a path loss model:
Solving for distance:
Where: - TxPower = Measured RSSI at 1 meter (typically -59 dBm) - n = Path loss exponent (2.0 in free space, 2.5-4.0 indoors) - d = Distance in meters
Interactive Insight: Notice how the path loss exponent dramatically affects distance estimates. Changing n from 2.0 to 3.0 can change estimated distance by 40-60%. In a concrete hospital (n=3.2), a beacon showing -72 dBm is only 2.5 meters away, but the same reading in an open office (n=2.5) suggests 3.3 meters — a 30% error.