[英]How do I get the most Accurate Altitude for Android Devices
I am coding a Fitness tracking App right now.我现在正在编写一个健身追踪应用程序。 Therefore I want to use the Altitude.
因此我想使用海拔高度。 I know I can get the Altitude via GPS, but this seems far away from being accurate.
我知道我可以通过 GPS 获得海拔高度,但这似乎远非准确。 I already tried my app on several devices and all of them had problems with their altitude.
我已经在几台设备上试用了我的应用程序,但它们的海拔高度都有问题。 Thanks for your help.
谢谢你的帮助。
There seems to be a google maps api, Google Maps Elevation API, which seems to provide the data you need, but apparently it does need a billing account associated, not sure if thats a possibility.似乎有一个 google maps api,Google Maps Elevation API,它似乎提供了您需要的数据,但显然它确实需要关联的计费帐户,不确定是否有可能。 But I would expect a company like Strava to use something like this, it seems pretty legit and accurate.
但我希望像 Strava 这样的公司会使用这样的东西,它看起来非常合法和准确。
You make request:您提出要求:
https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034&key=YOUR_API_KEY
and get something like this JSON back:并得到类似 JSON 的东西:
{
"results" : [
{
"elevation" : 1608.637939453125,
"location" : {
"lat" : 39.73915360,
"lng" : -104.98470340
},
"resolution" : 4.771975994110107
}
],
"status" : "OK"
}
https://developers.google.com/maps/documentation/elevation/start https://developers.google.com/maps/documentation/elevation/start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.