如何获得气压高度在Android中?气压、如何获得、高度、Android

由网友(哇塞我得了帅癌)分享简介:什么是需要计算气压高度数据?我如何获得它们,然后计算出的高度? What are the data needed for calculating barometric altitude? How do I get them and then calculate the altitude? 另外,如何准确的气压比GP...

什么是需要计算气压高度数据?我如何获得它们,然后计算出的高度?

What are the data needed for calculating barometric altitude? How do I get them and then calculate the altitude?

另外,如何准确的气压比GPS的高度?我试过的GPS,但在网络搜索小时后我找不到合适的大地水准面的库。

Also how accurate is the barometric compared to GPS altitude? I tried GPS but after searching hours in the web I cannot find a suitable Geoid library.

请纠正我,如果我有任何的概念长。

Please correct me if I got any concept long.

推荐答案

您需要使用的 pressure传感器测量pressure然后使用 SensorManager.getAltitude(浮动,浮动)调用转换的措施pressure以及参考海平面pressure以获得海拔高度。

You need to use the pressure sensor to measure the pressure then use the SensorManager.getAltitude(float, float) call to convert the measures pressure along with a reference sea level pressure to get the altitude.

棘手位作为参考pressure使用什么。这将改变与天气,并会随时间漂移。通常情况下,你会做一些校准设置这个值也可能更新它。这取决于你的使用情况什么是正确的解决方案。

The tricky bit is what to use as the reference pressure. This will change with the weather and will drift over time. Typically you would do some sort of calibration to set this values and possibly update it. It depends on your use case what the right solution is.

如果适当地校准pressure根据海拔高度是相当多的准确则基于GPS的海拔高度,特别是如果要你感兴趣的是高度的差异,而不是绝对的高度。随着对原pressure传感器的值,你可以很容易地检测抱着你想要做的GPS手机在脸上水平或手臂长度在你的头顶有点过滤。

If properly calibrated pressure based altitude is considerably more accurate then gps based altitude especially if want you are interested in is altitude differences rather than absolute altitudes. With a bit of filtering on the raw pressure sensor values you can easily detect holding the phone at face level or arms length above your head which you want do with gps.

阅读全文

相关推荐

最新文章