Find the most accurate orientation of a BMI160 Sensor (Meta Wear CPRO).

Unfortunately, by using the implemented accelerometerBMI160.orientationEvent API method, the orientation wrongly changes when the sensor is being shaken, even though the orientation has not been changed at all. For example, just by moving the sensor “a little bit” fast on y axe or in any axe. Is there any form/algorithm that I can use in order to avoid these “orientation changes”?

So far, what I also tried to do is to check for accelerometer values (x, y and z) and determine according to their values if the orientation has been changed. But by shaking the sensor, the inertial force values vary quite a bit and they make it difficult to determine. 


  • The nature of an accelerometer is to measure the forces of acceleration. When the unit is stationary relative to the Earth, the only force acting on accelerometer is acceleration due to gravity. By knowing that, you can use the ratio of gravitational acceleration acting on all three axes to come up with the scalar angle of the device.

    However, if you "shake it" you are now applying linear acceleration which is added to gravitational acceleration, biasing the ratio and giving a skewed result.
  • edited December 2016
    Removing gravity from the accelerometer could help to avoid getting skewed results? see:
    Thank you
  • I would instead remove linear acceleration from the accelerometer data which lets you use the original formula for determine orientation of a stationary object.
This discussion has been closed.