MPU Bias regs vs pushing bias to DMP

By rover_shie , 4 June 2014

MPU bias regs :-

Values are 16 bit (-32768 to 32767)

Gyro is +/- 1000dps scale factor to get actual (physical) value is 1/32.8
Accel is +/-8g so scale factor is 1/4096

So after mpu_run_self_test (which returns physical values in 16:16) just scale to 1000dps and 8g, shift back down to drop the fractional part and call mpu_set_xxxx and you're done.

DMP bias :-

Docs say DMP is 16:16 format. The example code (motion_driver_test.c) takes the values from run_self_test (physical values in 16:16) and multiplies them by current accel sensitivity before calling dmp_set_xxxx functions.

So that suggests dmp_set_xxx_bias functions want 16:16 in current FSR ?

The actual library functions do some more stuff;

Gyro bias is scaled by (46850825 * 200 / DMP_SAMPLE_RATE) and >> 30

Accel bias is scaled by current accel sens <<15 (float to 18:15 format?) and then the result is shifted right 30.

So before it hits DMP, accel bias is multiplied by accel sens twice and then shited right 30 which in effect drop the lower 15 bits from the sum.

Is that correct?

The reason I ask is I'm testing the use of MPU biasing vs DMP biasing and for the life of me I can't get the same DMP results if I push to DMP bias compared to pushing to MPU bias.

phpbb Topic ID
16200