Skip to content

GNSS bring-up diagnostics and mag-primary heading - #71

Merged
georgesleen merged 5 commits into
mainfrom
gnss-bringup-diagnostics
Aug 8, 2026
Merged

GNSS bring-up diagnostics and mag-primary heading#71
georgesleen merged 5 commits into
mainfrom
gnss-bringup-diagnostics

Conversation

@georgesleen

Copy link
Copy Markdown
Collaborator

The dual-antenna GNSS aux (ANT_2) RF input on the mosaic-go-H is confirmed dead (fault follows the port across an antenna swap; clear-sky main tracks 27 sats, aux 0-1), so the unit is being RMA'd. Until a replacement, heading comes solely from the BNO085 magnetometer.

GNSS

  • Send the attitude resolution explicitly (Float) rather than relying on the receiver's default (Fixed); a short baseline may never fix its ambiguities.
  • Bring-up PVT and aux-antenna diagnostics; parse shorter PVTGeodetic revisions; UART TX/RX pin swap (earlier commits on this branch).

Mag-primary heading

  • Fix: output() reported FLT_MAX heading variance until the first GNSS heading fix, so with the aux dead the rudder saw heading as permanently invalid. Report the real variance once heading is anchored by GNSS or a mag offset seed.
  • Surface the BNO Rotation Vector calibration accuracy (0-3) end to end and gate heading validity on it (>= medium), so an uncalibrated mag cannot steer.
  • Auto Save-DCD once the mag converges, so calibration persists across power cycles.
  • Calibrated offset_seed_deg and tightened p0_offset_deg2 so the trusted mag holds heading under the rudder's validity bound.

Tests

217 host tests pass, including new regression coverage: mag-primary steerable heading, the accuracy gate, BNO accuracy parse, Save-DCD layout.

Provisional on hardware: verify heading reads correct and valid at magnetic north and is repeatable across a reboot.

georgesleen and others added 5 commits August 7, 2026 17:48
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…PVTGeodetic revisions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The bring-up relied on the receiver's default resolution (Fixed); a short
baseline may never fix its ambiguities, so emit Float explicitly to keep
heading available.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
With the dual-antenna GNSS aux port dead, the mag is the only heading
reference, but heading was reported valid only after a GNSS fix that can
never arrive: output() returned FLT_MAX variance until _initialized, so the
rudder saw heading as permanently untrustworthy. Report the real variance
once heading is anchored by GNSS or a mag offset seed.

Guard against steering on an unconverged mag: surface the BNO Rotation
Vector calibration accuracy (0-3) through ImuSample and FusionOutput, and
require at least medium accuracy in heading_trustworthy (the rudder gate).
Persist the calibration once it converges (auto Save-DCD) so later boots
start calibrated. Tighten p0_offset_deg2 and set the calibrated
offset_seed_deg so the trusted mag holds heading under the rudder's bound.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@georgesleen
georgesleen merged commit e01ef3b into main Aug 8, 2026
3 checks passed
@georgesleen
georgesleen deleted the gnss-bringup-diagnostics branch August 8, 2026 08:51
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