jarzebski / Arduino-MPU6050

MPU6050 Triple Axis Gyroscope & Accelerometer Arduino Library
GNU General Public License v3.0
429 stars 278 forks source link

MPU6050_gyro_pitch_roll_yaw code wrong orientation #36

Open bumboo001 opened 2 years ago

bumboo001 commented 2 years ago

This code just maps acceleration because mpu6050 is only 6 axis accelerometer.

So this program just count with acceleration(deg/s) calculated from accelerometer data. So theoretically when I start rotating mpu 6050 with this code programm stop counting (writing motion for example in serial plotter), if I am rotating with static speed. In documentation of mpu6050 I found that this "gyroscope" Is actually measuring not rotation but rotting acceleration in XYZ axis. If I am correct this program or whole library needs function what will work with acceleration and calculate that to real rotation. So am I correct?

the documentation

5.1 Gyroscope Features
The triple-axis MEMS gyroscope in the MPU-60X0 includes a wide range of features:

 Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-programmable full-
scale range of ±250, ±500, ±1000, and ±2000°/sec

 External sync signal connected to the FSYNC pin supports image, video and GPS synchronization

 Integrated 16-bit ADCs enable simultaneous sampling of gyros

 Enhanced bias and sensitivity temperature stability reduces the need for user calibration

 Improved low-frequency noise performance

 Digitally-programmable low-pass filter

 Gyroscope operating current: 3.6mA

 Standby current: 5μA

 Factory calibrated sensitivity scale factor

 User self-test

manual link