Reputation:
I wanted to know what should the values of accelerometer data should be and how should they be interpreted.
I used the snippet given at, http://androidgenuine.com/?tag=accelerometer-data-android
When I run this application, my Accel-X Accel-Y Zccel-Z
readings are constantly fluctuating when I keep the phone horizontally on the table. Is it supposed to do so?
From what I read on the internet a guy said on his blog that when kept horizontally, the readings of the accelerometer should read (0,0,-1). Mine is fluctuating in less than a second.
I understand what has been told here, Accelerometer data: How to interpret?
but it doesn't answer my question.
Am I doing something wrong here in the code? If not, if this is how the readings are supposed to be, then can anyone guide me on how do I read data using my accelerometer?
Basically, I want to keep the phone on table with the app running, tap my fingers on the table ( near the phone ) and read what accelerometer readings the vibrations caused by it provided.
Can someone guide me please? Any help is much appreciated.
Upvotes: 0
Views: 7120
Reputation: 1042
Modern day smartphones have high-precision accelerometers and gyroscopes. So even the slightest movement of your phone or its surroundings can already change the accelerometer data. That's the normal behaviour.
And unless you do not use the Linear (!) Accelerometer, there will always be one dimension with a value around +/- 8-10, e.g. (-0.1234567, 0.2345678, -10.234567)
Upvotes: 0
Reputation: 12475
Fluctuation of accelerometer is normal process. It depends from your device (sensor, etc). The my Huawey S7 has very strong gitter, also i observe this situation on HTC devices.
Upvotes: 2