Dear Moises,

concerning the covariance matrix: In my case the matrix Q is diagonal as the noise on the roll/pitch angle and the gyro data is independent from each other. The observation noise of our roll/pitch angles is also assumed to be linear with the integration time. So the overall parameters for the Kalman filter reduce to 3 values. We simply performed an educated guess to find starting values for the Kalman and applied these. Then we iteratively found values for a good filter performance by playing around.

In case you want to measure the errors you can mount the IMU onto some sort of testbench. Then you can apply known positions and record the measured values. Afterwards you can fit a gaussian function and gain the error width which you need for the matrices. This is very simple for the acc values but the gyros are much harder to measure.

This also leads to your last question. We calculate the roll/pitch angles from the three acc values and correct them with the according gyro data. this means we have one Kalman for roll and pitch. You can also add another for yaw, but we do not need this information for our current project.

Greetings,

Michael