GPS Track Cleansing

Feb. 10, 2018 | tags: GPS

I carried my GPS logger around and took some GPS logs. Now it's time to view them.

As my logger records everything sent from GPS receiving module without filtering, logs have some apparent outliers as shown in the image (A) below. Watch slant lines. In fact, outliers are at coordinate (N0, E0).

Just for your information, I use Kashmir 3D as NMEA viewer. It's a great tool, though its English version seems long abandoned. Track color in the image is based on velocity, but is customizable.

GPS track with outliers
(A) GPS track with outliers

Outliers removed
(B) Outliers removed

Manually removing each outlier is cumbersome, but luckily, simply converting NMEA into GPX with GPSBabel eliminates them. See the image (B) above and command line is below.

gpsbabel -i nmea -o gpx INFILE OUTFILE

Removing noise

Noise in GPS track
(C) Noise in GPS track

However, there still are some noise when zoomed. Look at the image (C) on the right.

This part was parking at the lowest part of the log, taking some walk north, and then having lunch in a restaulant. GPS track while staying in the restaulant wanders around.

I tried to eliminate them with GPSBabel setting higher cutoff for HDOP value or number of satellites but found neither was effective.

My current conclusion is that these small noise are inherent to GPS log. To tell a measured position is not good, we need to know correct position, but if we know the correct position we can use it instead of the measured. If you dare to eliminate this kind of noise, manual editing is the way.

If you are still interested in automatically eliminating bad data from GPS log, the following Q&A might be a good starting point.