Lets say I was rotating my Gyro at 600 degrees per second. The sensor's output would be 8191 in decimal according to the datasheet. Now lets say that the sensor is outputing 856 in decimal format. The sensor works at 0.07326 degrees per LSB. That means 0x0000 is 0, 0x0001 is 0.07326, 0x0002 is .14652 and so on. In order to use integer math, I need to use 7326.
100000 * .07326 = 7326
7326 * 856 = 6271056
One problem is 2 digits are cut off. How do I get around this?
Bookmarks