开发者

how to detect iphones loss of velocity

开发者 https://www.devze.com 2022-12-16 10:32 出处:网络
How can you use the accele开发者_如何转开发rometer to detect if the phone has come to a halt.

How can you use the accele开发者_如何转开发rometer 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消