Calculate Quaternion from BMI088 and BMM150 Data

This post answers questions regarding the calculation of quaternion data from the BMI088 accel/gyro and BMM150 from Bosch Sensortec.

Is there a sample source code or an equation to calculate quaternion data from BMI088 accel/gyro plus BMM150 mag data? It does not appear that quaternion data can be read directly from these chips as it can with something like the BNO055.

The BNO055 contains proprietary sensor fusion software, I am not sure if libraries are available in source code and what is their expected performance. In any case, sensor fusion algorithms must run in real time and can easily be broken by running concurrent applications on the same MCU (especially if a RTOS is not used). Therefore unless vibration robustness is a must, I would recommend the BNO055.

Speaking of the BNO055 - is this chip basically just a combination of the BMI088 and BMM150 that also outputs quaternion and Euler angle data, or would there be a good reason to use the BMI088 / BMM150 combination instead of the BNO055?

BNO055 is actually the combination of BMI055 + BMM150 + an Atmel microcontroller. The gyroscope and magnetometer are the same, but the accelerometer in BMI088 contains mechanical vibration damping that limits the bandwidth.

All information was provided by Bosch Sensortec’s Forum.