Android加速度计检测高度? [英] Android accelerometer detect height?

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

问题描述

是否可以使用加速度计来检测高度?例如,如果我手上拿着手机,然后抬起手臂后检测高度?

Is it possible to use the accelerometer to detect height? For instance, if I'm holding the phone on my hand and then detect the height after raising my arm?

谢谢

推荐答案

假设您的意思是要检测手机从其起始点升高的高度,是的.android 加速度计测量力,有关如何使用它的更多信息可以在 here.请记住,加速度计并不是一个完美的设备,因此您的结果将是手机实际移动了多少的近似值.

Assuming you mean you want to detect the height the phone was raised from its staring point, yes. The android accelerometer measures force, more info on how to use it can be found here. Keep in mind that the accelerometer isn't a perfect device, and so your results will be approximations of how much the phone was really moved.

这篇关于Android加速度计检测高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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