Hi, I am trying to use the BMX055 as a compass, but am having some issues. I am reading the X,Y and Z axis information but I was expecting with the device flat, I would get '0' on 2 axis and then the other axis value changes when moved. What I am getting is angles on all axis and just by rotating the devices I get X and Y both changing. In the data sheet it refers to an API, but I can only find code for displaying the raw data which I already have working. I would be grateful if you can send me any application notes to help me solve this problem.
Thanks for your inquiry.
BMX055 is a 9-axis sensor that includes 3-axis accel, 3-axis gyro and 3-axis magnetometer. In order to get a tilt compensated eCompass, you need to use both accel data in the unit of g and magnetometer data in the unit of uT from BMX055. In order to make the heading angle be immune to the external magnetic interference field, you need to use gyro data in the unit of degree per second or radian per second. Therefore, you need sensor fusion algorithm to get eCompass from BMX055.
Please download BSXLite sensor fusion library at https://www.bosch-sensortec.com/software-tools/software/sensor-fusion-software/ and integrate it into your firmware. Then you can get the eCompass right away from BMX055.
I have downloaded the BSXlite software, but I can't see what is required. There is precompiled software for cortext M3 and M4, but I am writing the software for a different processor and need to write everything from scratch. Is there a document stated how the data is manipulated from the raw data to get a true direction?