sparkfun/SparkFun_ICM-20948_ArduinoLibrary

Compass and rotation

minhanh1234 opened this issue · 1 comments

Hi

Would you know if this chip can calculate compass angle like most magnetometer and would you have any example code to calculate rotation count? Example if i rotate the gyro on a table? (Example: 2 counter clockwise ration)

Thanks

Hi Minh (@minhanh1234 ),

You can calculate approximate angle from either the raw magnetometer readings or the DMP quaternions. Please see the examples for more details.

The DMP has no built-in support for rotation counting. You will need to add your own.

Best wishes,
Paul