计算高度在那里正在举行我的手机我的、在那里、高度、手机

2023-09-07 11:39:43 作者:兔子牙.

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

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.