Mayitzin / ahrs

Attitude and Heading Reference Systems in Python

Home Page:https://ahrs.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Isn't it required to normalize quaternion estimation in EKF?

PeterBorisenko opened this issue · comments

Just after we integrate quaternion using angular rates it's norm is not necessary equals to 1.
So it's illegal to use this estimation as attitude representation and DCM based on it will also be incorrect.

Please explain if I am wrong.

The integration of the quaternion is done with the linearized Taylor series, which actually yields a normalized quaternion, as explained in the documentation of the estimator "Attitude from Angular rate" https://ahrs.readthedocs.io/en/latest/filters/angular.html#quaternion-integration

Mathematically, it is not necessary to normalize it. However, you're right, it wouldn't hurt to add an extra normalization line at the end of the method f of the EKF. I'll add it.

Yeah after I have checked the values it actually doesn't not look that bad. It gives about 0.7e-8 error on my test data so the result won't be affected in any noticeable way.