ZHomeSlice / Simple_MPU6050

Going Live
MIT License
86 stars 24 forks source link

Is it possible to enable DMP_FEATURE_LP_QUAT? #35

Closed Blaschuko closed 1 year ago

Blaschuko commented 1 year ago

Hey! I'm working on a project that can't rely on accelerometers to calculate orientation, and therefore need to use the DMP_FEATURE_LP_QUAT feature on DMP (instead of DMP_FEATURE_6X_LP_QUAT) so it only uses gyros during calculations. Is there any way to enable it? Thanks!

Regards, Blas

ZHomeSlice commented 1 year ago

Yes

define Three_Axis_Low_Power_Quaternions 3

define Six_Axis_Low_Power_Quaternions 6 // Default

Simple_MPU6050::Simple_MPU6050(uint8_t DMPMode)

So change: Simple_MPU6050 mpu; To Simple_MPU6050 mpu(Three_Axis_Low_Power_Quaternions); Would remove the accelerometer from the DMP calculations resulting in quaternions that are only calculated with the gyro. Z