<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ejs &#187; compression</title>
	<atom:link href="http://ejs.seniejitrakai.net/tag/compression/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejs.seniejitrakai.net</link>
	<description>a snaphot of time</description>
	<lastBuildDate>Mon, 09 Jan 2012 22:10:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Creating eye-candy from dead i-GO tracks</title>
		<link>http://ejs.seniejitrakai.net/2008/02/24/creating-eye-candy-from-dead-i-go-tracks/</link>
		<comments>http://ejs.seniejitrakai.net/2008/02/24/creating-eye-candy-from-dead-i-go-tracks/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 19:29:53 +0000</pubDate>
		<dc:creator>ejs</dc:creator>
				<category><![CDATA[Hobbies]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[GPSbabel]]></category>
		<category><![CDATA[GPSvisualizer]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://ejs.seniejitrakai.net/2008/02/24/creating-eye-candy-from-dead-i-go-tracks/</guid>
		<description><![CDATA[As, I&#8217;ve mentioned earlier, we had a pleasant trip through Italy the last summer. I have recorded the whole trip to my GPS unit using i-GO navigation program. Seems like 10 second recording intervals are fine and the track is quite precise and smooth. Unfortunately, during upgrade from WM5 to WM6 I had to reinstall [...]]]></description>
			<content:encoded><![CDATA[<p><img class="right" src='http://ejs.seniejitrakai.net/keliones/Italy/2007-08-07-e100m.thumbnail.png' alt='sample track' /></p>
<p>As, I&#8217;ve mentioned <a href="http://ejs.seniejitrakai.net/2008/02/22/lcd-screen-change-for-asus-mypal-639/">earlier</a>, we had a pleasant trip through Italy the last summer. I have recorded the whole trip to my GPS unit using i-GO navigation program. Seems like 10 second recording intervals are fine and the track is quite precise and smooth.<br />
Unfortunately, during upgrade from WM5 to WM6 I had to reinstall i-Go and all tracks just dissapeared from track list in i-GO. Stupid me, i HAD to save &#8216;igo.db&#8217; file somewhere.<br />
I found no way to put them back, so let the fun begin.<br />
A short glimpse into one of the files and..
<pre>
...
$GPGSA,A,3,04,20,13,23,31,11,,,,,,,2.0,1.2,1.6*33
$GPRMC,061120.287,A,5414.2734,N,02337.5314,E,54.08,261.55,290707,,,A*50
$GPGGA,061121.000,5414.2726,N,02337.5281,E,1,06,1.2,152.2,M,31.0,M,,0000*54
...
</pre>
<p>Hey, do You think the same way? Yes, it&#8217;s NMEA data in plain text.<br />
<span id="more-65"></span></p>
<p>Ok, the Tool &#8211; <a href="http://www.gpsbabel.org/">GPSbabel</a> is ready. It can read and write a lot of GPS data formats.  Let&#8217;s try:</p>
<pre>
$ sudo apt-get install gpsbabel
</pre>
<p>, a handy script &#8216;nmea2gpx&#8217; from <a href="http://wiki.openstreetmap.org/index.php/NMEA#Converting_NMEA_text_dumps_.28with_gpsbabel.29">here</a><br />
and let the fun begin:</p>
<pre>
$ for i in `ls *.bin`; do ./nmea2gpx $i; done
</pre>
<p>The conversion is smooth. You can discard files files up to about 400B &#8211; they usually contains only empty GPX  structure.</p>
<p>But the resulting data set is HUGE: initial data set is 182MB, the resulting GPX files uses MB.<br />
It&#8217;s fine if you need very detailed track info, but two problems arise:</p>
<ul>
<li>due to the nature of GPS it&#8217;s inaccurate, if you use the receiver in dense urban areas</li>
<li>you do not need this amount of information to create daily track or a track for the whole journey</li>
</ul>
<p>And again, let&#8217;s turn back to GPSbabel. It has a lot of filters to improve overall usability of saved data:</p>
<pre>
$ gpsbabel -i gpx -f 2007-08-07.gpx -x simplify,crosstract,error=0.002k -o gpx -F 2007-08-07-e2m.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x simplify,crosstract,error=0.005k -o gpx -F 2007-08-07-e5m.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x simplify,crosstract,error=0.01k -o gpx -F 2007-08-07-e10m.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x simplify,crosstract,error=0.05k -o gpx -F 2007-08-07-e50m.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x simplify,crosstract,error=0.1k -o gpx -F 2007-08-07-e100m.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x discard,hdop=10 -o gpx -F 2007-08-07-hdop10.gpx
$ gpsbabel -i gpx -f 2007-08-07.gpx -x discard,hdop=6 -o gpx -F 2007-08-07-hdop6.gpx

 $ ls -al *08-07*.gpx
-rw-r--r-- 1 ejs ejs 5321544 2008-02-24 20:41 2007-08-07.gpx
-rw-r--r-- 1 ejs ejs  343808 2008-02-24 21:00 2007-08-07-e10m.gpx
-rw-r--r-- 1 ejs ejs  909181 2008-02-24 20:56 2007-08-07-e2m.gpx
-rw-r--r-- 1 ejs ejs  541929 2008-02-24 20:59 2007-08-07-e5m.gpx
-rw-r--r-- 1 ejs ejs  117973 2008-02-24 21:31 2007-08-07-e50m.gpx
-rw-r--r-- 1 ejs ejs   69973 2008-02-24 21:38 2007-08-07-e100m.gpx
-rw-r--r-- 1 ejs ejs 5072358 2008-02-24 20:52 2007-08-07-hdop10.gpx
-rw-r--r-- 1 ejs ejs 4983846 2008-02-24 20:52 2007-08-07-hdop6.gpx
</pre>
<p>Summarize the above:</p>
<p><a href='http://ejs.seniejitrakai.net/keliones/Italy/2007-08-07-e100m.png' title='100 meter error, data rate reduced 75 times'><img class="right" src='http://ejs.seniejitrakai.net/keliones/Italy/2007-08-07-e100m.thumbnail.png' alt='100 meter error, data rate reduced 75 times' /></a></p>
<ul>
<li>reducing maximum allowable Horizontal Dilution of Precision (HDOP) makes almost no change to data size</li>
<li>using &#8216;crosstrack&#8217; filter and removing points maximum 50 meters away from track, reduced dataset size 10 times. Using 100 meters error reduces dataset almost 75 times, but you can see in the image and <a href="http://ejs.seniejitrakai.net/2007-08-07-e100m.html" target="_blank">here</a>, the data it is still usable.</li>
</ul>
<p>The perfect and free tool to overlay the GPX track onto the globe is <a href="http://www.gpsvisualizer.com/">GPS visualizer </a>. Use it.</p>
<p>The proposed workflow is:
<ol>
<li>download tracks the tracks you need to the computer</li>
<li>convert them to GPX</li>
<li>merge day track to single file</li>
<li>apply &#8216;crosstalk&#8217; filter with maximum error of 100 &#8211; 200 meters to the daily track file. Your goal is to get 150-500kB file, depending on the road network and conditions.</li>
<li>merge daily track files to single trip file</li>
<li>apply &#8216;crosstalk&#8217; filter with maximum error of 1 &#8211; 2 kilometers to the trip file, depending on the road network and conditions.</li>
<li>register at Google Maps to get your API key, as it&#8217;s stated in <a href="http://www.gpsvisualizer.com/faq.html">GPS visualizer FAQ</a></li>
<li>proceed your files with <a href="http://www.gpsvisualizer.com/">GPS visualizer </a></li>
<li>donate</li>
<li>enter your Google Maps API key into every saved HTML file from GPSvisualizer.com. You HAVE saved the files, have You?</li>
<li>arrange the presentation of your wanderings</li>
<li>enjoy</li>
</ol>
<pre>
$ gpsbabel -i gpx -f 2007-07-31.gpx -i gpx -f 2007-08-01.gpx -i gpx -f 2007-08-02.gpx \
 -i gpx -f 2007-08-03.gpx -i gpx -f 2007-08-04.gpx -i gpx -f 2007-08-05.gpx \
 -i gpx -f 2007-08-06.gpx -i gpx -f 2007-08-07.gpx -i gpx -f 2007-08-08.gpx \
 -i gpx -f 2007-08-09.gpx -i gpx -f 2007-08-10.gpx -i gpx -f 2007-08-11.gpx \
 -i gpx -f 2007-08-13.gpx -i gpx -f 2007-08-14.gpx -i gpx -f 2007-08-15.gpx -o gpx -F full.gpx

$ gpsbabel -i gpx -f full.gpx -x simplify,crosstract,error=0.5k -o gpx -F full-e500m.gpx
$ gpsbabel -i gpx -f full.gpx -x simplify,crosstract,error=1k -o gpx -F full-e1km.gpx
$ gpsbabel -i gpx -f full.gpx -x simplify,crosstract,error=2k -o gpx -F full-e2km.gpx
$ls -al

lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-07-31.gpx -> ../daily/2007-07-31/2007-07-31.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-01.gpx -> ../daily/2007-08-01/2007-08-01.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-02.gpx -> ../daily/2007-08-02/2007-08-02.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-03.gpx -> ../daily/2007-08-03/2007-08-03.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-04.gpx -> ../daily/2007-08-04/2007-08-04.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-05.gpx -> ../daily/2007-08-05/2007-08-05.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-06.gpx -> ../daily/2007-08-06/2007-08-06.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:38 2007-08-07.gpx -> ../daily/2007-08-07/2007-08-07.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-08.gpx -> ../daily/2007-08-08/2007-08-08.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-09.gpx -> ../daily/2007-08-09/2007-08-09.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-10.gpx -> ../daily/2007-08-10/2007-08-10.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-11.gpx -> ../daily/2007-08-11/2007-08-11.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-13.gpx -> ../daily/2007-08-13/2007-08-13.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-14.gpx -> ../daily/2007-08-14/2007-08-14.gpx
lrwxrwxrwx 1 ejs ejs        34 2008-02-26 02:39 2007-08-15.gpx -> ../daily/2007-08-15/2007-08-15.gpx
-rw-r--r-- 1 ejs ejs    186733 2008-02-26 02:59 full-e1km.gpx
-rw-r--r-- 1 ejs ejs    111056 2008-02-26 03:01 full-e2km.gpx
-rw-r--r-- 1 ejs ejs    329869 2008-02-26 02:53 full-e500m.gpx
-rw-r--r-- 1 ejs ejs 107624591 2008-02-26 02:45 full.gpx
</pre>
<p>by, the way, while processing the last two gpsbabel commands and running Xorg , KDE and Iceape as usual:</p>
<pre>
top - 02:58:54 up  6:52,  6 users,  load average: 2.66, 1.93, 1.19
Tasks: 121 total,   4 running, 117 sleeping,   0 stopped,   0 zombie
Cpu(s): 99.3%us,  0.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    516620k total,   508624k used,     7996k free,     2004k buffers
Swap:  1052216k total,   157092k used,   895124k free,    93384k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6173 ejs       25   0 86368  82m  840 R 48.9 16.3   2:59.09 gpsbabel
 6175 ejs       25   0 86372  82m  840 R 48.9 16.3   1:28.35 gpsbabel
</pre>
<p>The resulting GPS data with 1km error is presented <a href="http://ejs.seniejitrakai.net/2008/02/25/lets-go-get-lost/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejs.seniejitrakai.net/2008/02/24/creating-eye-candy-from-dead-i-go-tracks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

