Solution 1 :
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. But I would expect a company like Strava to use something like this, it seems pretty legit and accurate.
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:
{
"results" : [
{
"elevation" : 1608.637939453125,
"location" : {
"lat" : 39.73915360,
"lng" : -104.98470340
},
"resolution" : 4.771975994110107
}
],
"status" : "OK"
}
https://developers.google.com/maps/documentation/elevation/start
Problem :
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. I already tried my app on several devices and all of them had problems with their altitude.
Thanks for your help.
Comments
Comment posted by CommonsWare
“this seems far away from being accurate” — how have you determined this?
Comment posted by ebtjan
Well as I said I used the app on my device and I know at which Altitude I live, and the Phone was about 70 meters off… But when I use the strava fitness app the altitude is way better, so it must be possible somehow.
Comment posted by minimal reproducible example
Without a
Comment posted by Ifor
GPS is terrible for altitude in this context. Use the pressure sensor if you have one for the best you can get off a phone but there are limitations and you need a calibration strategy. Fallback to online lookup or get the appropriate .dem files.