如何从手机获取准确的加速度计读数?
我正在开发一个游戏,我正在尝试使用加速度计来检测用户的推动量。然而,所施加的力和电话的突然停止会施加相反的力,从而抵消所施加的初始力。我们如何改进加速度计读数?截至目前,我以 500 毫秒的间隔获取读数,以获得各个轴读数的增量,但仍然无法获得正确的解决方案。有什么想法/例子/建议吗?谢谢。
I am developing a game and I'm trying to use the accelerometer to detect the amount of push by the user. However, the force applied and the abrupt stopping of the phone imposes an opposite force thus nullifying the applied initial force. How do we refine the accelerometer readings? As of now, I'm getting the readings from an interval of 500 ms to get a delta of the various axis readings but still not able to get a proper solution. Any ideas/examples/suggestions? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您阅读 Windows Phone 团队博客上的加速计文章。它涵盖了诸如平滑加速度计输入之类的实际问题:
I would suggest you read the Accelerometer article on the Windows Phone Team blog. It covers practical issues such as smoothing accelerometer input: