• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Accelerometer maximum range different on each device and limited?

Alex146

Lurker
Hi guys, I'm currently working with an accelerometer and gyroscope on android in Unity. I distinguish movement by checking each axis separately (of the accelerometer) and I'm getting different max values on different phones. I tried to adjust my code (to limit it actually) by the max value of the particular phone. I use the getMaximumRange() function which returns 156.96 m/s^2 -> 16G. (divided by 9.81)

The problem is that I got a max value of each axis around 2G, not 16G as it should be according to the getmax function. So I googled and it seems that the maximum range is limited manually by either the manufacturer of the sensor or by android itself. I don't know why, since the hardware is capable of distinguishing stronger movement.

Please, is there a way to change the maximum range that is currently in use? Or can I somehow get the
maximum range, which is actually used? And is it actually correct to divide the number by 9.81 to get G?
 
Back
Top Bottom