1
votes

I am using the accelerometer data to detect whether the phone is moving forward or backward. Assuming that the phone is held vertically parallel to the person's body, can we detect whether the phone is moving forward or backward while the person is moving?

Axis Direction

Known parameters are:

Linear acceleration along all the three axes.

Ideally, Acceleration values should turn out to be positive when moving backward and negative while moving forward. But observing the values, it does not seem so. Is considering only acceleration about 'z' axis wrong?

Referred Questions:

Detect device forward backward movement => How do we create a direction vector and what is the need to monitor x-axis too?

1
Is walking acceleration what you want to find through GPS readings?treecon
No i just want to detect whether the phone is moving forward or backwardSakala Bhargava Ram
Accelerometer detect acceleration when speed is not changing you need other sensor (e.g. GPS). Try improve your knowledge of physics.IvanH

1 Answers

2
votes

You cannot assume, that you only have movement on z axis (be it now negative or positive, depending on starting or stopping), as the person will necessarily also move the phone (a little) to the side (x negative and positive) and up or down (y positive and negative) with each step. But the acceleration in z negative or positive should be a little stronger with each step. I'd calculate the means of around 10 to 20 steps before being 'sure' - better combine it with gps data.