Skip to content

coverage: publish the measured detection area, not a beam clip - #28

Merged
jehanazad merged 2 commits into
mainfrom
feat/evidence-only-coverage
Sep 15, 2026
Merged

jehanazad merged 2 commits into
mainfrom
feat/evidence-only-coverage

Conversation

@jehanazad

Copy link
Copy Markdown
Contributor

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 most EVIDENCE_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_summary uses it under fov_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).
  • Real radar3/radar3a bins from the test droplet: 73 vertices, reach 16.8–58.3 km / 16.8–60.8 km, simple polygon, beam args ignored (was 26 vertices).

Consumed by offworldlabs/retina-server (site markers + node_ref + no theoretical cones PR), which bumps the submodule to this commit.

🤖 Generated with Claude Code

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>
@jehanazad
jehanazad merged commit 3baa784 into main Sep 15, 2026
1 check passed
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.

1 participant