Skip to content

docs(site): publish the Estimated Accuracy algorithm page#3619

Merged
Yeraze merged 1 commit into
mainfrom
docs/estimated-accuracy-algorithm
Jun 22, 2026
Merged

docs(site): publish the Estimated Accuracy algorithm page#3619
Yeraze merged 1 commit into
mainfrom
docs/estimated-accuracy-algorithm

Conversation

@Yeraze

@Yeraze Yeraze commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a published deep-dive page — Estimated Accuracy — documenting how MeshMonitor derives the position-estimate accuracy circle (uncertaintyKm) for the node it places without GPS. Written for meshmonitor.org so users can understand and trust the circle.

New page: docs/features/estimated-accuracy.md, linked from the existing Position Estimation page and added to the Maps & Visualization sidebar.

What it covers

  • Observation weightingweight = time_decay × snr_weight, with time_decay = 0.5^(age_h/24) (24 h half-life) and snr_weight = 10^(SNR_dB/10), plus an SNR→weight reference table (e.g. −12 dB → 0.063, 0 dB → 1, +10 dB → 10).
  • Weighted centroid — the estimated position as the weight-weighted mean of anchor positions.
  • Accuracy radius — weighted RMS spread, the Kish effective sample size n_eff = (Σw)²/Σw², and the confidence blend clamp(n_eff−1, 0, 1) between the ~5 km radio-range default and the statistical radius. This documents the Bug: SNR weighting in position estimation may be inverted, collapsing estimates to anchor regardless of signal strength #3616/fix(position-estimation): large uncertainty for weight-dominated single-anchor solves (#3616) #3617 refinement that stops one strong anchor from producing a falsely-confident circle.
  • Diagrams (ASCII — the site has no mermaid plugin, so these render reliably): the data pipeline, centroid geometry, the SNR-weight bar chart, and the confidence-blend table.
  • Three worked examples with real numbers: single anchor (→ 5 km), strong + weak/far dominated (the −12 dB "inside the house" case → 4.94 km, vs 0.31 km before the fix), and a balanced four-anchor solve (→ 0.5 km).
  • A formula reference and guidance on reading the circle + tuning the max-acceptable-accuracy cutoff.

Verification

Docs-only change — no code, no tests affected.

🤖 Generated with Claude Code

Add a deep-dive page documenting how MeshMonitor computes a node's
position-estimate accuracy circle (uncertaintyKm), for publication on
meshmonitor.org:

- the observation weight model: time-decay (24h half-life) × SNR linear
  power (10^(SNR/10)), with an SNR→weight reference table
- the SNR/time weighted centroid (the estimated position)
- the accuracy radius: weighted RMS spread, Kish effective sample size,
  and the n_eff confidence blend toward the radio-range default (the
  #3616/#3617 refinement that prevents falsely-confident single-anchor
  circles)
- ASCII pipeline/geometry/blend diagrams and three worked examples
  (single anchor, strong+weak/far dominated, balanced multi-anchor)
- a formula reference and guidance on reading the circle / tuning the
  max-acceptable-accuracy cutoff

Links it from the existing Position Estimation page and adds it to the
Maps & Visualization sidebar. Docs build verified (no dead links).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Claude finished @Yeraze's task —— View job


PR Review: docs(site): publish the Estimated Accuracy algorithm page

Tasks:

  • Gather context and analyze PR
  • Read new documentation file
  • Verify formulas against source implementation
  • Review sidebar config and links
  • Provide comprehensive feedback

Overall Assessment

Excellent documentation PR. The page is technically accurate, well-structured, and clearly written. I verified all formulas and example numbers against the actual implementation in positionEstimationService.ts. No code changes — docs only.


Formula Accuracy Verification ✅

Time decay: The docs say time_decay = 0.5^(age_h/24). The implementation uses Math.exp(-DECAY_CONSTANT * ageMs) where DECAY_CONSTANT = Math.LN2 / HALF_LIFE_MS. These are mathematically identical — e^(-ln2·t/24h) = 0.5^(t/24h). The simpler form in the docs is more readable for users and correct.

SNR weight: 10^(SNR_dB / 10) — matches Math.pow(10, obs.snrDb / 10) in observationWeight() exactly.

Kish n_eff: (Σw)²/Σw² — matches (wSum * wSum) / w2Sum exactly.

Confidence blend: clamp(n_eff − 1, 0, 1) — matches Math.min(1, Math.max(0, nEff - 1)) exactly.

Final uncertainty: 5·(1−c) + stat·c — matches the implementation exactly.

Worked examples (B): I independently verified the math — centroid ≈ 0.025 km from anchor 1, rms ≈ 0.32 km, confidence ≈ 0.013, uncertainty ≈ 4.94 km. All correct.


Minor Observations

1. Slightly confusing notation in Example A (estimated-accuracy.md, line 213)

wSum = 0.063      w²Sum = 0.063²        n_eff = 0.063² / 0.063² = 1.00

Writing w²Sum = 0.063² rather than w²Sum = 0.003969 shows the symbolic form but is a bit unusual — a reader has to mentally evaluate 0.063² to get the actual value. It's not wrong, just slightly harder to follow than Example B which shows evaluated numbers. Consider:

wSum = 0.063   w²Sum = 0.003969   n_eff = 0.063² / 0.003969 = 1.00

2. The rms_km ≈ 0 claim in Example A (line 215)

centroid = the anchor itself  ⇒  rms_km = 0

With a single observation, the centroid IS the anchor, so distance from centroid to anchor = 0, meaning rms_km = 0. This is mathematically correct. However, note that statistical_km = max(0.05, 0/√1) = 0.05, not 0. The example skips this step and jumps to the final uncertainty = 5 km, which is correct because confidence = 0, but showing statistical_km = 0.05 km would be consistent with Example B's level of detail.

3. Sidebar section name (config.mts)

The sidebar entry is in "Maps & Geography" which is correct and appropriate.


Links & Structure ✅

  • All cross-links (/features/position-estimation, /features/estimated-accuracy, /features/maps, etc.) match existing pages.
  • Both pages now cross-link each other bidirectionally.
  • The sidebar placement after "Position Estimation" is the natural reading order.

Summary

No blocking issues found. The math is accurate, the examples are correct, the cross-links are valid, and the content genuinely helps users understand when to trust an accuracy circle. The two minor observations above are optional polish.

@Yeraze Yeraze merged commit 7fe3bfa into main Jun 22, 2026
19 checks passed
@Yeraze Yeraze deleted the docs/estimated-accuracy-algorithm branch June 22, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant