Skip to content

Add GSM signal strength and network coverage maps - #4

Merged
Jbithell merged 3 commits into
mainfrom
claude/gsm-signal-heatmap-5uzz7u
Aug 1, 2026
Merged

Add GSM signal strength and network coverage maps#4
Jbithell merged 3 commits into
mainfrom
claude/gsm-signal-heatmap-5uzz7u

Conversation

@Jbithell

@Jbithell Jbithell commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new Signal map page (/:password/:date/signal) with two H3 hex-bin maps for the selected device/day, using the same "value → colour" technique the Analysis page already uses for speed-coloured route segments.
  • Signal strength heatmap: colours each hex cell by the average gsm.signal.dbm reading in that cell (red = weak, green = strong).
  • Mobile network coverage: colours each hex cell by the dominant gsm.mcc/gsm.mnc network seen there, with friendly carrier names for common UK networks (O2, Vodafone, Three, EE, etc.) via a small lookup table, falling back to the raw MCC-MNC code for anything unmapped.
  • Both maps aggregate straight from the other JSON blob already present on events (populated automatically by the Flespi ingest path) via json_extract, grouped by each event's existing h3Index.
  • Wired into navigation: added to the top tab bar, the date menu tile grid, and protectedLayout's active-tab detection.

Test plan

  • npm run types:check — passes (two pre-existing, unrelated errors in timingPoints.tsx / timingPointsHistoricComparison.tsx remain, confirmed present on the base branch too).
  • npm run build — client and server bundles build cleanly, including the new signal route and h3-js browser bundle.
  • Manually seeded a local D1 device/password/events with gsm.* fields and reviewed the query/aggregation and rendering logic; could not visually verify in a running dev servernpm run dev requires an authenticated Cloudflare remote-proxy session (for the BROWSER binding, marked remote: true in wrangler.jsonc) that isn't available in this sandboxed environment. This is a pre-existing environment constraint unrelated to this change.
  • Recommend a manual smoke test against a real device/day with GSM data once deployed (or via wrangler dev --remote locally) to confirm the hex cells render as expected.

Generated by Claude Code

claude added 2 commits August 1, 2026 08:26
Adds a Signal map page showing two H3 hex-bin maps for the selected
device/day: one coloured by average GSM signal strength (dBm), one by
the dominant mobile network in use, both aggregated from the gsm.*
fields already captured in each event's `other` JSON blob.
With the tab bar and menu grid both growing, Signal map now only
appears in the main menu, and Live tracking map — the primary
action — gets its own larger button above the rest of the menu tiles.
@Jbithell
Jbithell marked this pull request as ready for review August 1, 2026 08:36
Copilot AI review requested due to automatic review settings August 1, 2026 08:36
@Jbithell
Jbithell merged commit 5de8a08 into main Aug 1, 2026
1 check passed
@Jbithell
Jbithell deleted the claude/gsm-signal-heatmap-5uzz7u branch August 1, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Signal map” date route that visualizes GSM metrics as hex-binned Leaflet maps, and wires it into the date UI/navigation alongside existing live/analysis/timings views.

Changes:

  • Adds /:password/:date/signal route that aggregates per-h3Index GSM signal strength (avg dBm) and dominant network (MCC/MNC) from the events.data.other JSON.
  • Introduces reusable SignalMap (client-only Leaflet) plus signal gradient + categorical network color utilities.
  • Adds UK carrier name lookup (MCC/MNC → friendly name) and hooks the new page into routing and menus.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/app/routes/date/signal.tsx New Signal page loader + UI for signal strength + network coverage hex maps
website/app/routes/date/protectedLayout.tsx Adds active-tab detection for /signal
website/app/routes/date/index.tsx Adds “Signal map” tile and adjusts menu layout (primary live tile)
website/app/routes.ts Registers the new signal route
website/app/constants/mccMncCarriers.ts Adds UK MCC/MNC → carrier name mapping utilities
website/app/components/SignalMap/SignalMap.tsx Client-only wrapper for Leaflet signal map
website/app/components/SignalMap/SignalMap.client.tsx Leaflet hex polygon rendering using H3 boundaries
website/app/components/SignalMap/signalColor.ts Gradient color mapping + legend tick builder for dBm values
website/app/components/SignalMap/networkColor.ts Deterministic palette assignment for network categories
website/app/components/mapPerformance.ts Adds signal map performance configuration
website/app/components/DatePageNav.tsx Extends DatePage union to include signal (but tab list needs update)
website/app/components/DateIndexTable.module.css Adds primaryItem styling and refactors some multi-line colors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 8 to 16
export type DatePage =
| "menu"
| "live"
| "logbook"
| "timings"
| "analysis"
| "signal"
| "historic"
| "none";
Comment on lines +205 to +208
<Text c="dimmed" size="sm">
Each cell shows the average GSM signal strength for the day: red
is weak, green is strong.
</Text>
Comment on lines +276 to +279
<Text size="sm">
{getCarrierName(entry.mcc, entry.mnc)} ({entry.total})
</Text>
</Group>
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.

3 participants