Skip to content

Add MSG_ORIENT_QUAT_COV: attitude quaternion with full 3x3 covariance [AP-5542]#1579

Merged
reimerix merged 8 commits into
masterfrom
add-orient-quat-cov-AP-5542
May 13, 2026
Merged

Add MSG_ORIENT_QUAT_COV: attitude quaternion with full 3x3 covariance [AP-5542]#1579
reimerix merged 8 commits into
masterfrom
add-orient-quat-cov-AP-5542

Conversation

@reimerix
Copy link
Copy Markdown
Contributor

@reimerix reimerix commented May 5, 2026

Tracking: AP-5542

Summary

Adds a new SBP message MSG_ORIENT_QUAT_COV (0x0223) in the swiftnav.sbp.orientation
package 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: new message in spec/yaml/swiftnav/sbp/orientation.yaml (id 0x0223,
    quaternion + 6 covariance floats + 1 flags byte = 45-byte payload).
  • Bindings: regenerated C / Python / Rust / Haskell / Java / JavaScript / Protobuf /
    Kaitai / JSON Schema / sbpjson via make gen-all in
    swiftnav/libsbp-build:2025-10-29.
  • Round-trip test fixture: hand-crafted
    spec/tests/yaml/swiftnav/sbp/orientation/test_MsgOrientQuatCov.yaml (built via
    generator/json2test.py so the encoded payload, length, and CRC are computed rather
    than guessed), plus the auto-generated auto_check_*.cc / .rs / .java / .t /
    .py files derived from it.
  • Counters: number_of_messages 241 → 242; EXPECTED_MISSING_MESSAGES unchanged
    (the new message has a test fixture, so the missing-tests counter stays at 1).

Test plan

  • CI: all language test suites pass (C, Python, Rust, Haskell, Java, JavaScript, Kaitai).
  • CI: the new auto_check_sbp_orientation_MsgOrientQuatCov round-trip tests pass across languages.
  • CI: spec-validator backwards-compat checks pass (only a new message added; no existing message altered).

🤖 Generated with Claude Code

reimerix and others added 3 commits May 5, 2026 14:12
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>
@reimerix reimerix requested review from a team, notoriaga, pcrumley and sbmueller as code owners May 5, 2026 12:35
…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Code Coverage

Metric Coverage
Source files 36
Lines 97.6% (27267 of 27926 lines)
Branches 95.3% (15078 of 15822 branches)

@dgburr
Copy link
Copy Markdown
Contributor

dgburr commented May 7, 2026

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.

@sbmueller
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

@richarddeurloo richarddeurloo left a comment

Choose a reason for hiding this comment

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

I reviewed the spec change and unit test. The rest is auto-generated.

Comment thread spec/yaml/swiftnav/sbp/orientation.yaml
Comment thread spec/yaml/swiftnav/sbp/orientation.yaml Outdated
reimerix and others added 2 commits May 12, 2026 15:31
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>
@reimerix reimerix requested a review from richarddeurloo May 12, 2026 15:18
@reimerix reimerix merged commit 439dc63 into master May 13, 2026
36 checks passed
@reimerix reimerix deleted the add-orient-quat-cov-AP-5542 branch May 13, 2026 07:13
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.

5 participants