iPhone加速度计确定运动 [英] IPhone Accelerometer Determine Motion

查看:169
本文介绍了iPhone加速度计确定运动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用加速度计输出,我如何确定用户(安装在腰部的iphone)是否正在行走?

Using the accelerometer output, how do I determine if the user (iphone mounted on waist) is walking?

寻找一个好的算法来确定用户是否是步行以确定活动过渡 - 站立行走或步行站立。

Looking for a good algorithm to determine if the user is walking to determine activity transitions- standing-to-walking or walking-to-standing.

请帮助。

感谢您的时间。

推荐答案

对于以前的项目,我尝试计算加速度矢量的大小,只是设置阈值约2g,在测试中效果很好。一个典型的(硬件)计步器会忽略发生超过一秒钟的单次颠簸,这似乎是一种过滤掉不是行走的偶然运动的好方法。

For a previous project, I tried calculating the magnitude of the acceleration vector, and just setting a threshold of about 2g, and that worked pretty well in testing. A typical (hardware) pedometer will ignore single jolts that happen more than about a second apart, which seems like a good way to filter out occasional movement that isn't "walking".

此外,您可以通过检查数据一段时间来自动调整阈值。

Additionally, you could automatically adjust the threshold by examining the data for a while.

这篇关于iPhone加速度计确定运动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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