Jump to content
I2Cdevlib Forums
Sign in to follow this  
mehrvzf

How to Calculate "Yaw Roll Pitch" from Mpu6050 ?

Recommended Posts

Hi Jeff .

Thanks alot for your valuable and great works .

I've used some of them and they worked properly .

I access to all raw datas of MPU6050,but now I want to calculate aproximate values of YPR from them .

does the code at below address work correctly ?

http://github.com/jrowberg/keyglove/blob/master/keyglove/support_motion_rawimu_6dof.h#L194

so why you have commented this lines for YPR calculation ?

Share this post


Link to post
Share on other sites

The code you link to in the Keyglove repository works tolerably well, but since it relies entirely on the accelerometer readings (e.g. tilt with respect to gravity), it only works if the accelerometer is holding still. If there is any linear motion, then the calculations are messed up because non-gravitational acceleration is introduced. This is why the DMP is so valuable; it fuses the data from both the gyroscope and accelerometer to produce accurate results regardless of whether the sensor is moving or not.

Share this post


Link to post
Share on other sites

hello, I just need to ask which of the values from the mpu6050 library are accurate? I mean, which of the following values has no effect from movement of sensor. I already 

have used an non library complemetary filter, but that also gives messed up angles when sensor is moved.

 

#define OUTPUT_READABLE_QUATERNION

#define OUTPUT_READABLE_EULER

#define OUTPUT_READABLE_YAWPITCHROLL

#define OUTPUT_READABLE_REALACCEL

#define OUTPUT_READABLE_WORLDACCEL

#define OUTPUT_TEAPOT

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×