Figure 1. Example of sensor orientations
Cortex-M0+
Only the sensor orientation must be set using MotionFX_CM0P_setOrientation function. The parameters of
this function are orientation strings which are composed in the same manner as for Cortex-M3, Cortex-M4 and
Cortex-M7 (see above).
The MotionFX_propagate and the MotionFX_update (MotionFX_CM0P_update) functions receive input
from sensors in the MFX_input _t (MFX_CM0P_input_t) structure:
• mag represents magnetometer data after calibration in
μT/50
• acc represents accelerometer data in g
• gyro represents gyroscope data in dps
The MotionFX_propagate and the MotionFX_update (MotionFX_CM0P_update) functions provide the
sensor fusion output in the MFX_output_t (MFX_CM0P_output_t) structure:
• rotation_6/9X represents the system orientation in three-angle format: yaw, pitch and roll
• quaternion_6/9X represents the system orientation in four-number format; this format gives the same
information as rotation_6/9X but it has advantages for computation and is therefore usually used by
other algorithms (based on the sensor fusion)
• gravity_6/9X represents the static acceleration (i.e., Earth gravity) vector extracted from the acceleration
data
• linear_acceleration_6/9X represents the dynamic acceleration (i.e., movement) vector extracted from
the acceleration data.
UM2220
MotionFX library
UM2220 - Rev 7
page 5/24