Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Sensor.getResolution() value

I'm working on Android applications which uses SensorManager for different purposes. During investigation I found that Sensor.getResolution() function returns different values for different devices:

HTC Sensation has 1.0 resolution value for all on board sensors.

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's not clear whether I need to do additional calculation using this resolution value before using appropriate sensor's values. Official documentation doesn't throw the light upon it.

Can anybody explain me this 'resolution' value purpose?

like image 954
Dmitry Tupikin Avatar asked Feb 14 '12 20:02

Dmitry Tupikin


2 Answers

The output of the sensors is voltage. This is converted to an integer by the ADC.

Assume

  • the sensitivity of your accelermeter is 800mV/g

  • you are measuring between -1.5..1.5 g

  • you have a 12 bit ADC

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

That is, anything below this cannot be distinguised, hence the name resolution.

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

like image 120
Ali Avatar answered Oct 10 '22 15:10

Ali


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

like image 21
CodeToLife Avatar answered Oct 10 '22 16:10

CodeToLife