DIMU Calibration Without Temperature Compensation
This procedure outlines a simple and fast way to generate GYO and ACC align and scale values without the added complexity of also generating and integrating temperature compensation values into the calculations.
This procedure is ONLY supported on DIMU based boards (AQ6 with DIMU or AQ M4).
It requires the use of a single dynamic data file and running parts of the Cal and Sim3 calculations in the AutoQuad QGC. Refer to the AutoQuad Software Setup section for details on how to install QGC for AutoQuad
So first you need to perform a calibso to gather a dynamic log file. Refer to the Dynamic data gathering section for details on gathering dynamic calibration data.
Make sure that the data is good before proceeding to calculations. Refer to Dynamic Log File Analysis page for details on how to analyse and edit static log files intended for calibration.
Running the calculations
For full reference on running IMU calibration calculations, you can refer to the IMU Calibration Calculations section
- Load the dynamic log file to QGC. Refer to the IMU Calculations: Preperation page for details.
- Then generate a params file to store the generated
- Remember to check the box “Using digital IMU”
- Then run the cal -acc step
- You will get a result, but we are only interested in the first 3 lines for that contains the ACC X/Y/Z Bias from this step.
Copy those 3 lines to your params file by pasting them to the “all generated parameters” tab and hitting save.
- Then go to sim3 and run the –gyo –acc step (step 5). For this step you may have to lower variance to 1e-7 to get data to converge:
- You should see the MAE drop slowly.If the MAE or the generated parameters begins to jump, you may have to lower variance further (4e-7)
- Pretty soon you should see a solution begin to converge and the MAE stops to drop significantly:
#define DEFAULT_IMU_GYO_SCAL_X +0.999545216316 // 0.000000049996 -0.000022464618
#define DEFAULT_IMU_GYO_SCAL_Y +1.000474821020 // 0.000000049997 +0.000023850621
#define DEFAULT_IMU_GYO_SCAL_Z +1.000331128890 // 0.000000049998 +0.000016456516
#define DEFAULT_IMU_GYO_ALGN_XY +0.000001903315 // 0.000004999998 +0.000000088717
#define DEFAULT_IMU_GYO_ALGN_XZ +0.000029485407 // 0.000004999891 +0.000001485776
#define DEFAULT_IMU_GYO_ALGN_YX +0.000000577535 // 0.000004999997 +0.000000033405
#define DEFAULT_IMU_GYO_ALGN_YZ -0.000029377129 // 0.000004999892 -0.000001481900
#define DEFAULT_IMU_GYO_ALGN_ZX +0.000034476352 // 0.000004999851 +0.000001750993
#define DEFAULT_IMU_GYO_ALGN_ZY -0.000019275576 // 0.000004999954 -0.000000974144
#define DEFAULT_IMU_ACC_BIAS_X -0.034924306350 // 0.000000049996 -0.000043958802
#define DEFAULT_IMU_ACC_BIAS_Y +0.004625197789 // 0.000000050000 +0.000008731559
#define DEFAULT_IMU_ACC_BIAS_Z +0.506333209750 // 0.000000050143 +0.000030996815
#define DEFAULT_IMU_ACC_SCAL_X +0.999371057135 // 0.000000050274 -0.000001501788
#define DEFAULT_IMU_ACC_SCAL_Y +1.003977113409 // 0.000000055655 +0.000001606375
#define DEFAULT_IMU_ACC_SCAL_Z +1.007420461095 // 0.000000093727 +0.000002447867
#define DEFAULT_IMU_ACC_ALGN_XY -0.000008380764 // 0.000004999992 -0.000000451639
#define DEFAULT_IMU_ACC_ALGN_XZ -0.000031637170 // 0.000004999943 -0.000001574223
#define DEFAULT_IMU_ACC_ALGN_YX -0.000007000794 // 0.000004999997 -0.000000393262
#define DEFAULT_IMU_ACC_ALGN_YZ +0.000036721193 // 0.000004999890 +0.000001799400
#define DEFAULT_IMU_ACC_ALGN_ZX -0.000035204131 // 0.000004999922 -0.000001729791
#define DEFAULT_IMU_ACC_ALGN_ZY +0.000022457829 // 0.000004999970 +0.000001118980
0.042736 0.011961 0.045062 0.000000 0.000000 = 0.099759
Stop the calculation, copy the defines into your params file and save it. You will now have align and scale values GYO and ACC for the temperature at which the dynamic log file was gathered.
Loading these to your controller should bring the artificial horizon into line and give you an ACC_MAGNITUDE in telemetry close to 9.806. Refer to verifying calibration results for further details on calibration parameter verification.
If horizon does not line up or ACC_MAGNITUDE is way off, then you have to redo the calculations or start over with a new dynamic log file.
We recommend using the onboard compass calibration to calibrate the magnetometer, as this procedure usually yields a better result without temperature compensation.
If yol want to run the cal and sim steps for mag and inclination (steps 3 and 6), you can refer to the full calibration calculation pages coming up next to see how to run those steps , we are not gonna cover it in details here.