Ask your phone how high above sea level you are, and it'll often give you a number — but that number is frequently wrong by 10 to 50 metres, or missing altogether. Here's why.

GPS is bad at vertical, good at horizontal

GPS works by triangulating your position from satellite signals. For your horizontal position (latitude and longitude), this is genuinely accurate — often within a few metres. But for altitude, the geometry works against it: GPS satellites are mostly spread out horizontally above the horizon, not directly overhead, which makes the vertical measurement far noisier than the horizontal one.

The result: a typical phone's raw GPS altitude reading can be off by 10–50 metres, and on many browsers and devices, coords.altitude simply returns null — no reading at all.

A better approach: look up the ground instead of measuring it

Your horizontal GPS position (latitude/longitude) is reliable. So instead of trusting the device's noisy vertical GPS reading, a more accurate method is:

  1. Get your accurate lat/lon from GPS.
  2. Look up the known ground elevation at that exact point from a terrain elevation dataset (built from satellite radar surveys like SRTM).

This sidesteps GPS's weak vertical accuracy entirely — you're not measuring your altitude, you're looking up the elevation of the ground you're standing on, which is a static, well-mapped fact.

What "resolution" means in this context

Elevation datasets are a grid — SRTM data, for instance, has a grid spacing of about 30 metres. That means each elevation value represents the ground height averaged over roughly a 30m × 30m tile, not one exact GPS pinpoint. Combined with your GPS position's own accuracy (often 5–50m depending on conditions), you get two honest numbers describing how precise your reading really is, rather than a single figure with hidden uncertainty.

Check your own elevation

The free Altitude Meter does exactly this — takes your GPS position and looks up the ground elevation from a terrain map, showing both your position accuracy and the data resolution alongside the number, so you know exactly how much to trust it.