Android 获取 NN 以上的精确高度

发布于 2024-11-30 07:33:19 字数 174 浏览 2 评论 0原文

我如何获得我所在位置的实际(精确~1m)高度?

我尝试注册一个 LocationListener,接收海拔高度,但这不能正常工作,甚至不准确。我在 NN 上方大约 400m 处,它显示 7m。

结果:正如我所认为的,GPS 并不是一个好的高度提供者。

您对如何获得这个高度有什么想法吗?

How do i get the actual (accurate ~1m) height of my location?

Ive tried registering a LocationListener, receiving the Altitude, but that does not work fine or even accurate. Im around 400m above NN and it displays 7m.

As result: GPS is not a good height-provider as i assume.

Do you have any ideas how to obtain this height?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

白衬杉格子梦 2024-12-07 07:33:19

大概您请求的是 LocationManager,而不是 LocationListener,并使用 getAltitude() 来获取您的高度。

GPS/GNSS 在高度上的表现不如在经度和纬度上的好,但为了合理修复,您应该在正确高度的 10m 范围内。请注意,高度会根据大地水准面进行调整(http://en.wikipedia.org/wiki/Geoid )和基准面 ( http://en.wikipedia.org/wiki/Datum_(geodesy) )在使用中,与您的预期相比,这可能会改变您报告的高度,

但您可能会通过实际上不是 GPS 的位置提供商提供您的位置 - 它可能是基于手机信号塔,或者是由于航位推算或 WiFi。或者您使用的 Android 手机可能有一个糟糕的 GPS 集成设计,这会影响您的准确性,

我建议您下载一个测试应用程序,例如 GPS Test(请参阅https://market.android.com/details?id=com.chartcross .gpstest&hl=en ),它将显示您是否有修复,以及 GPS 实际报告的高度。 GPS 测试应用程序底部的第三个框显示高度、航向和速度值。对于每个修复。

Presumably you requested a LocationManager, not a LocationListener, and getAltitude() to obtain your height.

GPS/GNSS is not as good at altitude as it is at longitude and latitude, but for a reasonable fix you should be within 10m of the correct altitude. Note that altitude is adjusted for the geoid ( http://en.wikipedia.org/wiki/Geoid ) and the datum ( http://en.wikipedia.org/wiki/Datum_(geodesy) ) in use, which can alter your reported height compared to what you are expecting.

But you may be getting your location provided by a location provider that isn't actually GPS - it could be cell tower based, or due to dead reckoning or WiFi locationing. Or perhaps the android phone you are using just has a bad GPS integreation design that is messing with your accuracy.

I would recommend downloading a test application such as GPS Test ( see https://market.android.com/details?id=com.chartcross.gpstest&hl=en ) which will show you if you have a fix, and what altitude is actually being reported by your GPS. The third box on the bottom of the GPS Test app shows altitude, heading and velocity values for each fix.

﹉夏雨初晴づ 2024-12-07 07:33:19

如果您有 GPS、气压计和数据连接,则可以将 GPS 位置发送到多个天气 API 之一以获取本地气压计设置 (p0)。如果 p1 是压力传感器的值,则 SensorManager.getAltitude(p0, p1) 将为您提供非常准确的高度。

我认为海拔高度的精度不会达到 1 米,但它与您所希望的精度差不多。

这个 SO 问题/答案讨论了天气 API:
海平面压力和温度计算

If you have a GPS, barometer, and data connection, you can send the GPS location to one of several weather APIs to get the local barometer setting (p0). If p1 is the value from the pressure sensor then SensorManager.getAltitude(p0, p1) will give you a very accurate altitude.

I don't think the altitude will have 1 meter accuracy, but it is about as accurate as you can hope for.

This SO question/answer discuses weather APIs:
Sealevel Pressure and Temperature Calculation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文