Skip to content

Investigate/rule out downstream BT-vs-USB fusion axis mapping as residual cause of #83 wrong orientation #87

Description

@petegordon

Type: Investigation (contingency) · Parent: #83 · Blocked-on: in-game verification sibling issue

Why

Hardware + console testing for #83 (branch claude/issue-83-macos-bt-imu-offset) shows the DualSense BT 0x31 IMU is parsed correctly on macOS:

If the in-game verification (sibling issue) still shows side-to-side / wrong orientation with offset=16 correct, then the bug is not in offset/parsing — it is downstream in sensor fusion: per-axis sign convention, axis remapping, or scale that differs between the BT and USB paths. This issue defines that investigation so it's ready to pick up if verification escalates.

Scope

  1. Diff the BT vs USB path from raw IMU → fused quaternion:
    • In packages/core/src/drivers/playstation-driver.js: how gyro/accel axes (and signs) are emitted for 0x31/0x11 (BT) vs 0x01 (USB). Confirm both transports hand fusion the same axis convention (the report layouts differ by baseOffset, but the decoded x/y/z order + signs must match).
    • In the fusion consumer (app.js gyro pipeline / fusion module): confirm no transport-conditional axis handling.
  2. Validate against captured ground truth: at rest gravity sits on accel-Y (~7970 in the macOS WebHID: DualSense Bluetooth gyro fusion produces wrong orientation (USB-vs-BT report layout) #83 capture). Confirm the fusion's "up" axis matches; a swapped/negated axis here is the classic "tilts → yaws side to side" signature.
  3. If a BT/USB divergence is found, fix it and add a fusion-level assertion using the macOS-BT fixture (see fixture sibling issue): a known tilt produces the expected quaternion on both transports.

Acceptance

  • Documented BT-vs-USB axis/sign/scale comparison from raw IMU to fused quaternion.
  • Either: a confirmed divergence + fix + cross-transport fusion test, or a written rule-out (axis mapping is identical; residual symptom lies elsewhere).
  • No regression for DS4 BT or DualSense USB.

Note

Open this for work only if the in-game verification escalates; otherwise it stands as the documented rule-out path for #83.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions