This is the 2D companion of the 3D WIDS floor-plan simulator: the same log-distance path-loss and multilateration model, but reworked around a question the 3D scene never answers — how confident should the system be in its own fix? The rogue AP is draggable directly on the canvas; sensors can be re-scattered to see how their geometry (not just noise) drives accuracy.
1. Log-distance path-loss model. Each sensor's RSSI falls off logarithmically with distance:
RSSI(d) = RSSI0 - 10·n·log10(d / d0) (RSSI0 = -40 dBm at d0 = 1 m)
Gaussian fading noise (σ, in dB) is added before each sensor inverts the formula to its own distance estimate. A sensor below -85 dBm reports "no detection".
2. Linear solve, then Gauss-Newton refinement. The linearized circle-difference equations (subtracting one sensor's equation from the rest) give a fast closed-form starting point, exactly like the 3D version. This 2D model goes one step further and polishes that estimate with a few iterations of weighted Gauss-Newton on the true nonlinear range residuals rᵢ = d̂ᵢ − ‖p − sᵢ‖, which measurably lowers RMS error versus the linear solve alone, especially at high σ.
3. Cramer-Rao uncertainty ellipse. Propagating the RSSI noise σ (dB) through the path-loss inversion gives each sensor's implied range-error std σ_d = d·ln(10)/(10n) · σ. Stacking the range-equation Jacobians weighted by 1/σ_d² builds the 2×2 Fisher information matrix; its inverse is the Cramer-Rao lower bound (CRLB) on the estimator's covariance. The dashed ellipse drawn around the estimate is that covariance's 95% confidence region — its shape (not just its size) reveals geometric dilution of precision (GDOP): a rogue AP near the sensor perimeter, or a nearly collinear sensor layout, stretches the ellipse along the poorly-constrained direction even when RSSI noise itself hasn't changed.
- n — how fast signal decays with distance; higher n (denser walls) shrinks effective range and steepens the RSSI→distance sensitivity.
- σ — multipath/fading noise; feeds directly into both the point estimate's scatter and the CRLB ellipse size.
- Randomize sensor layout — same σ and n, different geometry: watch the ellipse's shape and area change even though nothing about the radio channel did. That is GDOP, isolated from measurement noise.
Real WIDS/WIPS appliances report a confidence radius alongside every rogue-AP fix for exactly this reason — a wide-open ellipse means "dispatch someone to confirm," not "here is the wall socket."