iPhone 加速度计确定运动 [英] IPhone Accelerometer Determine Motion
问题描述
使用加速度计输出,我如何确定用户(装在腰部的 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屋!