sparkfun / SparkFun_LSM9DS1_Arduino_Library

Arduino library for the LSM9DS1 9DOF IMU.
Other
64 stars 78 forks source link

printAttitude mixes degrees and radians incorrectly #8

Closed scrain777 closed 7 years ago

scrain777 commented 7 years ago

In the example code for I2C (and presumably for SPI, though I didn't look) it incorrectly computes the heading. If my==0, it sets the heading to 180 degrees, then manipulates the heading as if it were in radians instead. To process the following code correctly, it should be set to pi instead.

jimblom commented 7 years ago

Good catch! Fixed in commit 8f9d501.