#pragma once #include #include #include // Get the calibrated magnetometer & accelerometer vectors // Norm should be close to 1. void ahrs_get_mag(v3d *result); void ahrs_get_acc(v3d *result); // Get the orientation of the device as a quaternion. // The quaternion represents a transform from sensor coordinates // to East-North-Up coordinate system. void ahrs_get_sensor_orientation(qf16 *result); // Get the orientation relative to the "normal position" of the platform. // The quaternion represents a transform from platform coordinates to East-North-Up coordinate system. // The zero position is defined as: // - weight directly downwards, // - motor axis in east-west direction // - motor on the east side. void ahrs_get_orientation(qf16 *result);