BonaDrone / AttitudeEstimation

Madgwick AHRS attitude estimation in c++
MIT License
2 stars 0 forks source link

sample frequency #1

Open ALA96 opened 6 years ago

ALA96 commented 6 years ago

Excuse me, I want to ask you sir. why did you define 1000 as sample frequency? Could you explain the reason?

Thank you for your attention

juangallostra commented 6 years ago

@ALA96 sampleFreq is the frequency with which IMU data is sampled. The value of 1000 is just a general setting and its value should be set to the frequency you are using to sample IMU data.

It is required because the Madgwick filter uses the time intervals between successive IMU readings to integrate the quaternion's rate of change: https://github.com/BonaDrone/AttitudeEstimation/blob/ba5748a0e6d9b2cb2dcab932c08dade77d540461/src/MadgwickAHRS.cpp#L136-L140

ALA96 commented 6 years ago

thanks for your explanation, but i want to ask again. What's the meaning of quaternion's rate of change?