I am currently developing a little application in Android which uses GPS.

When i click a button i start to record a "track". If i walk around i save my position every second into a file. This works perfectly except for one thing:

I do not only save longitude and latitude but also the current altitude. Looking through the data I recognized that the altitude jumps some times.

For example the altitude values look like this:

271.4073616670083; 271.5165709069828; 345.6; 271.58538936056465;

The values around 270 metres are quite good. Jump like these happen irregularily but quite often (every 15 seconds there ist at least 1 jump). And the values always jump up to something around 340 metres.

While recording the track with my application I have also been walking around with an app called NMEA Recorder. This app recorded the altitude values as well but they don't jump like the values I receive.

I know that the altitude values of GPS (calculated by the WGS84-Ellipsoid) aren't very accurate but that still doesn't explain why the values jumpt sometimes.

Would be nice if somebody could tell me why jumps like these happen.

  • 1
    What about the lon/lat coordinates? DO they vary as well?
    – R.K.
    Commented Dec 10, 2012 at 12:42
  • 1
    I didn't have any problems with longitude or latitude yet. It was only the altitude that jumped sometimes.
    – Siggy
    Commented Dec 10, 2012 at 15:14

3 Answers 3


Imagine several satellites spread out evenly above you. Now pick just one satellite. Visualise a sphere centered around that satellite with a radius of your exact distance from it. Do the same for every satellite in view.

What you're seeing now is a bunch of spheres that intersect exactly where you're standing. That's how a GPS reading works, essentially.

Unfortunately, these spheres intersect at more than one point. As you will see in the following image, it is possible to get a false reading depending on the VDOP. Usually, a satellite configuration that is quite low or high on the horizon will give you this reading.

enter image description here

If you want to make your application more accurate, you will need to look at the quality of the signals and (if available) DOP calculations before 'trusting' the location.

  • But then, won't the coordinates be wrong as well?
    – R.K.
    Commented Dec 10, 2012 at 12:42
  • 2
    @R.K. Depending on how the spheres intersect the bulk of the error could be vertical. Commented Dec 10, 2012 at 15:11

As an engineer having worked with GPS satellites, I can give you an explanation- it has to do with how many GPS satellites you are receiving signals from for your readings. There are 24 working satellites in the present Global Positional System and depending upon your location (inside a building, under trees, between tall buildings, etc. you will pick signals from 3 or 4 satellites. Signals from 3 satellites intersect at arc between their spheres and the elevation data may not be accurate. Signals from 4 satellites are quite accurate as they intersect at a point! Hope this helps.

  • In my company we have got some custom developed industry GPS modules and they ALWAYS give correct locations but in Android at the same time at many different devices gives sometimes JUMPING locations near the fact position. Why does it happened? Commented Dec 27, 2017 at 5:15

Yup, I know it's a really late answer but the question and answer may still be useful if anyone does a search.

If there were jumps in GPS data, you should see those in NMEA data so these jumps are almost certainly not coming from the GPS.

If you use Android Location Services (as opposed to NMEA) and you don't disable positions from WiFi and Cellular sources, what can happen is that you get GPS positions every second, but every now and then you get a position from WiFi or Cellular. WiFi positions are much less accurate than GPS positions and cellular positions are even worse, so this may give the altitude jump you are seeing. I would also expect Latitude & Longitude jumps at the same time as the Altitude jump though.

To see if this is the problem, try turning off WiFi and Cellular and log another file using your app, if the jumps disappear then you have the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.