Jump to content
I2Cdevlib Forums

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 ?

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 4 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...