I am building a robot and I need to keep track of turns. In other words I need to know the amount of rotation about the Z-axis where Z points straight up into the sky. So just a single scalar number.

Unfortunately my 6050 chip is on a pcb board that is tilted. So the Z-axis of my 6050 attitude sensor is at an angle. I need to convert the quternion given by the 6050 into a simple single-number rotation.

So far I have been unable to understand the mathmatical operations needed. Another person reported he understood them after a week of studying. I'm hoping someone can just tell me what operations to perform to get the result I need. I don't want to spend a week to get there. (Too little time and I'm lazy).

I have the arduino library to read quaternions from the 6050 and to perform the basic operations on them, i.e. product (multiplication), conjugation, magnitude, normalization, and rotation. I'm hoping I only need multiplication, but even if that is true I don't know how to get the quaternion to multiply against.

Can someone much smarter than me give a hand?

EDIT: I changed "I'm hoping I only need rotation" to "I'm hoping I only need multiplication".