采用Android加速度计来计算距离,eleveation? [英] using Android Accelerometer to calculate distance , eleveation?

查看:1054
本文介绍了采用Android加速度计来计算距离,eleveation?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能不能确定,其中一个人即是他走?是他在电梯?还是他爬上楼梯?

can it be determined that where a person is i.e is he walking ? is he in elevator ? or is he climbing up the stairs ?

使用Android的加速度或者是有计算这样的android的任何其他方式?

using android's accelerometer or is there any other way to calculate such in android ?

推荐答案

您可以使用加速度计和数字罗盘相结合,在手机,有他们,以确定如本<一的速度和方向href="http://stackoverflow.com/questions/2950990/when-gps-is-not-available-how-to-get-notified-when-the-phone-is-in-motion">post.

You can use a combination of the accelerometer and the digital compass, in phones that have them, to determine a speed and direction as mentioned in this post.

如果你需要做的就是确定这个人是步行,所有你需要的是加速度计。刚处理其输出的脚步。

If all you need to do is determine if the person is walking, all you need is the accelerometer. Just process its output for foot steps.

有很多在网络上的教程用于检测与加速度计脚步。

There are plenty of tutorials on the web for detecting foot steps with an accelerometer.

有一个应用程序,注意事项在这里:<一href="http://www.analog.com/library/analogDialogue/archives/41-03/pedometer.html">http://www.analog.com/library/analogDialogue/archives/41-03/pedometer.html这给出了一个体面的数学背景和示例算法。它当然由你来抽取数学和改写为Android(本例code是用C)。我目前不知道,有一个脚步检测算法的一个开源的Andr​​oid库。

There an app note here: http://www.analog.com/library/analogDialogue/archives/41-03/pedometer.html that gives a decent mathematical background and an example algorithm. Its of course up to you to extract the math and rewrite it for Android (the example code is written in C). I don't currently know of an open source android library with a footstep detection algorithm.

如果您实现的东西,我想获得code,别忘了回发的结果。

If you implement something, I would like to get the code, don't forget to post back the results.

这篇关于采用Android加速度计来计算距离,eleveation?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆