BjarneBitscrambler / OrientationSensorFusion-ESP

Files for performing orientation sensor fusion using NXP version 7 algorithm, ported to Espressif platforms.
BSD 3-Clause "New" or "Revised" License
23 stars 12 forks source link

Scaling of Accelerometer readings appears incorrect #6

Closed BjarneBitscrambler closed 3 years ago

BjarneBitscrambler commented 3 years ago

Initial testing with the Sensor Toolbox indicates that the scaling of the accelerometer outputs (all axes) is incorrect. For example, there is not a 2 g difference in readings between an axis that is pointing down and when it points up.

Have to check whether this is related to the initialization of the accelerometer, or in the scaling and corrections that happen during calibration, or during translation into the packet that is sent to the Toolbox.

BjarneBitscrambler commented 3 years ago

Found and fixed the error in the I2C read routine for the accelerometer - during the block read of the data registers, the register address had been wrapping back to 0x01, not 0x00 as I thought the documentation said.

Now the axes read approx +/-1.0 g when aligned up-down.