AltIMU-10 v5 yaw value problem

Hello I use the AltIMU-10 v5 sensor for my tracking device with “https://github.com/pololu/minimu-9-ahrs-arduino” this code but my yaw angle is always changing for example when I try 10 time 4 times is starting with +(30–50) values, 3 times it gives correct values starting raw angle with +(3–8) , 5 times gives +(90–120)values for starting yaw angle.I also calibrate my magnetometer with these values
#define M_X_MIN -2689
#define M_Y_MIN -4999
#define M_Z_MIN +2116
#define M_X_MAX +2862
#define M_Y_MAX +136
#define M_Z_MAX +7250
but every time my start point changing. Roll and pitch values work so nice and clear but I couldn’t understand why the yaw values like that so ı need help I can’t find any solution for this.
Also in some cases, even though I keep the sensor steady, the yaw value is constantly increasing when I move the sensor it can change the value but I couldn’t stop the increasing of the yaw value.

Hello.

I am sorry you are having trouble with the AHRS code on your AltIMU. The behavior you are describing with the yaw axis sounds like an issue from poorly calibrating your magnetometer. You might try calibrating again to try and get a more accurate set of minimum and maximum calibration constants. In general, when calibrating, it might help imagine that the AltIMU is the tip of a paintbrush and while the calibration routine is running, your goal is to cover the entire inside of a sphere with paint.

If that does not improve the yaw issues enough, you might consider trying other more involved calibration methods, like what Jim Remington mentions in this thread.

-Jon

Hello.

Thanks for be interested. But even though I made all the calibrations in this link and I get these values

#define M_X_MIN -2742
#define M_Y_MIN -5798
#define M_Z_MIN +2165
#define M_X_MAX +3128
#define M_Y_MAX +104
#define M_Z_MAX +7736

But still the result is not change a little bit. You can see our three tests in a row on the video. We put the sensor steady and on the same direction all of the tests but we got 3 different results. You can see the green chart is represented yaw angle. It is constantly increased test 1 and test 2. But also test 3 result is what are we expected. Then we try another Arduino, AltIMU-10 v5 and different computer but the result is always the same. I would be glad if you can help to solve this problem. I really do not understand the problem.

-Burak

Please post a plot (not a video), of the output of the magnetometer, for a variety of orientations, AFTER the calibration is done. 2D plots are fine, like the one shown below.

Hello @Jim_Remington, thank you for interest. I have completed all calibration steps and my output 2D points can be seen in the picture below.

I fallowed these steps to implement calibration:

This 2D plot points refers that magneto outputs. Also I have changed maximum and minimum values in MinIMU9AHRS.ino according to Calibrate2 output for magnetometer (that is the only change that I have done in the MinIMU9AHRS.ino).

If the calibration is correct, is there any mistake or is it require another operation/implementation for calibrated magnetometer on MinIMU9AHRS.ino ?

Thanks for your interest.

-Burak