Repository navigation
Sonarman goes for the loudest trace; version 0.5.0 - #6
Merged
Merged
Conversation
…; version 0.5.0 The crew's sonarman slewed the dial to bearings[argmax(heard)]. heard is cone-weighted, so with no contact in the cone it was all zeros and argmax picked whichever ship was listed first: a faint one at 9 km won over a loud one at 1.5 km. He now takes the loudest level, which is what the waterfall shows him. (The CodeRabbit thread on PR #5 asked to skip the slew instead; that would leave the dial parked and never searching.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0128GVA6bk4EdYWNsPSedKEA
Merged
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.
This follows up the sonar review thread from PR #5 and bumps the version for the 0.5.0 release.
Sonar
With the captain away from sonar, the crew's sonarman trains the dial toward
bearings[argmax(heard)].heardis weighted by the dial's 25° cone, so when no contact is in the cone it is all zeros.argmaxthen picks whichever ship is listed first.I reproduced it: with a faint ship at 9 km listed first and a loud one at 1.5 km second, the dial went to the faint one at 300° (level 31) and ignored the loud one at 60° (level 158).
He now takes the loudest level when nothing is in his cone, which is what the waterfall shows him. CodeRabbit's suggestion on PR #5 was to skip the slew instead, but that would leave the dial parked and never searching. A new
test_crewcase fails on the old code (dial at 301°) and passes with the fix.Version
0.4.0 → 0.5.0 in
version.py,pyproject.toml,uv.lockand the README badge and footer.All suites pass locally (
checks.py), and the golden run is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_0128GVA6bk4EdYWNsPSedKEA
Generated by Claude Code