Skip to content

Update gen-2 default alignment matrices to match revised firmware seed - #74

Merged
JongChern merged 5 commits into
mainfrom
update-default-alignment-matrices
Jul 29, 2026
Merged

Update gen-2 default alignment matrices to match revised firmware seed#74
JongChern merged 5 commits into
mainfrom
update-default-alignment-matrices

Conversation

@marknolan

Copy link
Copy Markdown
Member

Summary

Updates the gen-2 (LSM6DSV/LIS2MDL) default sensor→ASM alignment matrices in calibrationDefaults.ts to match the revised firmware calibration seed (as read back from a device: calibration version 0xD7C8, 14 blocks):

Sensor Old New
LSM6DSV accel [0,−1,0 / 0,0,1 / −1,0,0] [0,1,0 / 0,0,1 / 1,0,0]
LSM6DSV gyro [0,−1,0 / 0,0,1 / −1,0,0] [0,1,0 / 0,0,1 / 1,0,0]
LIS2MDL mag [0,1,0 / 0,0,1 / −1,0,0] [1,0,0 / 0,0,1 / 0,1,0]
LIS2DW12 unchanged unchanged

The existing invariants still hold: accel/gyro are proper rotations (det +1), the LIS2MDL frame remains left-handed (det −1), and every sensor's chip +Z maps to common +Y.

Testing

  • npm test — 241/241 pass (pinned default-set expectation updated).
  • Re-vendored bundle verified in the console via the browser: getVerisenseCalibrationSensors() returns the new matrices.

🤖 Generated with Claude Code

LSM6DSV accel/gyro: [0,-1,0, 0,0,1, -1,0,0] -> [0,1,0, 0,0,1, 1,0,0]
LIS2MDL mag:        [0,1,0, 0,0,1, -1,0,0] -> [1,0,0, 0,0,1, 0,1,0]
LIS2DW12 unchanged. Determinant/third-column invariants still hold
(accel/gyro proper rotations, mag left-handed, chip +Z -> common +Y).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the gen-2 (Verisense) default sensor→ASM alignment matrices so host-side defaults match the revised firmware calibration seed, and adjusts the corresponding pinned expectation in the default-seed round-trip test.

Changes:

  • Updated gen-2 default alignment matrices for LSM6DSV accel/gyro and LIS2MDL mag in calibrationDefaults.ts.
  • Updated the default-seed test assertion for the LSM6DSV accel alignment in calibrationDefaults.test.ts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/verisense/calibrationDefaults.test.ts Updates the pinned expected alignment for the gen-2 default seed serialization round-trip.
src/devices/verisense/calibrationDefaults.ts Updates the gen-2 default alignment matrices returned/seeded for LSM6DSV accel/gyro and LIS2MDL mag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/verisense/calibrationDefaults.test.ts
marknolan and others added 2 commits July 29, 2026 00:26
Addresses Copilot review: the seed round-trip test only pinned the
LSM6DSV accel alignment, so drift in the gyro / LIS2DW12 / LIS2MDL
defaults would not have been caught.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@JongChern JongChern 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.

looks good

Copilot AI requested a review from JongChern July 29, 2026 07:06
@JongChern
JongChern merged commit 5839fc9 into main Jul 29, 2026
2 checks passed
@marknolan
marknolan deleted the update-default-alignment-matrices branch July 29, 2026 09:47
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.

4 participants