문제

How can you use the accelerometer to detect if the phone has come to a halt.

In my case iw want to use it for, i'd like to detect whether its changed direction on the same axis ( a u-turn) which would involve the device stopping.

Any ideas appreciated.

Thanks,

Sam.

도움이 되었습니까?

해결책

You can't - there is no way of knowing velocity knowing only the acceleration (no initial velocity), and even with an initial velocity, errors in the accelerometer would quickly add up to give inaccurate results.

The only real way of doing it is using the GPS.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top