adafruit / Adafruit_AHRS

Arduino library for AHRS (Attitude and Heading Reference System) for Adafruit motion sensors
214 stars 64 forks source link

Update ahrs_fusion_usb to use quaternions #3

Closed microbuilder closed 4 years ago

microbuilder commented 7 years ago

Description

For full 360° orientation support without 'flipping' on one axis at around 180° (gimbal lock), ahrs_fusion_usb should be updated to use quaternion output, similar to ahrs_fusion_ble.

The Processing sketch will also need to be updated to work with Quaternions, since it currently expects Euler angle output.

Sketches to Change

Notes

An option to display Euler angles in the Serial Monitor should be maintained since Euler angles are far easier to understand for end users. However, the conversion from quat to Euler should happen at the last minute, and all internal math should be done using quaternions.

ladyada commented 4 years ago

done!