gpt4 book ai didi

android - Android GPS 定位的 getAltitude() 是如何工作的

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:07:01 25 4
gpt4 key购买 nike

你好

我尝试实现一个简单的 GPS 跟踪器。因此使用

lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, this);

然后我用了

public void onLocationChanged(Location location) {

读取我当前位置的高度的方法。

但我真的不知道 Location.getAltitude() 返回什么。该文件说它返回高度。但这是以米为单位吗?还是脚?如果我 Handlebars 机放在旁边的 table 上,这个值会在 500 到 -500 之间变化??

这究竟是如何工作的???

最佳答案

您获得的高度值以米为单位,来自 the gps (WGS84) reference ellipsoid而不是来自 geoid .

根据我自己的经验,GPS 在高度值方面确实很糟糕。

我是在 GPS Status 上读到的常见问题:

GPS does not report the height above the mean sea level, rather the GPS system compares the height to the WGS84 reference ellipsoid which may be above or below the actual sea level. In different parts of the earth it can be off by more than 200 meters (depending on the mass distribution of Earth). For example the geoid's surface around Florida is above the mean sea level by a good 30-40 meters, which means that standing on the shore would show you -30m as altitude. This is normal, and not an error, and caused by the fact that the altitude is relative to an artificial reference surface and not to the sea level. If you are interested in this topic, I recommend to read Mean Sea Level, GPS, and the Geoid.

关于android - Android GPS 定位的 getAltitude() 是如何工作的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2791927/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com