Skip to content

feat(app): show the measured noise floor in the cells and the HUD - #711

Merged
efiten merged 2 commits into
efiten:masterfrom
khagele:feat/708-noise-values
Oct 2, 2026
Merged

efiten merged 2 commits into
efiten:masterfrom
khagele:feat/708-noise-values

Conversation

@khagele

@khagele khagele commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #708

What

The noise layer (#410) coloured each cell but never said how loud.

  • In the cell. From zoom 16 the hex-label markers carry each noise cell's median in whole dBm (noiseLabelItems), read from the same cells the fill draws, so a label and its colour are always one median. The layer off, the markers go back to who was heard.
  • In the HUD. Noise -104 dBm while the layer is on and the companion answers (noiseReadout). A miss, the firmware's 0 (not measured yet) or a reading older than three rounds (30 s) leaves the line empty: the companion is only asked with a fix, so without one an old value would stand looking live.

The HUD rows, regrouped

Beside the SNR the noise wrapped to two lines at 360 px, so the rows are regrouped (Kasper, 27 September, on the artboard):

  1. The arrow, the RSSI, the sender (17 px) and the backlog pill.
  2. The SNR, the noise floor and the age.

Row 2 holds only numbers of a known widest form (SNR -12.5 dB, Noise -104 dBm, 59m 59s fit 328 px at 360 wide), so the SNR still never shrinks and #637 cannot come back. Both rows keep their heights: the HUD stays 114 px and the FAB rail does not move. The trade: the sender gets about 20 characters at 360 px before the cut, where its own line held about 36. The float readout keeps its layout. Amended in docs/2026-09-15-reading-layer.md and docs/2026-09-25-noise-floor-layer.md.

The layer draws soft spots, not hexes

Amended on the review (Kasper, 28 September). A hex read as one of the signal cells, while a noise floor is a property of the place around the sample. Each cell is now one blurred circle at its centre (circle-blur 0.8, opacity 0.6), 1.3 times the cell's radius so neighbours flow into each other, sized on the ground by the zoom (noiseRadius in noise.js). The cells, the medians and the dBm labels are the same; the labels sit on the spots. docs/2026-09-25-noise-floor-layer.md amended. Checked in Chromium with 80 seeded samples: at zoom 14 the loud stretch reads as one soft band and the quiet stretch (below -119 dBm) stays clear; at zoom 16 each spot carries its median.

Overlap

#710 also touches app.css (the #hud padding) and the changelogs. The second to merge regenerates the changelog.

Verification

  • noise.test.js: the label per cell (rounding, centre, view), the HUD line and its 30 s limit. Each went red with its line mutated.
  • hudlayout.test.js: which ids sit in which row, the fixed heights, and the no-shrink rules now on the SNR and the noise floor.
  • Chromium at 360x740 with a seeded drive: three cells in view labelled -96, -99, -99; the rows as above; the HUD 114.4 px; the layer off brings the hex labels back and empties the noise line. No console errors.
  • app: 1631 tests green, eslint clean, npm run build clean
  • web: 762 tests green, eslint clean
  • Not tested with a companion: the HUD line is empty without one.

🤖 Generated with Claude Code

@khagele

khagele commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Amended (95cdbac): the noise layer draws each cell as a soft spot rather than a hex (Kasper, on the review). A hex read as one of the signal cells, while a noise floor is a property of the place around the sample. One blurred circle per cell at its centre (circle-blur 0.8, opacity 0.6), 1.3 times the cell radius so neighbours flow into each other, sized on the ground by the zoom (noiseRadius in noise.js). Cells, medians and labels are unchanged; the labels sit on the spots. docs/2026-09-25-noise-floor-layer.md amended. Checked in Chromium with 80 seeded samples: at zoom 14 the loud stretch reads as one soft band and the quiet stretch stays clear; at zoom 16 each spot carries its median. App: 1631 tests, eslint, build.

@efiten

efiten commented Sep 30, 2026

Copy link
Copy Markdown
Owner

#734 is merged (4c2a57b), so this one needs the rebase onto master you planned in #734's thread. It passed its review; it goes in once the rebase is green.

The noise layer coloured each cell but never said how loud. From zoom 16 the
hex-label markers carry each noise cell's median in whole dBm, read from the
same cells the fill draws. The HUD shows the latest reading while the layer
is on and the companion answers, and drops it after three rounds without one.

To make room, the HUD's rows are regrouped: the number and the sender in row
1, the SNR, the noise floor and the age in row 2. Row 2 holds only numbers of
a known widest form, so the SNR still never shrinks (efiten#637), and both rows
keep their heights.

Closes efiten#708

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khagele
khagele force-pushed the feat/708-noise-values branch from 95cdbac to 1667e58 Compare October 1, 2026 05:54
@khagele

khagele commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto master (1667e58). Conflicts in huntmap.js with #734: the noise layer keeps #734's drawCells path, and the noise labels fade in with the cell names through labelShare instead of showHexLabels. The spots still take 1.3 times the cell's radius from hexSizeForRes, so they follow #734's cell size. The decision log says "fading in with the cell names (zoom 15.5 to 16.5)" instead of "from zoom 16". App: 1715 tests, eslint, build. Web: 865 tests. Not looked at on a phone after the rebase.

@efiten

efiten commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Fix-check of 1667e58: the rebase onto #734 is right. Spots and labels are built in drawCells on zoomKeys.cells, the labels fade through labelShare (15.5 to 16.5, as the decision log says), and the spot radius is 1.3 times hexSizeForRes at every zoom. App: 1715 tests, eslint, changelog regen with no diff (run). Not looked at in a browser or on a phone.

#740 is now merged (c6fc9a9) and conflicts with this one in app/src/huntmap.js, so this needs one more rebase onto master. It goes in once that is green.

One small thing to fold into the rebase: changelog.d/2026-09-27-02-noise-values.json:6 still says "from zoom 16". Since the rebase the labels fade in from 15.5 to 16.5.

@efiten

efiten commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Second review of 1667e58 (base 77d4e5a), full template: no point to change. Run: noise.test.js and hudlayout.test.js 33/33. Besides the earlier comment (rebase onto #740, changelog "from zoom 16"), two small ones for the same rebase:

  • After the rebase, check that drawCells still passes vis.noise to drawHexLabels. perf(app): hand a map collection to MapLibre only when it changed #740's conflict is in huntmap.js, so that call is the one most likely to go missing.
  • noiseLabelItems also labels cells quieter than -119 dBm, which noiseFill leaves clear (rgba(0,0,0,0)). From zoom 16 a quiet stretch shows numbers like -121 with no spot under them. That fits app: the noise layer shows a colour per cell but never the measured value #708, but the decision log doesn't say it. One line there settles it.
  • centreOf (huntmap.js:966-972) repeats the vertex average of receptionLabelItems (huntmap.js:1010-1014), once with 6 and once with ring.length - 1. One cellCentre(id) keeps them together. Optional.

Resolves the conflict with efiten#740 in app/src/huntmap.js: drawCells writes
the noise source through put(), as efiten#740 does, and keeps passing
vis.noise to drawHexLabels for the noise labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@efiten
efiten merged commit d97cec0 into efiten:master Oct 2, 2026
6 checks passed
@efiten

efiten commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Merged master in (09372ec) to resolve the conflict with #740 in huntmap.js: drawCells now writes noise through put() and still passes vis.noise to drawHexLabels. App 1735 tests, eslint, build and the changelog check passed locally; CI green. Squash-merged. The changelog line "from zoom 16" and the two small points from the review are still open, for a follow-up if you want them.

@github-actions github-actions Bot mentioned this pull request Oct 2, 2026
efiten pushed a commit that referenced this pull request Oct 2, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>app: 1.31.0</summary>

##
[1.31.0](app-v1.30.0...app-v1.31.0)
(2026-10-02)


### Features

* **app:** show the measured noise floor in the cells and the HUD
([#711](#711))
([d97cec0](d97cec0))


### Performance Improvements

* **app:** hand a map collection to MapLibre only when it changed
([#740](#740))
([c6fc9a9](c6fc9a9))
</details>

<details><summary>web: 1.27.0</summary>

##
[1.27.0](web-v1.26.0...web-v1.27.0)
(2026-10-02)


### Features

* **app:** show the measured noise floor in the cells and the HUD
([#711](#711))
([d97cec0](d97cec0))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

app: the noise layer shows a colour per cell but never the measured value

2 participants