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?
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?