Jump to content
I2Cdevlib Forums

MPU-9150 How do you get yaw/pitch/roll? - Arduino


Recommended Posts

I have recently acquired the MPU-9150 accelerometer-gyroscope-magnetometer, and after a while of playing around with it, I still am pretty clueless.

I have some experience with C/C++, and I've managed to get as far as installing the MPU-9150 library, and using the "GetMotion9()" function. It seems to work fine, each variable has a value, but some of them don't make sense. The accelerometer works fine, but the gryo and mag seem wierd, the gryo seems to give angular acceleration, and I don'y know what's going on with the mag.

 

What I want is to simply get pitch/yaw/roll values. I read somewhere that the chip has some built in algorithm which calculates that by combining reading from each device, however I can't work out how to do that

 

I noticed in the MPU-9150.h library there was the "uint8_t dmpGetYawPitchRoll(float *data, Quaternion *q, VectorFloat *gravity)" function. Will this do what I want. Also I'm too much of a noob to work out how it works.

 

Thank you for your time :)

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...
×
×
  • Create New...