问题
I have moto g 16 GB device from Motorola. It has LIS3DH 3 axis Accelerometer.
For reading Max and Min value of Accelerometer i have used this APIs.
getMaximumRange()
Some says its shows zero to Pick
or pick to pick
But for my device i get value 39.24
so i though 39.24 / 9.8 = ~4.00 s my range is +/- 4g
But when i simply read x,y,z data and store it in file and see the values when giving max acceleration to the my smart phone then its shows values up to 76 m/sec2
What the meaning of this?
Is this bug of my device?
how to convert this values in +- 2g values. my algorithm wants value in +-2g format how to give that?
how to perform cut of or down sampling of sensor data values ?
回答1:
moto g has dynamic configurabale senser. Initially it is configured in 4g mode. But when you gives more acceleration to your mobile it changes it sensor mode and switch to 8g and still you give more acceleration then it gest 16 g mode automatically. After some time it get back to 4g mode.
You can have on Sensocr Accurcay change callback on this range change.
来源:https://stackoverflow.com/questions/26293639/accelerometers-min-and-max-value-range-and-sensor-data-conversion