Search code examples
androidsensorsandroid-sensors

Why are Sensor values so different across devices?


I'm currently using android devices to develop an application that uses sensor values to get information about the environment. I'm using a Samsung S6 Edge and a Nexus 7 tablet and the sensor values i get from the devices are very different.

One example: Gyroscope Values from 2 Devices

These are the Gyroscope values (x-axis) from both devices sitting still on a table. This is one of the best in values similarity, most of them are not even close.

A couple of the bad value similarities:

Magnetic Field: enter image description here

Accelerometer: enter image description here

I'm wondering why values are so different across devices?

Thanks.


Solution

  • I'm wondering why values are so different across devices?

    They are not particularly different. Those are values in radians/second, where a "360-degree turn" is ~6.28 radians. Your values range from ~-0.002 to +0.004. ~0.004 radians/s is ~0.229 degrees/s. This is tiny. IOW, your values are all similar to 0.

    Plus, as the documentation states:

    In practice, the gyroscope noise and offset will introduce some errors which need to be compensated for. This is usually done using the information from other sensors, but is beyond the scope of this document.

    More generally, different hardware will have different sensors from different manufacturers.

    With respect to accelerometer, again, your values are tiny. Earth's gravity is 9.8 m/s2; your values are between ~0.15 and ~-0.05.

    With respect to magnetic field... your Samsung seems messed up.