Android Linear Acceleration Accuracy
Solution 1:
As far as I know, you cannot change accuracy of the hardware sensors on Android. You can only adjust sampling period with registerListener() method from SensorManager
class or monitor accuracy change with onAccuracyChanged() callback from SensorEventListener
interface.
It looks that you are retrieving sensor readings correctly in your code snippet.
I would suggest doing the following things:
- try to perform the same measurement with just one sensor and check if application behavior has changed - maybe multiple readings are causing measurement inaccuracy?
- try to run this application on a different device if you have one and verify if behavior and accuracy is different - maybe accuracy of the sensors is different on different devices?
- check accuracy and datatypes in your database and verify if it handles more accurate data correctly
If you don't notice any difference after applying mentioned suggestions, I think we cannot do anything about increasing sensor readings accuracy.
Moreover, I performed some experiments with sensors on Android some time ago using Nexus 5 and Nexus 6 and I see that different sensors has different accuracy as you also noticed. According to my knowledge, we cannot control that from the Android SDK API level.
Post a Comment for "Android Linear Acceleration Accuracy"