I am trying to make a mini RC plane with an Adafruits ItsyBitsy M4 as the brains and a BMI160 6-axis IMU (almost identical to the LSM6DS3 IMU on the nano33).
My question is, how can I get a reliable orientation out of this?
All I need is an algorithm/function to convert the values to some sort of orientation, preferably one that gives roll, pitch and maybe heading (not necessary) that I can use for self-levelling and other stuff.
Good choice, and good to hear about your progress! When you are ready, please post the code and tell us more about your application and/or any innovations.
Strictly speaking there are only 3 axes, a combination of 3-axis accelerometer and 3-axis gyro is usually described as a 6 DoF sensor (degrees of freedom).