kriswiner / MPU6050

Basic MPU6050 Arduino sketch of sensor function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Madgwick Quaternions without accelerometer data

intensite opened this issue · comments

Hello Kris,

First of all, thanks for this old but very useful library.

Is it possible to use the MadgwickQuaternionUpdate without Accel inputs?

I am in the process of creating a model rocket flight computer and I suspect the fusion of the Gyro with accelerometer cannot be used in this application because of the high acceleration inherent to rockets.

I do however need the integration of the angular velocity of the gyro axis into Quaternions.

I tried to strategically place a if statement in the code of the MadgwickQuaternionUpdate to ignore the Accel data if 0,0,0 is passed for the 3 accel axis. However, I am unfortunately not gifted for complex algebra and so far I haven't had much success.

Is this something you can help with?

Best regards.

Thank you sir!

One would alter these using the beta or the zeta parameter?
Right now (by default) my beta evaluates to 0.60 while zeta evaluates to 0.03

Also, in your sample, we can fin this piece of code (commented out). Is it what you had intended to do to decrease reliance on the accelerometer after initial stabilization.

     if(lastUpdate - firstUpdate > 10000000uL) {
       beta = 0.041; // decrease filter gain after stabilized
       zeta = 0.015; // increase gyro bias drift gain after stabilized
     }