<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>GPSLog Labs Blog (speed filter)</title><link>http://blog.gpsloglabs.com</link><description>New features and tips for using gpsloglabs.com</description><lastBuildDate>Mon, 31 Dec 2018 22:41:38 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Cleaning up a bad GPS log file</title><link>http://blog.gpsloglabs.com/posts/cleaning-up-a-bad-gps-log-file.html</link><description>&lt;p&gt;On a run the other day, my GPS logger (an AMOD AGL3080) recorded
a really noisy signal and the resulting trace was inaccurate for
the first 10 minutes. I have no idea why it did this, the second 10
minutes were fine.&lt;/p&gt;

&lt;p&gt;The end result was a log which was almost unusable, the distance
recorded was twice what it should be and the average speed was way
off.&lt;/p&gt;

&lt;p&gt;By experimenting with the Speed Filter I was able to find a set
of filters that cleaned the log up remarkably, meaning I could
include it in my training stats after all. The
following graph and map show the discarded points and the resulting
"cleaned" data:&lt;/p&gt;

&lt;div class="p_embed p_image_embed"&gt;&lt;img alt="Screenshot-filter-before-after" height="314" src="/post_images/Screenshot-filter-before-after.png" width="313"&gt;&lt;/div&gt;

&lt;div class="p_embed p_image_embed"&gt;&lt;a href="/post_images/1Screenshot-filter-before-after.png"&gt;
&lt;img alt="1screenshot-filter-before-after" height="234" src="/post_images/1Screenshot-filter-before-after.png.scaled.500.jpg" width="500"&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;The red points are discarded by a &lt;a href="http://blog.gpsloglabs.com/manual-discard-filters"&gt;Radius
Filter&lt;/a&gt; as that section of the route goes down a lane-way where
the signal is generally very bad.
&lt;/p&gt;&lt;p&gt;The green points are discarded by the &lt;a href="http://blog.gpsloglabs.com/automatic-discard-filters"&gt;Speed
Filter&lt;/a&gt; and show how bad the signal was for the first 10
minutes.&lt;/p&gt;
&lt;p&gt;The speed is smoothed with a 10 second Speed Median filter too,
but the discard filters do the bulk of the work.&lt;/p&gt;
&lt;p&gt;I had to experiment with the Speed Filter parameters by varying
the cut-off speed until the log's distance was correct (based on
previous logs along the same route). When the cut-off
was too high, the resulting distance was still too long, and when
it was too low, too many points were discarded and it was too
short. Once the distance was right, the resulting
average speeds were reasonable enough for me to be able to use
them. As the table of before and after stats shows,
the results were pretty dramatic:&lt;/p&gt;
&lt;div class="p_embed p_image_embed"&gt;&lt;img alt="0screenshot-filter-before-after" height="224" src="/post_images/0Screenshot-filter-before-after.png" width="303"&gt;&lt;/div&gt;
&lt;p&gt;This is the most successful filtering of a log I've seen so far,
generally it's removing much smaller amounts of noise, and it's
great to know it can be this powerful. I hope some
other &lt;a href="http://gpsloglabs.com/"&gt;GPSLog Labs&lt;/a&gt; users can
get similar results too as it's very frustrating when a log of your
activity doesn't record well and is unusable.&lt;/p&gt;</description><category>discard filters</category><category>filters</category><category>position filter</category><category>speed filter</category><category>tips</category><guid>http://blog.gpsloglabs.com/posts/cleaning-up-a-bad-gps-log-file.html</guid><pubDate>Sun, 21 Feb 2010 05:24:00 GMT</pubDate></item><item><title>Automatic discard filters</title><link>http://blog.gpsloglabs.com/posts/automatic-discard-filters.html</link><description>&lt;p&gt;&lt;a href="http://gpsloglabs.com/"&gt;GPSLog Labs&lt;/a&gt; currently has 2
"discard" filters that run automatically to &lt;a href="http://blog.gpsloglabs.com/new-gps-track-filters"&gt;clean bad data
out of GPS tracks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Speed Filter&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;This filter is the easiest to understand: It will discard any
points where the speed is above a certain threshold.&lt;/p&gt;

&lt;p&gt;It has two parameters, the cutoff speed (e.g. 20 km/h for
running) and the number of points to discard either side of the
"bad" point.&lt;/p&gt;

&lt;p&gt;After the points have been discarded, the log will be
interpolated between the remaining points, hopefully giving you a
more accurate trace of your activity.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Static Navigation&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The static navigation filter will only be useful if you have a
GPS logger with a chipset that includes this "feature" and you
can't disable it (e.g. a logger using the SiRF Star III chipset
such as the AMOD AGL 3080.) More details on static
navigation can be found by reading &lt;a href="http://www.etenblog.com/2007/11/20/static-navigation-explained/"&gt;http://www.etenblog.com/2007/11/20/static-navigation-explained/&lt;/a&gt;
and &lt;a href="http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=25575"&gt;http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=25575&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Basically, in this mode (which is optimized for driving, not
walking or running), when your speed is below 5km/h the logger will
"clamp" your position on the assumption it's getting some kind of
signal "drift". When it decides you really have moved
the logged position will "jump" giving you a log that looks
something like the following:&lt;/p&gt;

&lt;div class="p_embed p_image_embed"&gt;&lt;a href="/post_images/Screenshot-static-unfiltered.png"&gt;
&lt;img alt="Screenshot-static-unfiltered" height="234" src="/post_images/Screenshot-static-unfiltered.png.scaled.500.jpg" width="500"&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Applying a simple median filter to this data doesn't really help
(see the detail below) as there are still lots of samples at the
same location:&lt;/p&gt;

&lt;div class="p_embed p_image_embed"&gt;&lt;a href="/post_images/Screenshot-static-median_only.png"&gt;
&lt;img alt="Screenshot-static-median_only" height="235" src="/post_images/Screenshot-static-median_only.png.scaled.500.jpg" width="500"&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;The static navigation filter will detect these points and remove
not just the point, but as many of the "clamped" points as it can,
giving a much better result:&lt;/p&gt;

&lt;div class="p_embed p_image_embed"&gt;&lt;a href="/post_images/Screenshot-static-detail.png"&gt;
&lt;img alt="Screenshot-static-detail" height="236" src="/post_images/Screenshot-static-detail.png.scaled.500.jpg" width="500"&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;(Note that this still needs a median filter to get the best
results.)&lt;/p&gt;

&lt;p&gt;The next post will describe the "manual" discard filters.&lt;/p&gt;</description><category>discard filters</category><category>filters</category><category>speed filter</category><category>static navigation</category><guid>http://blog.gpsloglabs.com/posts/automatic-discard-filters.html</guid><pubDate>Mon, 07 Dec 2009 05:50:02 GMT</pubDate></item></channel></rss>