Conversation
Fitness of the magnetic compass heading for holding position on it: good, disturbed (the heading swung without a matching gyro turn, e.g. near steel or a hull) or uncalibrated, with the measured heading-gyro discrepancy for tuning from dive logs. node_drone assesses it and the supervisor makes station keeping unavailable without bottom lock unless the quality is good; the message is already logged at a low rate, which suits a state that changes on a ten-second scale. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
aviggen
force-pushed
the
av/compass-quality
branch
from
September 21, 2026 12:33
16c0ff0 to
28c4322
Compare
aviggen
marked this pull request as draft
September 22, 2026 08:51
Contributor
Author
|
Converted to draft: the station-keeping runaway PRs (BluEye-Robotics/p2_drone#1105, BluEye-Robotics/p2_drone#1107, BluEye-Robotics/p2_drone#1108) take priority, and the compass quality work (BluEye-Robotics/p2_drone#1110) waits until they are merged. The change is complete and tested (see the description); no review needed for now. |
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.
Summary
Adds a
CompassQualityenum and four fields toMagneticDeclination:compass_quality: fitness of the magnetic compass heading for holding position on it.GOOD,DISTURBED(the heading swung without a matching gyro turn, e.g. near steel or a hull) orUNCALIBRATED(no valid full compass calibration).inclination_error: measured minus modelled magnetic inclination in degrees, after levelling the calibrated field with roll and pitch. The primary check: a steel structure or a hull changes the dip wherever the drone sits.field_strength_ratio: measured over modelled total field strength; 1 when the field is undisturbed.heading_gyro_discrepancy: the compass heading change not explained by the gyro over the last 10 s, in degrees. The secondary check.The three errors are for tuning the thresholds from dive logs.
node_drone assesses the quality against the World Magnetic Model at the drone's location (the lookup libblunux already does for the declination) and publishes it in the declination message, which the dive log already keeps at a low rate; node_supervisor makes station keeping unavailable without bottom lock unless the quality is good (BluEye-Robotics/p2_drone#1110, resolving the guard part of BluEye-Robotics/p2_drone#1098). A disturbed compass is a normal, self-clearing condition, so it is carried as a quality indicator rather than an error flag.
Companion: BluEye-Robotics/p2_msgs
MagneticDeclination.msgmirrors the enum values and fields.🤖 Generated with Claude Code