Android: value Sensor.getResolution ()

I am working on Android applications that use SensorManager for different purposes. During the research, I found that the Sensor.getResolution() function returns different values ​​for different devices:

HTC Sensation has a resolution of 1.0 for all sensors on board.

Motorola XOOM :

 3-axis Accelerometer -> 0.009576807 3-axis Magnetic field sensor -> 0.0625 L3G4200D Gyroscope sensor -> 0.0012217305 Linear Acceleration Sensor -> 0.009576807 Gravity Sensor -> 0.009576807 

It is not clear whether additional calculations should be performed using this resolution value before using the corresponding sensor values. The official documentation does not shed light on him.

Can someone explain to me this purpose of "permission"?

+4
source share
2 answers

The output of the sensors is voltage. It is converted to an integer using ADC .

Suppose

  • the sensitivity of your accelerator is 800 mV / g

  • you measure between -1.5..1.5 g

  • you have 12 bit adc

Then your resolution is approximately (1.5 g + 1.5 g) / 800 mV / g = 7 * 10-4 g / unit.

That is, everything below this cannot be distinguished, therefore, name resolution.

You do not need to do anything with this value. It just tells you the theoretical limit of the device. Unfortunately, in my experience, the accuracy of the sensors is worse than this limit ...: (

+4
source

Resolution is defined as the smallest change that can be detected by the sensor.

0
source

Source: https://habr.com/ru/post/1396492/


All Articles