Repository navigation
fix(coverage): Site Planner estimate placement, floor, offline terrain, threads and credit - #7758
Conversation
Band rectangles now extend half a cell beyond their outermost sample centers, and iteration and merging include every row and column. A regression test checks that a uniform 2×2 grid merges into one closed rectangle with the expected half-cell bounds. Fixes #7752
`lonAt` and `latAt` divide by `width - 1` and `height - 1`, and the bands now reach every row and column, so a one-wide grid would emit non-finite coordinates.
The style used fixed -130..-80 dBm that the form never changed, so LongFast lost its -139..-130 edge and a -120 dBm receiver was drawn hearing where it cannot. The dead `minDbm`/`maxDbm` params go with it. fixes #7756
The sweep queued every radial on `Dispatchers.Default` with no limit, and the mesh service shares it, so incoming radio data waited behind the estimate. Radials and tile decodes now run on a view of Default one worker short. fixes #7754
The estimate read only its own cache and the network, so a site inside a downloaded region failed offline. Region terrain stores are now read after the cache and before the network, and a region downloaded below the estimate zoom stands in with its coarser parent tile. Stand-ins are dropped from the shared cache when the estimate ends, so a later online run downloads the real tile. fixes #7753
The overlay is built from Mapterhorn terrain, but the credit only showed while hillshade or contours drew. The Google map now credits it whenever a coverage layer is visible, and the Site Planner form carries the credit on every flavor. MapLibre has no map-side credit for it: `GeoJsonOptions` takes no attribution. fixes #7755
Every region holds the planet tile, so an unbounded walk gave any site anywhere a stand-in a pixel wide instead of failing. The tile scope is now canceled before stand-ins are forgotten, so a decode finishing in between cannot leave one in the shared cache.
The corrupt-tile retry now sits inside the same fallback, and decode and the ancestor walk are reshaped for detekt.
Walkthrough
Priority: Severity of issue fixed: Medium Merge Risk:
|
|
@coderabbitai full review |
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: meshtastic/Meshtastic-Android
- Branch: fix/coverage-garth-stack
- File: .coderabbit.yaml
- Commit: c524499
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d179d143-c079-407f-b3e4-5c80d0259888
Files selected for processing: 23-
.skills/compose-ui/strings-index.txtandroidApp/src/fdroid/kotlin/org/meshtastic/app/map/component/SitePlannerSlot.ktandroidApp/src/google/kotlin/org/meshtastic/app/map/MapView.ktcore/resources/src/commonMain/composeResources/values/strings.xmldesktopApp/src/main/kotlin/org/meshtastic/desktop/map/DesktopSitePlannerSlot.ktfeature/coverage/build.gradle.ktsfeature/coverage/src/androidMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.android.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageContours.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageGrid.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornElevation.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornTiles.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/PolarCoverage.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/SitePlannerEstimate.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/TerrainCache.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/CoverageContoursTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/OfflineTerrainTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/PolarCoverageTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/SitePlannerEstimateTest.ktfeature/coverage/src/iosMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.ios.ktfeature/coverage/src/jvmMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.jvm.ktfeature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerParams.ktfeature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerSheet.kt
Files with no reviewable changes: 1-
- feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerParams.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
✅ Action performed
|
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: meshtastic/Meshtastic-Android
- Branch: fix/coverage-garth-stack
- File: .coderabbit.yaml
- Commit: c524499
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e898ac0a-df4c-4ca8-b99a-b622a61a738d
Files selected for processing: 23-
.skills/compose-ui/strings-index.txtandroidApp/src/fdroid/kotlin/org/meshtastic/app/map/component/SitePlannerSlot.ktandroidApp/src/google/kotlin/org/meshtastic/app/map/MapView.ktcore/resources/src/commonMain/composeResources/values/strings.xmldesktopApp/src/main/kotlin/org/meshtastic/desktop/map/DesktopSitePlannerSlot.ktfeature/coverage/build.gradle.ktsfeature/coverage/src/androidMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.android.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageContours.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/CoverageGrid.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornElevation.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornTiles.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/PolarCoverage.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/SitePlannerEstimate.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/TerrainCache.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/CoverageContoursTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/OfflineTerrainTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/PolarCoverageTest.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/SitePlannerEstimateTest.ktfeature/coverage/src/iosMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.ios.ktfeature/coverage/src/jvmMain/kotlin/org/meshtastic/feature/coverage/CoverageCompute.jvm.ktfeature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerParams.ktfeature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerSheet.kt
Files with no reviewable changes: 1-
- feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/SitePlannerParams.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
-
A region keeps every z6-z12 tile it touches, and a z6 tile spans hundreds of km, so a site far outside the region still got stand-in terrain offline. Each region now comes with its bounds, and a tile is read from it only for ground inside them.
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: meshtastic/Meshtastic-Android
- Branch: fix/coverage-garth-stack
- File: .coderabbit.yaml
- Commit: 4d14ad6
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7f45c84e-7798-4c43-814b-bb405fbf9725
Files selected for processing: 8-
androidApp/src/fdroid/kotlin/org/meshtastic/app/map/component/SitePlannerSlot.ktandroidApp/src/google/kotlin/org/meshtastic/app/map/MapView.ktdesktopApp/src/main/kotlin/org/meshtastic/desktop/map/DesktopSitePlannerSlot.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornElevation.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornTiles.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/RegionTerrain.ktfeature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/SitePlannerEstimate.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/OfflineTerrainTest.kt
Files skipped from review as they are similar to previous changes: 6-
- androidApp/src/fdroid/kotlin/org/meshtastic/app/map/component/SitePlannerSlot.kt
- androidApp/src/google/kotlin/org/meshtastic/app/map/MapView.kt
- desktopApp/src/main/kotlin/org/meshtastic/desktop/map/DesktopSitePlannerSlot.kt
- feature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornTiles.kt
- feature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/OfflineTerrainTest.kt
- feature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/MapterhornElevation.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
-
The on-device Site Planner estimate drew its bands half a cell off, cut the outer edge at a fixed -130 dBm, failed offline over downloaded terrain, tied up every
Dispatchers.Defaultworker and never credited Mapterhorn. Supersedes #7757, whose commit is cherry-picked here.🐛 Bug Fixes
minDbm/maxDbmparams are gone ([Bug]: Coverage overlay floor ignores the receiver sensitivity, so the outer edge is wrong #7756).Dispatchers.Defaultone worker short ([Bug]: Coverage estimate occupies every Dispatchers.Default thread for the whole run #7754).GeoJsonOptionstakes no attribution.Testing Performed
CoverageContoursTest: half-cell ring bounds, 1-wide grid rejected.SitePlannerEstimateTest: -139 dBm sensitivity gives a -139..-89 ramp.PolarCoverageTest: radials dispatch on the dispatcher passed in.OfflineTerrainTest: region tile read with no request, network still asked when no region holds the tile, a region's coarse tile refused for ground outside it, parent-tile crop.fixes #7752
fixes #7753
fixes #7754
fixes #7755
fixes #7756
Summary by CodeRabbit