zarathustr / FKF

Fast Kalman Filter for Attitude Estimation
32 stars 19 forks source link

Question for calculating Mag(N), Mag(E) #1

Open wkyoun opened 6 years ago

wkyoun commented 6 years ago

@zarathustr

Dear Jin Wu Thank you for sharing the great contribution to FKF.

However, I have a simple question as following.

Would you please explain why mD and mN is calculated as following?

    mD=dot(Accelerometer(i,:),Magnetometer(i,:));
    mN=sqrt(1-mD^2);

https://github.com/zarathustr/FKF/blob/master/main_performance.m#L62-L63

As far as I understand,

magnetic field vector B*(cos (alpha), 0, sin(alpha) where B is the strength of the magnetic field and alpha is the inclination angle

Dos this dot(Accelerometer(i,:),Magnetometer(i,:)); operation means inclination angle?

KangliC commented 4 years ago

Because the data in accelerometer and magnetometer has been normalized before this step. The result of dot between them will come up with mD for the normalized magnetic value. It only has the mathematical meaning.