coverage: publish the measured detection area, not a beam clip - #28
Merged
Merged
Conversation
Under FOV_MODE=off the published empirical_coverage.polygon was the accumulated bins clipped to the node's declared beam_azimuth_deg / beam_width_deg. Those two numbers are configuration — most nodes never had their aim surveyed — so the clip zeroed every measured bin outside a wedge nobody verified. radar3 (2026-09-06) carried 200 calibration points in every one of its 72 bins, reaching 17-65 km all round, and published a 26-vertex 120 deg pie slice. to_polygon(evidence_only=True) draws a bin if and only if that bin's own evidence says so: open on its own FOV_OPEN_MIN_POINTS detections, at its own clamped P85, holes of at most EVIDENCE_GAP_MAX_BINS bridged, and a closed bin collapsing to the RX apex rather than being interpolated across (the legacy fill bridges any gap between two filled bins, so two lobes 180 deg apart became a filled disc). Vertices are emitted in bin index order at the bin CENTRE bearing, which is both the bearing a bin's points are actually spread around and — because closed bins contribute the apex — already angular order, so a lobe straddling north needs no sorting to stay simple. NodeAnalyticsManager.get_node_summary uses it under FOV off. The FOV_MODE shadow/active path and the shrink-only prior API that gates association are untouched: this changes only what is PUBLISHED. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keeps main's detection-area gate on the empirical block and this branch's evidence-only polygon kwargs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
EmpiricalCoverageState.to_polygon(evidence_only=True): the published detection area is built from the bins' own evidence only. A bin opens on its own count (≥FOV_OPEN_MIN_POINTS) at its clamped P85; holes of at mostEVIDENCE_GAP_MAX_BINS(2 bins, 10°) inside a lobe are bridged; every other unobserved bearing collapses to the RX apex. Vertices are emitted per bin in index order at the bin centre, so the ring is star-shaped and simple through the north wrap with no sorting.NodeAnalyticsManager.get_node_summaryuses it underfov_mode == "off".Why
Under FOV off the summary clipped the empirical polygon to the node's declared
beam_azimuth_deg/beam_width_deg. Those are configuration, not measurement: on the test deployment radar3 has 200 calibration points in every one of its 72 bins (reach 17–65 km all round) and was published as a 120° pie slice. The legacy interpolation also bridged any gap between filled bins, so two lobes 180° apart became a full disc.The learned-FOV path (
use_learned_wedge), the shrink-only prior API and the association gate are untouched — this changes only what is published.Verified
pytest -q→ 445 passed (11 new tests: ring with no apex, per-bin centre bearings, thin bin stays closed, 2-bin hole bridged / 3-bin hole splits, north-straddling lobe stays simple, beam args ignored, no polygon without an open bin, evidence past the wedge; manager: fov-off no longer clips).Consumed by offworldlabs/retina-server (site markers + node_ref + no theoretical cones PR), which bumps the submodule to this commit.
🤖 Generated with Claude Code