# Yaw, Pitch, Roll rate concepts and how to calculate them with an IMU

I need help understanding the difference from Y/P/R rate and the data that I can get from a gyroscope. I am using the raw readings of my IMU (MPU9250) and the Madwick Filter to calculate a quaternion that represents the orientation of my device, then I can get the Y/P/R angles from it, also I need to get the Y/P/R RATES and this is where my mind gets confused. If my understanding is correct, these are the rate of change of the corresponding angles. A gyroscope can measure rotation around three axes: x, y, and z, right? And they are not the same as the Y/P/R angles. How should I be getting the data I need with using only an IMU?

I'm am really sorry for my badly written explanation, English is not my first language and I'm a software engineer not specialized in this field so it gets even harder to communicate my doubts. Thanks!

• What exactly are you looking for? As in what is the final data output you want Yaw pitch and roll angles? Or an angular velocity (degree/second) ? en.wikipedia.org/wiki/Aircraft_principal_axes. Read this to help understand y/p/r Jan 8, 2020 at 12:49
• I need them because I want to use this library to get a corrected position of my device. I have every variable the data input requires except the y/p/r rates. Here you can see what are the variables that I need Jan 8, 2020 at 13:07
• You’re already using the madgwick filter for fusion, why are you using the kalman too? You use one or the other, not botj. Jan 8, 2020 at 13:09
• Madgwick does not allow me to correct the longitude and latitude values I get from the GPS, also the speed that I can get processing my IMU values would not be correct at all (I calculate it integrating an acceleration vector). I would like to fuse the IMU data and the GPS data to get a better estimated position Jan 8, 2020 at 13:11