Add MSG_ORIENT_QUAT_COV: attitude quaternion with full 3x3 covariance [AP-5542]#1579
Merged
Conversation
Defines a new SBP message in the orientation package carrying a unit quaternion together with the upper triangle of the symmetric 3x3 attitude covariance matrix and a GPS time-of-week. The flags field encodes both the reference frame of the quaternion (NED / ENU / ECEF) and the parameterization of the covariance matrix (small-angle rotation errors about a global frame, small-angle errors about the body/vehicle frame axes, or roll/pitch/yaw Euler-angle covariance), so additional frames or parameterizations can be added later without introducing a new message. The default flag values (NED quaternion, NED-axis small-angle covariance, INS valid) correspond to the same conventions as the existing MSG_ORIENT_QUAT. Bumps the expected message count in python/tests/sbp/test_table.py. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Output of `make gen-all` after adding MSG_ORIENT_QUAT_COV to spec/yaml/swiftnav/sbp/orientation.yaml. Touches the auto-generated C, Python, Rust, Haskell, Java, JavaScript, Protobuf, Kaitai, JSON Schema, and sbpjson bindings; no hand edits. Bumps EXPECTED_MISSING_MESSAGES from 1 to 2 since this commit does not add a test fixture YAML for the new message yet (a hand-written fixture under spec/tests/yaml/swiftnav/sbp/orientation/ can be added in a follow-up to drop the counter back). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hand-crafted spec/tests/yaml/swiftnav/sbp/orientation/test_MsgOrientQuatCov.yaml fixture (generated via generator/json2test.py from a JSON example) and the per-language auto_check_*.cc / .rs / .java / .t / .py files that `make gen-all` produces from it. Drops EXPECTED_MISSING_MESSAGES from 2 back to 1 now that this message has a test case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…P-5542] Removes the boilerplate "This message will only be available in future INS versions of Swift Products and is not produced by Piksi Multi or Duro" sentence from the new message's description and regenerates the bindings whose docstrings carry that text. The sentence is a copy of the wording used by the older MSG_ORIENT_QUAT / MSG_ORIENT_EULER / MSG_ANGULAR_RATE definitions, but no longer reflects current product reality and is unnecessary for a freshly-introduced message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Coverage
|
Contributor
|
It might make sense to name the fields cov_x_x/cov_x_y/cov_x_z/cov_y_y/cov_y_z/cov_z_z in order to make the naming more consistent with the MSG_POS_LLH_COV message. |
Contributor
|
Who's taking the lead for the review here? Not sure what I can contribute. I assume I'm only here as codeowner for auto-generated files. |
Contributor
richarddeurloo
left a comment
There was a problem hiding this comment.
I reviewed the spec change and unit test. The rest is auto-generated.
Address PR #1579 review feedback from @dgburr / @richarddeurloo: rename cov_xx/cov_xy/cov_xz/cov_yy/cov_yz/cov_zz to cov_x_x/cov_x_y/cov_x_z/cov_y_y/cov_y_z/cov_z_z so the naming matches MSG_POS_LLH_COV and other existing *_COV messages. Updates the spec, the hand-written round-trip fixture, and the auto-generated C/Python/Rust/Haskell/Java/JavaScript/Protobuf/ Kaitai/JSON Schema/sbpjson bindings produced by `make gen-all`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
richarddeurloo
approved these changes
May 12, 2026
sbmueller
approved these changes
May 12, 2026
pcrumley
approved these changes
May 12, 2026
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.
Tracking: AP-5542
Summary
Adds a new SBP message
MSG_ORIENT_QUAT_COV(0x0223) in theswiftnav.sbp.orientationpackage that carries the orientation quaternion together with the upper triangle of the
symmetric 3x3 attitude covariance matrix and a GPS time-of-week time-tag.
The flags field encodes both the reference frame of the quaternion
(local-level NED / ENU / ECEF) and the parameterization of the covariance matrix
(small-angle errors about a global frame, small-angle errors about body/vehicle frame
axes, or roll/pitch/yaw Euler-angle covariance), so additional frames or
parameterizations can be added later without introducing yet another message.
The default flag values (NED quaternion, NED-axis small-angle covariance, INS valid)
match the conventions of the existing
MSG_ORIENT_QUAT.Changes
spec/yaml/swiftnav/sbp/orientation.yaml(id0x0223,quaternion + 6 covariance floats + 1 flags byte = 45-byte payload).
Kaitai / JSON Schema / sbpjson via
make gen-allinswiftnav/libsbp-build:2025-10-29.spec/tests/yaml/swiftnav/sbp/orientation/test_MsgOrientQuatCov.yaml(built viagenerator/json2test.pyso the encoded payload, length, and CRC are computed ratherthan guessed), plus the auto-generated
auto_check_*.cc/.rs/.java/.t/.pyfiles derived from it.number_of_messages241 → 242;EXPECTED_MISSING_MESSAGESunchanged(the new message has a test fixture, so the missing-tests counter stays at 1).
Test plan
auto_check_sbp_orientation_MsgOrientQuatCovround-trip tests pass across languages.🤖 Generated with Claude Code