计算高度在那里正在举行我的手机 [英] Calculate height where my phone is being held

查看:184
本文介绍了计算高度在那里正在举行我的手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来计算地面和手机之间的高度?我以为我可以使用加速来测量高度,但这帖子建议你不要使用它考虑到误差率。如果是的话,我应该采取什么方法来衡量在我的手机保持高度?

Is there a way to calculate the height between ground and your phone ? I thought i could use accelerometer to measure height but this post suggest that you should not use it considering the inaccuracy rate. If so what approach should i take to measure the height where my phone is held ?

推荐答案

GPS是不够准确的,你得到提升到几米之内,但是这可能不是你要的东西。

GPS is accurate enough for you to get the elevation to within a few meters, but that's probably not what you're going for.

我想你可以尝试某种声纳,您确定手机的麦克风/扬声器指向正朝着与加速计地面后。你可以假设STP,这可能会引入约20%的误差。

I suppose you could try some sort of sonar, after you determine that the phone's mic/speaker is pointing straight towards the ground with the accelerometer. You could assume STP, which would probably introduce about 20% error.

您也可以告诉用户删除的东西,然后使用加速计,看看它击中地面之前应下降。也许最precise准确。这可能会占用大量的手机虽然。

You could also tell the user to drop the thing, and use the accelerometer to see how long it falls before hitting the ground. Probably the most precise and accurate. This might use up a lot of phones though.

这篇关于计算高度在那里正在举行我的手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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