What are the units of IMU sensor values

Hi, I set the IMU static but it returns such values
[ IMU Sensor Output ]
[ Acceleration In X : -0.006 ] [ Acceleration In Y : -0.032 ] [ Acceleration In Z : 0.969 ]
[ Gyroscope In X : 5.869 ] [ Gyroscope In Y : 5.869 ] [ Gyroscope In Z : 0.927 ]
[ Yaw : 159.184 ] [ Pitch : 0.354575 ] [ Roll : -1.89143 ]
[ Magnetometer in X : 0.434 ] [ Magnetometer in Y : 0.165 ] [ Magnetometer in Z : -0.213 ]

Especially, gyroscope always records positive values. What does it refer to? I think it should be random small values around 0.

Hi @sunwell,

Welcome to the community!

From the datasheet and MCU code, it seems the units are degrees/second (dps).

If you look at the Z axis reading, it’s close to zero. If your device is on a table, this makes sense as the Z axis points out from the board and there is likely no rotation of the board on the table around that axis. My guess is the X and Y axis are experiencing small vibrations in the plane of the table that register as readings. You could use those numbers to calibrate for your application.

As for values of pitch, and roll, those are in degrees so it makes sense for them to be non-zero since most surfaces aren’t perfectly level. Yaw is also in degrees and is the horizontal “direction” of the MATRIX Creator so when you rotate it in the horizontal plane, yaw will change.


Hi Samreen,

Thanks for your reply. My confusion is the gyroscope value for X,Y,Z is almost constant and positive, which implies that it keeps drifting. Even for the Z axis, one second drifts one degree is not acceptable. If I place the board in a different position, the Z axis value may be 0.85 or 1.1. How should I calibrate the gyroscope to make it much more reliable?
I think pitch and raw are good but yaw seems also have problems. When I rotate it, yaw cannot change the value smoothly. When I rotate back, yaw reflects a much different value. How do I calibrate the value of yaw?


Great questions, gyroscope readings always tend to drift and need sophisticated calibration.

Same with yaw, it will take some research. It is definitely not as easy as subtracting constants.

I am looking into this and will try to help you out in the next couple of days.