# Managing error with GPS routes (theoretical framework?)

I'm looking for the appropriate theoretical framework or speciality to help me deal with understanding how to deal with the errors that the GPS system has - especially when dealing with routes.

Fundamentally, I'm looking for the requirements on the data and any algorithms to use to be able to establish the length of a trail. The answer needs to be trustworthy.

A friend of mine was the race director of a race which was billed as 160km but the Garmin watches everybody has makes it more like 190km+. It caused quite some grief at the finish line, let me tell you!

So my friend went back to the course with various GPS devices in order to remap it and the results are interesting.

Using a handheld Garmin Oregon 300 she got 33.7km for one leg. For the same leg on a wrist watch Garmin Forerunner 310xt it came out to 38.3km.

When I got the data from the Oregon it was obvious that it was only recording data every 90 seconds or so. The Forerunner does it every couple of seconds.

When I plotted the data from the Oregon I could see that it got confused by some switchbacks and put a line straight through them and a curve was made a little less.

However, I muse that the difference in the recording frequency is much of the explanation. i.e. by recording every couple of seconds the Forerunner is closer to the real route. However, there will be an amount of error because of the way GPS works. If the points recorded are spread around the real route randomly (because of the error) then the total distance will be larger than the real route. (A wiggle line going either side of a straight line is longer than the straight line).

So, my questions: 1. Are there any techniques I can use on a single dataset to reduce the error in a valid way? 2. Does my theory about the difference in recording frequency hold water? 3. If I have multiple recordings of the same routes are there any valid techniques to combine them to get closer to the real route?

As I say, I don't really know what to search for to find any useful science about this. I'm looking for ways to establish just how long a given piece of trail is and it is very important to people. An extra 30km in a race is an extra 5+ hours we weren't expecting.

As requested here is some sample data:

Detailed high-frequency sample data

Low-frequency sample data

Thanks for any advice you can give.

• Do you have a the raw data from the GPS devices? If so, you might consider sharing it here and we might be able to give some more explicit answers. Sep 8, 2010 at 19:59

This is a well studied problem in geospatial science--you can find discussions of it on GIS forums.

First, note that the wiggles do not necessarily increase the route's length, because many of them actually cut inside curves. (I have evaluated this by having an entire classroom of students digitize the same path and then I compared the paths.) There really is a lot of cancellation. Also, we can expect that readings taken just a few seconds apart will have strongly, positively, correlated errors. Thus the measured path should wiggle only gradually around the true path. Even large departures don't affect the length much. For example, if you deviate by (say) 5 meters laterally in the middle of a 100 m straight stretch, your estimate of the length only goes up to $2 \sqrt{50^2 + 5^2} = 100.5$, a 0.5% error.

It is difficult to compare two arbitrary paths in an objective way. One of the better methods, I believe, is a form of bootstrapping: subsample (or otherwise generalize) the most detailed path you have. Plot its length as a function of the amount of subsampling. If you express the subsampling as a typical vertex-to-vertex distance, you can extrapolate a fit to a zero distance, which can provide an excellent estimate of the path length.

With multiple recordings, you can create a 2D kernel smooth of each, sum the smooths, and subject that to a topographic analysis to look for a "ridgeline." You won't get a single connected line, usually, but you can often patch the ridges together into a continuous path. People have used this method to average hurricane tracks, for example.

• Firstly, would you be able to point me at the GIS forums where you've seen this dicussed? When it comes to sub-sampling I take it you mean sampling from the existing (sampled) data. By extrapolating a fit what kind of fit are you talking about? Lastly, I don't think the 2D kernel smooth approach you describe would work well for me as I would like the process to be automated. Is it not possible to directly combine both datasets and then kernel smooth them into one line? Sep 9, 2010 at 1:21
• Check out the forums (both the old and new) at esri.com. By "fit" I mean any reasonable (nonlinear) fit to the points. A direct combination of two paths is highly problematic. It would be tempting to just intersperse the union of all GPS readings in the two tracks, but there is no obvious unique way of connecting them up or of averaging them out somehow. That's the basic problem to be solved here and I'm not aware that anybody actually has a general-purpose solution.
– whuber
Sep 9, 2010 at 13:03
• very interesting. can i ask you a reference on works on hurricane tracks? Jun 23, 2013 at 2:11
1. Within a single dataset you can smooth the results, but this is not always a reduction in error (a consistent bias is appealing when viewing a trajectory or continuous time series from a single receiver).

2. Yes, higher frequency samples can lead to better performance if the device actually observes at higher frequencies. At this level of comparison, chipsets, firmware, and low-level filtering can differentiate cheap GPS modules.

Consider using professionally surveyed measurements for your ground-truth path calculations. Ortho-aerial imagery (like on google maps) must maintain close registration to reality than a GPS wristwatch. Use those tools to find the 2d distance rather than one or two experiments using a low-cost gps module on a wristwatch with a poor antenna.

In the case the route is not predefined, please state such in the question, otherwise it is incomplete.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5517994165420532, "perplexity": 830.5077848313913}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030334528.24/warc/CC-MAIN-20220925101046-20220925131046-00273.warc.gz"}