Hello everyone, I will participate in a competition this summer with my team, and mission expects us to do a camera stabilizer. Especially, this camera stabilizer takes magnetic north as the reference point, and stabilize the initial angle with respect to the magnetic north between +10/-10 degrees. We decided to use BNO055 sensor to build camera stabilizer. However, the code prepared by Adafruit gives us roll, pitch and yaw angles. We want to hold roll, pitch and at the same time take magnetic heading instead of yaw angle. We do not understand how we edit the library for this purpose. Can you give any advice or tutorial for this situation? Thanks in advance.
If you were to use a starting reference to Mag. North, then yaw could be used to track Mag. North. That you get to use a 20 degree offset range, if I read that correctly works in your favor.
Another way is to place your unit aligned to Mag. North at start up. Consider that, well where I live, most streets are North-South, East-West, you have an available startup reference positional placement.
With the BNO055, magnetic North defines 0 degrees in yaw.
However, the magnetometer calibration in the BNO055 does not work well, and magnetic North will not be very accurately determined.
If you want an accurate direction for magnetic North, use a better magnetometer and carefully calibrate it by following this tutorial.