Apps Accelerometer Problem.

Hi Friends,

I am doing some stuff with accelerometer. I am able to access this sensor using Sensor Listener service.As you all know it gives three values X,Y and Z. Now what this values are.
I got some info from google. But still I am not sure about it.

Can anyone elaborate those three values to me? I want to detect that user is walking or not? I want to detect the distance the user has walked.

Please Help.
 

dimiter

Newbie
No, it values is linerar accelerations witout earth gravity. So, if devise lie in surface, it make the reaction force (RF). RF=-gravity. Accelerometer calculate this force. If user is walking (speed of device changed), values has changed too. You can integrate it values and get device speed in any time. You can get moving distanse (get integral of speed).
Math workflow:
1)Get accelerometer values
2)Calculate total accelerate: T=sqrt(x*x+y*y+z*z)
3)Get additional total accel. : A=T-gravityEarth (also, gravity_earth is total accelerate, if device don't move)
4)Integrate A and get speed
5)Integrate speed and get distanse
 

dimiter

Newbie
Physics also states that when an object has a constant velocity, it's acceleration is zero.
Yes, but accelerometer detecting all forces without (!) gravity force. If device sits on surface, then
(RF+Rubbing force)=-gravity force and total acceleration is 0. But for acceleromets situation looks otherwise: it don't detect gravity force and calculate only other forces, that != 0.

Look at this 2D draw for undestrand accelerometer values meaning:
http://i5.pixs.ru/storage/6/6/6/accelerome_1421189_2958666.jpg
 

dimiter

Newbie
Hah, so you are really looks very stupid, because now i am developing app, what calculate inclination angles with my theory. Functional part is developed, it need improve style only. You can download it:
Accel7.apk
 
Top