Ok. So if i'm not wrong what sensorfusion is applying is a norm-based algorithm (eq. 11, AN5023) of the acceleration / noise variances with lower bounds to avoid 0 values. This norm-based algorithm is already pretty robust against external acceleration except is equivalent to giving less weights to all 3 axis accelerometer outputs independantly of the direction of the external acceleration: if external acceleration is applied only to x axis, and by giving less weights on y and z axis accelerometer output, some useful information in y and z axis accelerometer output is lost.
According to the paper above (I attach it to avoid searching the web), by using an adaptive weighing algorithm, we can increase acceleration variance in the perturbed axis only "x", and thus y and z axis accelerometer information is not lost.
Assuming that external acceleration variance calculation in sensorfusion is a norm-based algorithm: By taking small K constant values, y axis element of the acceleration variance becomes small and thus y axis accelerometer information is used more compared with a high K case. The price paid is that x axis element of the acceleration variance becomes also small and the filter becomes sensitive to x axis external acceleration.
Looking at the test data from the paper (table III, page 9) it looks apparently that the estimation error in the perturbed axis is reduced without affecting the other axes.
So basically, I would now need a little hand here to implement and test this adaptive accel variance algorithm in sensorfusion. The algorithm is described in section IV, page 4. What it does is an estimation of the external acceleration from the residual accelerometer measurement update. The algorithm is described in equations (34) and (35), page 5. I attach the paper to avoid web searching.
Any ideas on how this could be implemented? I wouldn't mind giving it a try.