I'm building a software application that uses GPS for a purpose related to roads.

I'd like to know how many decimal places of GPS data should be stored to provide measurements that are accurate to within a few feet?


The circumference of the earth is about 25,000 miles [40,075 km], or 131.5 Mfeet. That divided by 360 is 365 kfeet/degree [111.3 km/degree]. A degree value with 4 decimal places has a implied accuracy of 0.00005 deg, or 18 feet [5.5 m]. That's roughly the accuracy of a typical consumer grade GPS anyway, so there is little point going farther. If you have a special (and expensive) surveying grade GPS, then you can use 5 decimal places and get about 1.8 foot [0.5 m] numerical accuracy. Each extra digits reduces the numerical error by a factor of 10. Degrees with 6 fraction digits would be specifying location to about 2 inches [about 5.5 cm].

Note that the above was assuming the worst case where the 360 degrees are spread out over the entire circumference of the earth. That is true for longitude at the equator, and latitude everywhere. The numeric accuracy of longitude is what is computed above scaled by the cosine of the latitude.

  • 1
    $\begingroup$ I would love to see this answer edited for the units to appear in metric too! $\endgroup$
    – gromain
    Feb 23 '15 at 7:22

There are some complicated maths to calculate distances from GPS coordinates. The actual distance per degree (latitude and longitude are degrees) varies depending on where you are on the planet.

However, you only need to know the maximum distance per degree anywhere on Earth. According to this wikipedia page this distance is just under $112km$.

So to store values accurate to $1m$, you need to store to a precision of $1/112000$, which is $0.00000893$. So storing six decimal places should give you the precision you need.

  • $\begingroup$ You fixed the meter versus kilometer problem, but you're still off by a factor of 2. $\endgroup$ Feb 21 '15 at 22:31
  • $\begingroup$ @OlinLathrop I see your point, it depends if you want a value accurate "to the nearest n meters" or accurate "within ±n meters" - 5 decimal places will get you to the nearest 1.12m (i.e. within ±0.56m), 6 decimal places will get you to the nearest 11.2cm (i.e. within ±5.6cm). I think of this in quantized terms, so "accurate to a resolution of ..." :) $\endgroup$
    – jhabbott
    Feb 25 '15 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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