Skip to content

Field import: mru_transform (2026-06-27)#31

Merged
rolker merged 1 commit into
jazzyfrom
feature/issue-30
Jun 27, 2026
Merged

Field import: mru_transform (2026-06-27)#31
rolker merged 1 commit into
jazzyfrom
feature/issue-30

Conversation

@rolker

@rolker rolker commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Imports the 2026-06-27 field fix for nav-source arbitration (see #30 for the full pre-review).

Part of rolker/unh_echoboats_project11#339 — the mru_transform half of "SBG as primary nav source"; the bizzyboat config/URDF half is imported separately into that repo.

Commit

  • cc0259b fix(nav): strict priority-preference source arbitration

Strict priority-preference: the highest-priority fresh source owns the fused output; lower-priority sources are used only when every higher-priority one goes stale past sensor_timeout. Replaces "newest fresh sample wins", which let the faster FCU (~10 Hz) out-vote a fresh-but-slower SBG INS (~4 Hz). Extracts a pure selectNavigationSource() (navigation_source_selection.hpp) and rewires NavigationSensors::updateLatest().

Pre-review

Strong — ships 10 unit tests covering the regression, fail-over, recovery, timeout boundary, all-stale, single-source, empty-list. Verify (not blocking): selectNavigationSource() assumes the sensors vector is in descending-priority order matching sensor_names; worth confirming that's how the vectors are populated.

Branched directly from gitcloud/jazzy (field SHA preserved, non-diverged).

Closes #30


Authored-By: Claude Code Agent
Model: Claude Opus 4.8 (1M context)

NavigationSensors::updateLatest iterated sources in priority order but,
when the highest-priority source was fresh yet had no sample newer than
the global high-water mark, it fell through to the next source. A faster
lower-priority source (FCU ~10 Hz) therefore out-voted a fresh but slower
primary (SBG INS ~4 Hz), so position never followed the configured
primary.

Stop at the first fresh source in priority order: it owns the output and
lower-priority sources are used only when higher-priority ones go stale
past sensor_timeout. Extracted the decision into a pure, unit-tested
selectNavigationSource() (new navigation_source_selection.hpp) with 9
gtest cases covering the regression, failover, recovery and boundaries.

Validated live on BizzyBoat: nav/active_sensor/position flips fcu -> sbg
with no base_link jump (~6 mm).

Ref: unh_echoboats_project11#339

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 27, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rolker
rolker marked this pull request as ready for review June 27, 2026 20:07
@rolker
rolker merged commit 6aa77e9 into jazzy Jun 27, 2026
1 check failed
@rolker
rolker deleted the feature/issue-30 branch June 27, 2026 20:07
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.

Field import: mru_transform (2026-06-27)

2 participants