Skip to content

Service: move a station only when the heard centre is clearly elsewhere - #46

Merged
kevinelliott merged 1 commit into
mainfrom
claude/project-thread-xlxhmp
Nov 21, 2026
Merged

kevinelliott merged 1 commit into
mainfrom
claude/project-thread-xlxhmp

Conversation

@kevinelliott

Copy link
Copy Markdown
Contributor

Requested by Kevin · project thread

Follow-up to #45, from its first 15 minutes in production.

What production showed

#45 placed 45 stations where they are heard (24 AIS, 21 aircraft), and out-of-range discards fell from about 5% of positions to 0.2%. The 24 AIS placements landed where expected (Ma-LICR-AIS at the Strait of Messina, Gladstone-YGLA-AIS at Gladstone, LEAM off Almería) and did not move between two readings. Three things were not right:

  • DundalkWX hears vessels along the whole south coast of Ireland and was put in open water south of Cork, then shifted about 35 km.
  • Aircraft stations are pulled toward the traffic: UN-EGNR-VDLM2 was placed in the Irish Sea about 120 km from the airport in its name, and KAR-LEVC-VDLM moved about 70 km between readings.
  • TV-LFAS was placed and was back at its registered location nine minutes later.

What changes

In CoverageStore.placeByHeard:

  • A station is moved only when the heard centre is at least twice as far from the registered spot as the group is wide (was: once), still at least 100 km.
  • Once moved, it stays moved until the centre is back within one width, so a station near the threshold does not flip.
  • A placed station is re-placed only when the centre shifts by half the group's width (at least 25 km), so a wide group does not make the station wander.

The clear cases keep their placement: for the stations checked by hand the offset was 3 to 35 times the spread (Ma-LICR-AIS 968 km vs 127 km, KG-KAUS2-VDL 1,418 vs 180). DundalkWX (268 vs 136) is no longer placed.

Limits

  • Not run against production traffic yet. How many of the 21 aircraft placements remain is not known until it is.
  • An aircraft station's heard centre is still the middle of its traffic, not the antenna. This only stops the unclear cases from moving.

Testing

  • npm run typecheck and npm test pass (54 tests). New test: a station registered about 270 km from the centre of vessels spread over about 150 km is left alone.

No screenshots: no map code changed.


Generated by Claude Code

In production the first rule placed 45 stations. The AIS ones landed
where expected and stayed put, but a station hearing a long stretch of
coast (DundalkWX) was put in open water, aircraft stations were pulled
toward the traffic, and one near the threshold moved and moved back.

A station is now moved only when the centre is twice as far from the
registered spot as the group is wide; once moved it stays until the
centre is back within one width, and it is re-placed only for a shift
of half the group's width.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PS44Q7WRmAzMJLhi44dzdo
@kevinelliott kevinelliott self-assigned this Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 568709e1-0e0f-48b3-bbaf-60029422f3ae
Commits

Reviewing files that changed from the base of the PR and between 99220ec and 133638a.

Files selected for processing: 3

  • service/CLAUDE.md
  • service/src/aggregation/coverage-store.ts
  • service/test/ingest.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying airframes-coverage with  Cloudflare Pages  Cloudflare Pages

Latest commit: 133638a
Status: ✅  Deploy successful!
Preview URL: https://c1066605.airframes-coverage.pages.dev
Branch Preview URL: https://claude-project-thread-xlxhmp.airframes-coverage.pages.dev

View logs

@kevinelliott
kevinelliott merged commit 5d62272 into main Nov 21, 2026
9 checks 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.

2 participants