Skip to content

fix(weathermap): exclude faint returns and resize-inflated coverage - #733

Draft
wafflestomper08 wants to merge 4 commits into
tronbyt:mainfrom
wafflestomper08:fix/weathermap-intensity-coverage
Draft

wafflestomper08 wants to merge 4 commits into
tronbyt:mainfrom
wafflestomper08:fix/weathermap-intensity-coverage

Conversation

@wafflestomper08

@wafflestomper08 wafflestomper08 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make the optional significant-weather filter discriminate between meaningful radar returns and faint clutter:

  • Measure the displayed geographic crop in native 256px radar tiles, before resizing.
  • Count exact Universal Blue rain/snow palette colors corresponding to >=15 dBZ.
  • Keep peak-over-animation coverage, the existing 1–20% choices, and the no-content [] behavior. Recommend 5–20% and explain the exclusion of very faint returns/very light drizzle.
  • Reuse already downloaded/decoded images; do not alter rendering, timing, or overlays. The location dot and text never enter the measurement.
  • OFF retains the existing rendering path and omits the new Pixlet constructor option.

Dependency / rollout

Depends on tronbyt/pixlet#480.

This is intentionally a DRAFT: the new retain_original and color_pixel_percentage Pixlet API must be merged, released, and included in Tronbyt server before this app change is rolled out. The ON path requires that runtime; merging the app first could break filtering on older servers. This is a server/Pixlet requirement, not display firmware.

Validation

  • Saved 13-frame Portland dry-day sample: old peak 26.2695%; native >=15 dBZ peak 0.01526%, below even the minimum 1% setting.
  • Synthetic rain/snow palette fixture verifies 14 dBZ excluded, 15 dBZ included, and clipping to the geographic crop.
  • Pixlet boundary tests verify 5% and 20% inclusive thresholds, with below/above cases and widespread faint pixels.
  • Full Pixlet test suite, offline regression, and pixlet check --max-render-time 3s apps/weathermap passed.
  • Live Portland render with the new runtime/filter returned no content at the 5% setting.

Palette source: https://www.rainviewer.com/files/rainviewer_api_colors_table.csv

Radar reflectivity is not a guarantee of precipitation reaching the ground. This intentionally excludes very light drizzle, while retaining stronger rain and snow echoes.

@wafflestomper08

Copy link
Copy Markdown
Contributor Author

@tavdog Could you review this change when you have a chance? I added handling for intermittent provider HTTP failures: with significant-weather filtering ON, a failed metadata or radar-tile request now returns no content instead of displaying the error screen. OFF preserves existing behavior. Simulated HTTP 503 tests passed for both failure points with the toggle ON/OFF; lint, app check and a live render also passed. This remains draft for rollout safety: the intensity filtering still depends on tronbyt/pixlet#480 being released and included in the server. Thank you!

@tavdog tavdog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks ok to me.

@wafflestomper08

Copy link
Copy Markdown
Contributor Author

Cheers, @tavdog . The new functionality is reliant on PR #480 being approved, merged, and bundled in an updated server release. I'm in Portland, too. I've got the changes live on my own server and it's much improved for this time of year when there's some light cloud cover in the area but no notable precipitation.

This branch has not been deployed

No deployments
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.

2 participants