开发者

Android- How to determine the current speed based on acceleration changes

I have to 开发者_JAVA百科find current speed using Accelerometer in android. Is it possible? if yes give the examples.

thanks


It will be too inaccurate, but yeah, it is possible. By using a result of all the 3 forces of the 3 axes you can calculate the total acceleration per frame. Then by using the difference per frame you can calculate how much the user has accelerated.

Getting the result of all the 3 forces: sqrt(x*x+y*y+z*z);

You are better of using the GPS for determining speed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜