IPhone Accelerometer Determine Motion

无人久伴 提交于 2019-12-05 05:49:49

问题


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.

please help.

Thank you for your time.


回答1:


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.



来源:https://stackoverflow.com/questions/651630/iphone-accelerometer-determine-motion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!