Files
meshcore-analyzer/internal
kpa-clawbot c4e26487f1 fix(#1768): green — LoRa Time-on-Air relay-airtime score + config preset
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
2026-06-22 14:42:53 +00:00
..