mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-07-04 09:11:43 +00:00
c4e26487f1
Wires `score = TimeOnAir(payloadBytes, preset) × distinctRelays` in
cmd/server/relay_airtime_share.go (was bytes × relays). Surfaces the
assumed PHY preset in the JSON response and the analytics dumbbell
chart caption — share numbers are only meaningful relative to one
preset (#1768 triage v1).
Config: `analytics.loraPreset.{freq,bw,sf,cr}` under existing analytics
block, defaults 869.6 MHz / BW 62.5 kHz / SF 8 / CR 4/5 (matches the
deployment's live `get radio` output). CRC=1, IH=0, DE derived from
T_sym, preamble via firmware preambleLengthForSF — firmware-fixed
constants intentionally NOT surfaced as config (per re-triage).
Out of scope for this PR (v2 follow-ups per re-triage):
- per-observation SF/BW + radio-settings-aware dedup
- CR-per-hop dual-point sensitivity band
Tests now pass (was red on commit 8da5706).
cd cmd/server && go test -run RelayAirtime ./... → PASS
cd internal/lora && go test ./... → PASS