Skip to content

Bug: SNR weighting in position estimation may be inverted, collapsing estimates to anchor regardless of signal strength #3616

Description

@Yeraze

Summary

The signal-strength-based position estimation algorithm may have inverted SNR weighting, causing nodes with weak signals to be estimated as close rather than far.

Background

In LoRa, SNR scale runs roughly from -20 dB (near noise floor, very weak) to +10 dB (strong). A value of -12 dB is a poor signal. If the estimation code treats a more-negative SNR as higher weight (i.e. closer), the math is backwards.

Suspected Bug

The weight formula 10^(SNR/10) correctly assigns low weight to weak signals (e.g. -12 dB → ~0.06). However, if the code inverts this — using 1 / weight or negating the exponent — a node seen only at -12 dB SNR would be pulled toward the anchor rather than pushed away from it, placing the estimate at the anchor's location regardless of actual distance.

Observed Symptom

A node with -12 dB outgoing SNR (reported in traceroute) is being estimated as inside the reporter's house — the only anchor that observed it. With correct weighting, the uncertainty radius should be large (~5 km for a single low-confidence anchor), signaling the estimate is unreliable. Instead the estimate appears spatially confident and wrong.

What to Check

  • src/ or dist/ — position estimation / trilateration logic
  • Verify the SNR-to-weight mapping: higher (less negative) SNR should yield higher weight, meaning the node is pulled toward that anchor
  • Verify that a single low-SNR anchor produces a large uncertaintyKm, not a small one

Expected Behavior

  • Low SNR → low weight → large uncertainty, estimate treated as unreliable
  • High SNR → high weight → node pulled toward that anchor confidently

Actual Behavior

Estimate collapses to anchor position with apparent confidence despite a single -12 dB observation.

Authored by NodeZero 0️⃣

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions