MPU6050_tockn icon indicating copy to clipboard operation
MPU6050_tockn copied to clipboard

Angle Z shifted after rotating many times ,although X & Y were perfect ?

Open Elkhawaga opened this issue 5 years ago • 2 comments

Angle Z shifted after rotating many times by -40 or 20 or -11 ,... but X & Y angles didn't effected even when moving fast

you are using coff of Gyro & Acc in Angle X ,Angle Y but in Z angle you didn't made that , Why?

angleX = (gyroCoef * (angleX + gyroX * interval)) + (accCoef * angleAccX); angleY = (gyroCoef * (angleY + gyroY * interval)) + (accCoef * angleAccY); angleZ = angleGyroZ;

thanks alot for your wonderful effort :)

Elkhawaga avatar May 30 '19 02:05 Elkhawaga

Because we cannot calculate angleZ by using accelerometer, so I use only gyro sensor in calculating angleZ. If you want to more accurate angleZ, you can use other sensor together. (ex: geomagnetic sensor)

tockn avatar Jun 03 '19 16:06 tockn

You can find detailed explanation as well as many more useful information here: https://www.w3.org/TR/motion-sensors/#relative-orientation-sensor

nhphuong91 avatar Jul 25 '19 06:07 nhphuong91