<?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>Memory Leak &#187; GPS</title>
	<atom:link href="http://www.foobert.com/blog/tag/gps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foobert.com/blog</link>
	<description>That which fades into the ether.</description>
	<lastBuildDate>Sat, 26 Nov 2011 20:49:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Motorcycle riding leads to coding</title>
		<link>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/</link>
		<comments>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 08:15:02 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Flying]]></category>
		<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[motorcycle]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=213</guid>
		<description><![CDATA[<p>Got a quick ride in today &#8212; 112 miles.  Quickly coming up on the 1K mile mark on the odometer.</p>
<p>First time taking the new bike up highway 9. Must have had half a dozen riders signal to warn that the police were up ahead; this part of the ride was none too spirited.</p>
<p>152 from Watsonville [...]]]></description>
			<content:encoded><![CDATA[<p>Got a quick ride in today &#8212; 112 miles.  Quickly coming up on the 1K mile mark on the odometer.</p>
<p>First time taking the new bike up highway 9. Must have had half a dozen riders signal to warn that the police were up ahead; this part of the ride was none too spirited.</p>
<p>152 from Watsonville over Hecker pass was loads of fun, even if the road was a bit rough in spots. After the left turn northward toward, Uvas road was also very interesting. I truly enjoy the ride up these &#8220;hidden&#8221; valley roads that most folks don&#8217;t realize exist so close to their suburbs.</p>
<p> <iframe src="http://foobert.com/linked/2009/bouldercreek_watsonville.html"  width="800" height="600" marginwidth="0" marginheight="0" scrolling="no" frameborder="0"><br />
<a href="/linked/2009/bouldercreek_watsonville.html" mce_href="/linked/2009/bouldercreek_watsonville.html">Click here for the map</a></iframe><br />
</p>
<p>Got tired of hand-editing the GPX files to merge the routes. Started to write a sed script to do it for me, but, just had all kinds of trouble trying to get the version of sed that ships with Mac OS X to insert a newline &#8212; which a quick search of &#8216;sed newline&#8217; reveals that perhaps sed doesn&#8217;t much like to do this any case. So, scratched some rust off my once budding Python and decided to learn how to do a regular expression with it.</p>
<p>And for the first time with Python, it underwhelmed me. The simplicity of a regex is burdened by the fact that (I only now realized) Python doesn&#8217;t have any in-built regex abilities;  I just assumed it did, and it would work like Perl. It most certainly does not:</p>
<blockquote>
<pre>#! /usr/bin/python</pre>
<pre>import sys
import re</pre>
<pre>if len(sys.argv) &lt; 3:
  print "usage:"
  print "  gpx.py &lt;gpx input file&gt; &lt;output file name&gt;"
  sys.exit(1)</pre>
<pre>f_read  = open(sys.argv[1], 'r')
f_write = open(sys.argv[2], 'w')

for line in f_read:
  p = re.compile('&lt;wpt.*/wpt&gt;')
  line = p.sub('',line)</pre>
<pre>  p = re.compile('&lt;trk')
  line = p.sub('\n&lt;trk',line)</pre>
<pre>  p = re.compile('&lt;/trkseg')
  line = p.sub('\n&lt;/trkseg',line)</pre>
<pre>  p = re.compile('&lt;time&gt;.*&lt;/time&gt;')
  line = p.sub('',line)</pre>
<pre>  p = re.compile('&lt;trk.*37\.3[0,1,2].*-121.8[8,9].*/trkpt&gt;\n')
  [line,count] = p.subn('',line)
  print "Removed", count," points from the track"</pre>
<pre>  f_write.write(line)</pre>
<pre>f_read.close()
f_write.close()
sys.exit(0)</pre>
</blockquote>
<p>Which does the following:</p>
<ol>
<li>Removes all waypoints from the file.</li>
<li>Adds newlines in front of some key xml tags which makes it trivial to merge multiple tracks together using a text editor</li>
<li>Removes the timestamp from each track data point</li>
<li>Removes any data point that are near my house</li>
</ol>
<p>All simple stuff, but tedious to do on the XML source file that has no line feeds as generated from the Garmin Nuvi GPS.</p>
<p>With the munged GPX file, this is uploaded to the very handy <a href="http://gpsvisualizer.com/" target="_blank">GPSVisualizer.com</a> site that dumps the track into the map you see above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Watsonville Ride</title>
		<link>http://www.foobert.com/blog/2009/02/08/watsonville-ride/</link>
		<comments>http://www.foobert.com/blog/2009/02/08/watsonville-ride/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 16:55:17 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[motorcycle]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[rides]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=208</guid>
		<description><![CDATA[<p>I&#8217;m starting to get the hang of pulling files of the gps and saving the tracks I want to a web page. Once I have the system nearly automated, I&#8217;ll share it here.</p>
<p></p>
<p>Suffice it to say, much fun on ~125 miles of mostly wet roads that I&#8217;m sure were quite slick in spots due to tree [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to get the hang of pulling files of the gps and saving the tracks I want to a web page. Once I have the system nearly automated, I&#8217;ll share it here.</p>
<p><a href="http://foobert.com/linked/2009/watsonville.html"><img src="http://www.foobert.com/blog/wp-content/uploads/2009/02/watsonvile.jpg" alt="watsonvile" title="watsonvile" width="428" height="484" class="alignnone size-full wp-image-209" /></a></p>
<p>Suffice it to say, much fun on ~125 miles of mostly wet roads that I&#8217;m sure were quite slick in spots due to tree detritus and the occasional patch of mud and gravel; never tested the limits of said same, fortunately. There was even a few departures from tarmac.  </p>
<p><a href="http://foobert.com/gal/main.php/v/projects/cycle_trips/watsonville/?g2_highlightId=19149"><img alt="" src="http://foobert.com/gal/main.php?g2_view=core.DownloadItem&#038;g2_itemId=19151&#038;g2_serialNumber=2" title="Dirt Roads" class="alignnone" width="640" height="480" /></a></p>
<p>As an added benefit of the ride, the new bike got it&#8217;s 600 mile service done, but it really needs wash now.<br />
<a href="http://foobert.com/gal/main.php/v/projects/cycle_trips/watsonville/?g2_highlightId=19149"><br />
Full pictures here.</a></p>
<p><a href="http://foobert.com/linked/2009/watsonville.html">Interactive track here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/02/08/watsonville-ride/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great day for a ride</title>
		<link>http://www.foobert.com/blog/2009/02/02/great-day-for-a-ride/</link>
		<comments>http://www.foobert.com/blog/2009/02/02/great-day-for-a-ride/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 08:52:05 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[motorcycle]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[rides]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=192</guid>
		<description><![CDATA[<p>While most of the masses were watching the Super Bowl, I took advantage of the empty roads and put a 115 miles or so on the cycle. While the miles weren&#8217;t huge, it was 3+ hours in the saddle and I wasn&#8217;t uncomfortable at the end and could have easily kept on going. Doesn&#8217;t sound like [...]]]></description>
			<content:encoded><![CDATA[<p>While most of the masses were watching the Super Bowl, I took advantage of the empty roads and put a 115 miles or so on the cycle. While the miles weren&#8217;t huge, it was 3+ hours in the saddle and I wasn&#8217;t uncomfortable at the end and could have easily kept on going. Doesn&#8217;t sound like much, but, that 10-day Oshkosh trip in July isn&#8217;t going give me the luxury of stopping every hour.</p>
<p><a href="http://www.foobert.com/linked/2009/calaveras.html">Click on the map</a> to go interactive.</p>
<p><a href="http://www.foobert.com/linked/2009/calaveras.html"><img class="size-full wp-image-194 alignnone" title="calaveras_loop" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/calaveras_loop.jpg" alt="calaveras_loop" width="500" height="601" /></a></p>
<p>More after the break &#8230;</p>
<p><span id="more-192"></span></p>
<p><a href="http://foobert.com/gal/main.php?g2_view=map.ShowMap&amp;g2_Mode=Normal&amp;g2_Group=&amp;g2_album=Calaveras-Palomares+Loop" target="_blank">Click here</a> for a map of all photo locations.</p>
<p>The green of spring is incredible right now. Smoggy San Jose, is, well, ugly.</p>
<p><img class="alignnone size-full wp-image-200" title="Lush Hills" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0683.jpg" alt="Lush Hills" width="667" height="500" /></p>
<p>But, the tarmac was nice, and I&#8217;d never ventured up this stripe heading up the hills on Sierra Rd from the Berryessa exit.</p>
<p><img class="size-full wp-image-201 alignnone" title="Sierra Rd" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0681.jpg" alt="img_0681" width="667" height="500" /></p>
<p>Sierra Rd quickly turns into a 1.5 lane road, and was very quiet. Here&#8217;s the the last shot before turning north towards Calaveras reservoir.</p>
<p><img class="alignnone size-full wp-image-199" title="Sierra Rd Canyon" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0684.jpg" alt="Sierra Rd Canyon" width="667" height="500" /></p>
<p>Calaveras Reservoir needs some more rain&#8230;</p>
<p><img class="alignnone size-full wp-image-197" title="Calaveras Dam" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0691.jpg" alt="Calaveras Dam" width="667" height="500" /></p>
<p>I&#8217;m always amazed at how quickly you go from strip malls and track homes to range land and cows. This was north of Livermore on Collier Canyon Rd.</p>
<p><img class="alignnone size-full wp-image-196" title="North of Livermore" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0692.jpg" alt="North of Livermore" width="667" height="500" /></p>
<p>And this little road tucked into a valley between the east bay hills and Pleasanton was quite fun, despite the 25-35 MPH speed limit. The fact that it was deserted made it all too easy to violate said postings. While it was 65-70°F elsewhere on the ride, this valley was a chilly 45°.</p>
<p><img class="alignnone size-full wp-image-195" title="Palamares Rd" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/img_0695.jpg" alt="Palamares Rd" width="667" height="500" /></p>
<p>And, my camera batteries died, but, Morrisson Canyon Rd was the gnarliest, narrow stripe of tarmac I&#8217;ve seen in a long while. If two cars met in opposing directions, one of them is literally going to have to back-up for a mile before they can pass.</p>
<p><img class="alignnone size-full wp-image-193" title="morrison_canyon" src="http://www.foobert.com/blog/wp-content/uploads/2009/02/morrison_canyon.jpg" alt="morrison_canyon" width="500" height="351" /></p>
<p><a href="http://foobert.com/gal/main.php/v/projects/cycle_trips/calaveras_loop/">All photos can be found in the gallery, complete with map location of where they were taken</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/02/02/great-day-for-a-ride/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheeky GPS Routing</title>
		<link>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/</link>
		<comments>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 10:21:48 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[Random Silliness]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[jerks]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=182</guid>
		<description><![CDATA[<p>Recently purchased a Garmin Nuvi 760 GPS for the car/motorcycle. All in all, it&#8217;s lived up to expectations and does the advertised job. But, it&#8217;s not without quirks and annoyances.</p>
<p>It came with a 3-month teaser introduction to the Clear Channel FM traffic service which allows the GPS to &#8220;intelligently&#8221; determine how bad traffic is and reroute [...]]]></description>
			<content:encoded><![CDATA[<p>Recently purchased a Garmin Nuvi 760 GPS for the car/motorcycle. All in all, it&#8217;s lived up to expectations and does the advertised job. But, it&#8217;s not without quirks and annoyances.</p>
<p>It came with a 3-month teaser introduction to the Clear Channel FM traffic service which allows the GPS to &#8220;intelligently&#8221; determine how bad traffic is and reroute to find the fastest path to your destination. Sounds all well and good, until I actual found some traffic this weekend.</p>
<p>There was a section of &#8220;slow-n-go&#8221; for a few miles along I880 north while making my way from San Jose to Albany.  Normally, 880 would be the preferred route all the way. But, at Hayward, it commanded the following departure:</p>
<p><img class="size-full wp-image-183 alignnone" src="http://www.foobert.com/blog/wp-content/uploads/2009/01/cheeky_gps_routing.jpg" alt="Cheeky GPS Routing" width="536" height="753" /></p>
<p>The blue path is our track. Note the departure from the freeway, only to return right back onto 880!  Yes, the GPS&#8217;s grand idea to route around the traffic was poach the off-ramp and then merge right back into traffic!</p>
<p>And suddenly, I was <em>THAT</em> person that so infuriates me. The one that zooms up the right lane on I5 and cuts you off just before rear-ending the semi-truck that everyone else in the left lane is patiently waiting in line to pass.  The one that tail gates you for a mile, changes lanes 3 different times attempting to weave around you only to end-up back on your ass again, because, yes, in fact, you are <em>actually</em> going faster than everyone else. The one that uses the on/off ramps to pass people &#8212; it&#8217;s just not polite, and Garmin&#8217;s programmers think it&#8217;s a good idea!</p>
<p>As if that wasn&#8217;t bad enough, later in the trip, it sent me off the road again to a stop-light intersection in order to route around traffic that didn&#8217;t exist.  Yes, it was there an hour prior when we started the trip, but had since flushed out while en route.  We were very near our destination so I assumed it was time to exit the freeway &#8212; but then it wanted us right back on it again, only to exit for real a mile down the road.  It clearly showed there was no traffic in our vicinity, yet, it wasn&#8217;t smart enough to note the change in conditions and update the route.</p>
<p>So, lesson learned &#8212; if you don&#8217;t look ahead at the next 3 turns when it wants you to depart the freeway, good chance it&#8217;s doing you no favors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

