Skip to main content

Module orientation

Module orientation 

Source
Expand description

Orientation tracking from the gyroscope and accelerometer.

Orientation runs a Madgwick filter: the gyroscope is integrated for fast response and the accelerometer’s sense of “up” corrects the drift in pitch and roll. Nothing corrects the heading, so yaw drifts slowly; call Orientation::recenter to zero it. The magnetometer is not used because its readings are uncalibrated.

The world frame has z up. After Orientation::recenter, world y is the direction the controller pointed at that moment.

Structs§

Euler
An orientation as three angles in radians.
Orientation
Tracks the controller’s orientation from its motion samples.
Quat
A rotation as a unit quaternion.