How it works: states prediction¶
Prediction models¶
In the following we will note \(\mathbf{q}\) the quaternion discribing body orientation relative to local frame.
Attitude¶
Ideal operation¶
The attitude prediction is done by integrating gyrometer data at the highest frequency possible on the platform. Actually, the frequency is limited to 500Hz to fit into low power embedded systems and means integration numerical errors.
quaternion derivative is computed as follow:
\(\mathbf{\omega}\) is the gyrometer rotation speed vector in body frame.
The first order integration used is:
Quaternion is the normalized at each step to avoid numerical errors.
Bias impact¶
As we are dealing with gyro biases and they are part of our state vector, we need to know the coupling between attitude errors and our Angle-axis rotation error vector in body frame (noted \(\theta_{\mathbf{err}}\)):
The relation between real quaternion from ground truth quaternion and estimated quaternion is:
Predicting real quaternion with gyrometer data:
\(\mathbf{\Omega}\) is the gyrometer rotation speed vector in body frame.
\(\mathbf{b}\) is the gyrometer bias vector in body frame.
Our angle-axis rotation error vector can be obtained with:
After simplification and the fact that we are dealing with unit quaternion, we obtain:
result
Which is then linearized to obtain the jacobian matrix relative to the state vector:
We obtain:
jacobian
Bias prediction is just consider it does not change over time:
Speed and altitude¶
We use the corrected quaternion to project body acceleration to NED frame and substract gravity to obtain vertical NED acceleration. This acceleration can be integrated into speed, and integrated again to obtain altitude. This implies a coupling between NED Z speed and attitude quaternion errors.
If we reuse the real quaternion from ground truth which is estimated quaternion corrected:
Accelerometer measures projected in NED frame is:
These expressions are then used to obtain the jacobian matrix relative to the state vector
The coupling between NED Z speed and attitude errors means that vertical sensors corrections will impact attitude estimation.