如何计算从静止状态垂直方向上手机的运动? [英] how to calculate phone's movement in the vertical direction from rest?

查看:159
本文介绍了如何计算从静止状态垂直方向上手机的运动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用Android操作系统的,我需要知道我怎么能计算垂直方向上的设备最多的移动的应用程序。

I am developing an app using android OS for which I need to know how can I calculate the movement of the device up in the vertical direction.

例如,该装置处于休息状态(A点),用户捡起来,拿在手里(B点),现在有A点和B点之间的高度变化,如何将我计算出?

For example, the device is at rest (point A), the user picks it up in his hand (point B), now there is a height change between point A and point B, how would i calculate that?

我已经通过有关传感器和加速度计的文章了,但我真的不能找到任何帮助我的。任何人有什么想法?

I have already gone through the articles about sensors and accelerometers, but I couldn't really find anything to help me with that. Anyone have any ideas?

推荐答案

如果您集成加速度两次,你得到的位置,但错误的是可怕的。它是在实际中没有用。下面是一个解释为什么(谷歌技术讲座) 23:20。我强烈推荐这部影片。

If you integrate the acceleration twice you get position but the error is horrible. It is useless in practice. Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.

现在,你什么都不需要准确,这是一个不同的故事。在线性加速度是传感器融合后可用,如视频介绍。见Sensor.TYPE_LINEAR_ACCELERATION在 SensorEvent 。我先试试高通滤波器检测的线性加速度突然增加沿垂直轴

Now, you do not need anything accurate and that is a different story. The linear acceleration is available after sensor fusion, as described in the video. See Sensor.TYPE_LINEAR_ACCELERATION at SensorEvent. I would first try a high-pass filter to detect sudden increase in the linear acceleration along the vertical axis.

我不知道它是否有利于你的应用程序。

I have no idea whether it is good for your application.

这篇关于如何计算从静止状态垂直方向上手机的运动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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