1

Hi i have one small problem.

I wrote an app in which i log lat,long and alt from gps. Long and lat is quite ok but altitude is at the start more than 60m above correct one ( correct is ~275 but shows ~345). During first 1-2 minutes of logging altitude is constantly getting lower and lower till it shows correct one ( 345-> 344 -> ....-> 275->275 and so on).

Can anyone explain it to me why altitude is getting better during the time and after some time it shows good altitude during rest of the walk/ride?

szpic
  • 4,346
  • 15
  • 54
  • 85

2 Answers2

1

In order to get accurate coordinates, a GPS system should listen to at least 4 sattelites of the GPS constellation. Also, those sattelites broadcast messages that are 30 seconds long.

Since most users nowadays have some level of ADHD, a 30 seconds time to get the first fix (and a further 30 seconds more for every other fix after that) would make many project managers and device designers scream. They also want your cell phone to divine where you are even with only two or three sattelites in view - theoretically possible, but you get results with poor accuracy doing that. With three sattelites you can get an approximation, but with only two you're no better than if you were using a compass and an astrolabe.

So that's what happens: your device doesn't wait to get the whole message from the sattelites, and keeps approaching a more accurate result as more and more of the GPS message pours through. After a while, some time after the first few messages, it gets the correct fix and its stops trying to guess your coordinates.

Geeky Guy
  • 9,229
  • 4
  • 42
  • 62
  • There is much wrong in your answer, 30s for the first fix is correct, but 30s for the next is wrong. (30s is for the almanach data that you do not need to update once a second). – AlexWien May 06 '13 at 20:56
  • Time for ffrst fix is circa 7-10 seconds on my phone and i nearly always have 6 or more sats in use. And its about adhd. I can wait. I just know why its getting better through the time passing – szpic May 06 '13 at 21:32
  • @szpic The moment your phone starts listening, it should take 30 seconds to download the almanac data (see Alex's comment), at best. Either your phone is not getting a whole message and is probably inferring a lot of information, or it was listening to the sats prior to you checking your position in a map (and then those 7-10 seconds may be your apps doing some work before saying they got a fix). – Geeky Guy May 06 '13 at 21:36
  • @renan almanach can be downladed via Gsm, (A-GPS) then the device needs only some seconds. my iphone does this, android usually too. – AlexWien May 07 '13 at 11:32
1

" it shows good altitude during rest of the walk/ride?"

I doubt that altitude is good on the rest of your ride.

altitude via GPS is known to be not very usefull. The error is about twice that of horicontal (lat,lon) error. Thats the reason why professional navigation devices additionally use a barometer sensor instead of GPS altitude alone.

The reason why it gets better, is that the averaging algorithm had more time to average the errors out. On my ios devcie and i my app, the altitude jumps so much that it shows some hundreds meters ascending / descending even when I am moving level at a lake.

But you always can check the value of vertical accuracy. Use the altitude only when it gets below 30m vert. accuracy.

AlexWien
  • 28,470
  • 6
  • 53
  • 83
  • Thanks for your answer. I compare results with maps where i can find altitude of the terrain. After some time i can get results like 280m while maps shows 275. +5 is for me good result – szpic May 06 '13 at 21:37
  • Yes, But try to Sum up the altitude difference from One to next Location. On Maps heights use a different so called vertical reference. GPS uses Wgs84 ellipspoid, paper Maps uses Often Sea Level, that can differ 6 - 30m – AlexWien May 06 '13 at 22:10