MPU6050_tockn
MPU6050_tockn copied to clipboard
Angle Z shifted after rotating many times ,although X & Y were perfect ?
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 :)
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)
You can find detailed explanation as well as many more useful information here: https://www.w3.org/TR/motion-sensors/#relative-orientation-sensor