Question About Quaternion Multiplication Convetion

Hello,
I’ve been reading EKF2 source code after I read Joan Sola’s Thesis about Quaternion Kinematics and I stumbled upon convention issue that made me doubt my understanding of it.

In the code, we can see that the propagation equation is using right multiplication as :
_state.quat_nominal = (_state.quat_nominal * dq).normalized();

but then in the fuse function in ekf_helper.cpp, the correction is done as left multiplication as :
Quatf delta_quat(matrix::AxisAnglef(K.slice<State::quat_nominal.dof, 1>(State::quat_nominal.idx,

                    0) \* (-1.f \* innovation)));

_state.quat_nominal = delta_quat * _state.quat_nominal;

The thing is, in Joan Sola’s Thesis, he does not do this, he keeps the same convention in both prediction and update step.

I do not think that this (-1.f * innovation) is related to this as this negative (as far as I understand) comes because for some reason the innovation previously is calculated as (predicted - measurements) not the typical (measurements - predicted).

My only explanation to this is that in prediction the delta theta comes from gyroscope which is a body frame orientation, but in the update the delta theta comes from world frame source such as mag or gps therefore we reverse the multiplication order?

I’m not sure about this but I would be very glad if someone can clarify this to me.

@bresch can you help me with this?

For those who might be interested, I think the explanation to this is that they use left multiplication convention (left hand side), which assumes global angular rates.

Quoting for Joan Sola’s thesis : “True and nominal kinematics do not involve errors and their equations are unchanged” (meaning he keeps the nominal in right hand side convention).

He also says : “This is so for convenience, as the measure of the angular rates provided by the gyrometers is in body frame, that is, local”.

Therefore, we can deduce from this that since the correction is coming from global sources such as NE aiding (GPS) or magnetometer, we use left hand side convention.

Please correct me if I’m wrong, but since I’m getting no response and there might be some other people who are interested in this, I’m doing this claim and moving on.

Thanks!