Skip to content

feat(coverage): server-baked live RF coverage map#524

Merged
SimmerV merged 14 commits into
MeshAddicts:developfrom
SimmerV:feature-addition
Jul 10, 2026
Merged

feat(coverage): server-baked live RF coverage map#524
SimmerV merged 14 commits into
MeshAddicts:developfrom
SimmerV:feature-addition

Conversation

@SimmerV

@SimmerV SimmerV commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a server-baked live RF coverage map to MeshInfo. A dedicated coverage-worker
container continuously renders each mesh node's predicted coverage against real terrain
and land-cover, composites the results into map tile pyramids, and MeshInfo serves them
as a live map layer that refreshes as the mesh changes.

What it does

  • Polls /v1/nodes and, for each positioned node, runs an ITM (Longley–Rice) coverage-
    margin render against Tilezen terrain (DEM) plus NLCD land-cover / ETH canopy / JRC
    building
    clutter slices built per node.
  • Composites per-node margins into per-modem-preset PNG tile pyramids
    (output/coverage/{all,LongFast,MediumFast,…}, z5–z11), served at /tiles/coverage/{group}/….
  • Frontend map gains a Live Coverage pill (preset toggle, marker hide, model note), a
    hover node-lookup card, and SSE-driven tile refresh (no reload).
  • Antenna height derived from reported node altitude (AGL); router-role reach extended to
    300 km at a 3072 grid cap.

Additional Info

Bakes are incremental — a per-node margin cache re-renders only changed nodes, and a
streaming q8 compositor with write-through tile flush keeps worker memory ~flat regardless
of mesh size. Full bakes parallelize across N render workers.

Deployment

  • New coverage-worker service (Dockerfile.coverage: emscripten ITM + tsx worker), wired
    into docker-compose.yml.
  • config.toml.sample gains [coverage]; the worker is tuned via COVERAGE_* env
    (recency window, m/px, DEM size, worker count, recompute floor).

Validation

Validated on a 16-core dev box and capacity-tested on the small-VPS profile (3 vCPU / 4 GB):
cold bake of ~1,900 nodes completes with worker RAM ~1 GiB (flat), no OOM across multi-day
runs; incremental deltas sustain map refresh at a realistic recency window.

Areas touched

frontend/coverage-worker/ (render + compositor), live-coverage UI under
frontend/src/pages/map/live/, terrain/clutter fetchers under map/terrain/,
api/api.py tile serving, plus deploy/config/docs. 52 files, +4.9k/−0.25k.

SimmerV and others added 14 commits June 8, 2026 21:20
- env shim wrote window.__env__, not globalThis.__env__ — all clutter
  layers were silently missing from every bake (sources was ["itm"])
- margin sampling was corner-registered vs the renderer's pixel-center
  grid (~100 m offset); shared sampler + tests
- stable tile URLs + no-cache/ETag + hardlinked carry-forward replace
  ?v= busting (clients 304 instead of re-downloading the pyramid)
- antimeridian: unwrapped bake frame, id-anchored bbox, seam-aware lookup
- bake robustness: persistent worker pool, dead-thread respawn, outage
  guard w/ retries, painted-bounds state (v2, one-time full rebake),
  stateKey-prefixed bins, empty-mesh erasure, recency >24h, notify gating
- dedupe: shared webMercator/tileFetchPool/gradient/CoverageMeta; drop
  dead liveCoverageRoles + reachKm; worker tsconfig for typechecking
@SimmerV SimmerV self-assigned this Jul 10, 2026
@SimmerV SimmerV added the enhancement New feature or request label Jul 10, 2026
@SimmerV SimmerV added this to meshinfo Jul 10, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in meshinfo Jul 10, 2026
@SimmerV SimmerV merged commit 336abf9 into MeshAddicts:develop Jul 10, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in meshinfo Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant