<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
	<channel>
<title>Sawdust GPS Feed</title><link>http://www.esawdust.com/blog/index.html</link><description>Projects related to GPS</description><dc:language>en</dc:language><dc:creator>landon@360vl.com</dc:creator><dc:rights>Copyright (C) 2007-2009 Landon Cox</dc:rights><dc:date>2009-10-27T08:33:57-06:00</dc:date><admin:generatorAgent rdf:resource="http://www.realmacsoftware.com/" />
<admin:errorReportsTo rdf:resource="mailto:landon@360vl.com" /><sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<lastBuildDate>Sat, 12 Apr 2008 12:05:00 -0600</lastBuildDate><item><title>Falcom FSA03 GPS Breakout</title><dc:creator>landon@360vl.com</dc:creator><category>GPS</category><dc:date>2009-10-27T08:33:57-06:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/FalcomFSA03.html#unique-entry-id-5</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/FalcomFSA03.html#unique-entry-id-5</guid><content:encoded><![CDATA[<strong><em>News Summary: ESawdust just released a breakout board for the Falcom FSA03 GPS module.</em></strong><br /><br />The FSA03 is a surface mounted device with no mounting holes.  We loved the module but needed an easy way to work with it, evaluate it, and mount it in our enclosures.   So, we made the FSA03 Breakout board for that purpose.<br /><br />It&rsquo;s now available in assembled or bare versions. <br /><br /><a href="http://www.esawdust.com/product/egps-fsa03-bkob/" rel="self" title="ESawdust Falcom FSA03 Breakout Assembled"><img class="imageStyle" alt="DSCF4078" src="http://www.esawdust.com/blog/gps/files/dscf4078.jpg" width="480" height="360"/></a><br /><br /><a href="http://www.esawdust.com/product/bkob-fsa03-gps-bare/" rel="self" title="FSA03 bare breakout board"><img class="imageStyle" alt="DSCF4030" src="http://www.esawdust.com/blog/gps/files/dscf4030.jpg" width="480" height="360"/></a>]]></content:encoded></item><item><title>The Great Pumpkin Launch - 2009</title><dc:creator>landon@360vl.com</dc:creator><category>GPS</category><category>Accelerometer</category><category>XBee Project</category><dc:date>2009-09-26T07:40:53-06:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/PumpkinGPS.html#unique-entry-id-4</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/PumpkinGPS.html#unique-entry-id-4</guid><content:encoded><![CDATA[Remember when you were a kid and your buddy built the pole vaulting pit in his backyard?  Except his was a special pole-vaulting pit.  Instead of the traditional run-and-jump-with-a-pole technique, you bail out of a tree, hook the zip line, zing across the yard, drop onto the teeter-totter and launch your friend&rsquo;s cat over the fence.  Ya, that&rsquo;s what made it special!<br /><br />Well, Jon Dory is that neighborhood kid your parents warned you about, except now he has bigger toys and a lot more stubble.<br /><img class="imageStyle" alt="jon-dory" src="http://www.esawdust.com/blog/gps/files/jon-dory.jpg" width="241" height="202"/><br /><strong><em>Jon Dory</em></strong><br /><br /><strong><em><u>How the Great Pumpkin Launch Came to Be</u></em></strong><br /><br />I met Jon through the climbing community in Colorado.  His son, Ian, and my oldest daughter, Chauncenia, are roughly the same ages and so they climb at many of the same events and it was just a matter of time before we crossed paths.   I got to know Jon at the youth climbing nationals event in SLC when I did the <a href="http://www.esawdust.com/blog/gps/blog/notreadyforprimetime/files/USACNationals09Timing.html" rel="self" title="Not Ready for Prime Time:Speed Climbing Timing Lessons Learned">speed climbing timing system</a> for the event.<br /><br />Jon&rsquo;s an engineer at HP and, it just so happens, built a life-size <a href="http://en.wikipedia.org/wiki/Trebuchet" rel="external" title="wikipedia trebuchet">trebuchet</a> and <a href="http://www.somethingfromthefarm.com/jd.wmv" rel="external" title="Trebuchet Something From the Farm">launches pumpkins with it </a>near Ft. Collins, CO.   How many of your friends can you say that about?  I have a cool buddy, no doubt!  (But that&rsquo;s not all...he also has a corn cannon and a corn maze - <a href="http://www.somethingfromthefarm.com/webstudiotriala_002.htm" rel="external" title="Something from the Farm">check him out</a>.) <br /><br />A few months ago, <a href="http://www.sparkfun.com" rel="external" title="Sparkfun">Sparkfun</a>, another cool buddy in corporate form, <a href="http://www.sparkfun.com/commerce/news.php?id=283" rel="self">launched one of their products, an accelerometer</a>, in a model rocket to measure G forces (ostensibly.)  I suspect it was actually more about drinking beer and playing with explosive charges during work hours, but my judgement is probably severely clouded by the thought of drinking beer and playing with explosives during work hours.<br /><br />I put 2 and 2 together and saw it was time for Nathan Siedle, CEO of Sparkfun, Pete Dokter, Sparkfun EE extraordinaire, creator of the accelerometer logger for Sparkfun, and Jon Dory to meet. It was high time to<strong><em> launch high-tech instruments using medieval siege engines</em></strong>.   That&rsquo;s precisely how it came to be:  <em>The Great Pumpkin Launch</em> we did this past weekend.<br /><br />Since I brokered the ensuing carnage, I figured I ought to make an entry into the event also.  Sparkfun was bringing an 18g accelerometer, Nathan, Pete, and their videographer, Christopher Rojas.  I wanted to try a different technical twist and built a wireless Pumpkin-GPS and brought my ground crew (kids.)<br /><br /><strong><em><u>The Weapon<br /></u></em></strong><br />This is Jon&rsquo;s 4th trebuchet (he says 3.5, because he started, but didn&rsquo;t finish one).  Each one got progressively larger just as big-boy toys, especially weapons, have a tendency to do.<br /><br /><img class="imageStyle" alt="Still 2" src="http://www.esawdust.com/blog/gps/files/still-2.jpg" width="480" height="270"/><br /><br />This fearsome machine can launch a 12 lb pumpkin 350 to 400 feet and a long ways up in the air - probably 8 seconds of hang-time.  (Videos later in the article.)<br /><br /><strong><em><u>The Pumpkin GPS<br /></u></em></strong><br />In a nutshell the Pumpkin-GPS consisted of a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9171" rel="external" title="Sparkfun Venus GPS">Sparkfun Venus GPS breakout board</a> with its UART tied directly to an <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9099" rel="external" title="XBee 900 Pro">XBee 900 Pro</a> so that it can send telemetry data back to a ground station and we could track its flight (ostensibly for later reconstruction - ahem - of the ultimate splat).  <br /><br /><em>Unlike the Mars rovers, our instruments didn&rsquo;t get a </em><em><a href="http://marsrover.nasa.gov/mission/spacecraft_edl_airbags.html" rel="external" title="Mars Rover Air bags">nice, cushy air-bag landing in martian gravity </a></em><em>(0.38 of earth&rsquo;s.) </em>  An average farm pumpkin and a <a href="http://clicky.me/chameleon1sfe" rel="self" title="Chameleon 1 enclosure for Pumpkin GPS">Chameleon 1 enclosure</a> were all we had to protect our valuable electronics from the near ballistic reentry after the trebuchet launch.<br /><br />My goals and questions in putting this device together were:<br /><br />1) Crash test the <a href="http://clicky.me/chameleon1sfe" rel="external" title="Chameleon 1 Enclosure">Chameleon 1 enclosure</a> and see how well it would hold up and how well it would protect the electronics (also what G forces it absorbed.)<br />2) Find out if the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9099" rel="external" title="XBee 900">XBee 900&rsquo;s</a> could keep a signal associated in-flight to the ground station while the pumpkin was rotating in-flight.  I hypothesized it would be like a satellite spinning out of control.<br />3) Find out if the GPS could maintain a lock and produce good data in-flight (again, a nasty high frequency rotation factor.)<br /><br />Here are the guts of the pumpkin GPS on the workbench - just a <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9171" rel="self" title="Sparkfun Venus GPS">Sparkfun Venus GPS </a>UART strapped (bi-dir) to the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9099" rel="self" title="XBee 900 Pro">XBEE 900 Pro</a> UART with a<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8486" rel="external" title="3.7 Lipo 2000 mAh"> lipo batery </a>mounted on a Chameleon 1 baseplate and an LED on GPS transmit line.  Very simple set up.  (I went with the 2nd version - a thin, light silver 2000mAh lipo below.)  The battery was velcro&rsquo;d in place on the bottom.  The electronics were soldered on perfboards to make them easy to mount securely with 4-40 hardware.<br /><br /><img class="imageStyle" alt="pumpkin-gps-guts" src="http://www.esawdust.com/blog/gps/files/pumpkin-gps-guts.jpg" width="460" height="320"/><img class="imageStyle" alt="pumpkin-gps-faceplates" src="http://www.esawdust.com/blog/gps/files/pumpkin-gps-faceplates-2.jpg" width="218" height="156"/><br /><br />A couple of holes drilled into a blank Chameleon faceplate for antennas and LED and soon, I had a bomb-proof enclosure.<br /><br />With the Venus GPS viewing software I could talk to and configure the GPS over the XBee link.  I set it for a 5 Hz update rate - the GPS and the XBee 900 ran at 38,400 baud for these games (I mean tests.)<br /><br /><strong><em><u>The Launch Vehicle</u></em></strong><br /><br />To prep the <a href="http://en.wikipedia.org/wiki/Launch_vehicle" rel="external" title="Expendable Launch Vehicle">expendable launch vehicle</a>, I carved a slot in the pumpkin and slid the Pumpkin GPS into the slot:<br /><br /><img class="imageStyle" alt="DSCF3897" src="http://www.esawdust.com/blog/gps/files/dscf3897.jpg" width="365" height="274"/><img class="imageStyle" alt="DSCF3903" src="http://www.esawdust.com/blog/gps/files/dscf3903.jpg" width="183" height="137"/><br /><br /><img class="imageStyle" alt="DSCF3910" src="http://www.esawdust.com/blog/gps/files/dscf3910.jpg" width="365" height="274"/><br /><br />Below, Jon Dory inspected my work and gave it the <a href="http://search.barnesandnoble.com/Flight/Chris-Kraft/e/9780452283046" rel="external" title="Go Flight!">&ldquo;Go Flight!&rdquo;</a><br /><br /><img class="imageStyle" alt="DSCF3909" src="http://www.esawdust.com/blog/gps/files/dscf3909.jpg" width="480" height="360"/><br /><br />My ground control crew was positioned about 200 feet down-range and to the side - this is my 10 year-old son, Nakoa, who kept me apprised by two-way radio of the NMEA RF stream coming out of the Pumpkin GPS.  He would say things like &ldquo;Data looks clean, Dad.&rdquo; (Our next gen <a href="http://en.wikipedia.org/wiki/Christopher_C._Kraft,_Jr." rel="self" title="Chris Kraft Flight control">Chris Kraft?</a>)<br /><br /><img class="imageStyle" alt="DSCF3888" src="http://www.esawdust.com/blog/gps/files/dscf3888.jpg" width="365" height="274"/><br /><br /><strong><em><u>The Launch</u></em></strong><br /><br />You really have no idea how powerful this trebuchet is unless you watch it in action.  Without further ado, here&rsquo;s a video including some slo-mo of the pumpkin launches with our goods in them:<br />
<object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6807356&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6807356&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object><p><a href="http://vimeo.com/6807356">Trebuchet Pumpkin Launch - Slow Motion</a> from <a href="http://vimeo.com/landoncox">Landon Cox</a> on <a href="http://vimeo.com">Vimeo</a>.</p><br /><br /><strong><em><u>The Release</u></em></strong><br /><br />The release stage, where the trebuchet finally lets the pumpkin fly free, baffled me to no end until I saw it in action and asked Jon to explain the mechanics.  First, the pumpkin goes in a sling and two ropes attach to either side of the canvas pouch, but one end of the rope has a ring on it which slides over a rod on the end of the arm.  Here&rsquo;s a shot of the black, adjustable rod mechanism on the end of the arm (as well as the red trigger used for launch):<br /><br /><img class="imageStyle" alt="release-mechanism-trigger" src="http://www.esawdust.com/blog/gps/files/release-mechanism-trigger.jpg" width="464" height="400"/><br /><br />As the launch begins, the pumpkin is hurled backwards and outwards and pins the pumpkin against the sling and taut rope.   The rope-ring and the rod-arm form a substantial angle which results in a normal force between the ring and rod and holds the rope and sling David and Goliath style.  <br /><br />At some point, David has to let go of one end of the sling - the release.<br /><br />At the top point in the arc, as the pumpkin is coming around, the ring-end of the sling rope comes off the rod when the normal forces of the ring against the rod on the end of the arm go to near zero.  At that point, the ring slides off the rod and the pumpkin will release more-or-less at the top of the arc.  <br /><br />Jon&rsquo;s got a turnbuckle mechanism which you can see on the arm in the photo above to adjust the rod angle and therefore the release point - it works by changing the amount of normal force of the ring on the end of the sling&rsquo;s ropes at the top of the arc.  Depending upon how the rod angle is adjusted, he can control the release to be early or late and throw a pumpkin really high or like a line-drive through the corn field.<br /><br />It&rsquo;s an ingenious piece of mechanical engineering.  In the images below, you can see the release sequence which I think is fascinating.  In these pictures, the forward direction is to the right.<br /><br />In this first shot, the arm is near the top of its swing, but the pumpkin is still hurling on the back-side of the arc.  Both sling lines are still attached and the pumpkin is firmly in the pouch:<br /><br /><img class="imageStyle" alt="trebuchet-release-1a" src="http://www.esawdust.com/blog/gps/files/trebuchet-release-1a.jpg" width="480" height="343"/><br /><br />As the pumpkin is nearing the top of the arc, the sling line ring is approaching 0 normal force and ring is about to slide off the rod:<br /><img class="imageStyle" alt="trebuchet-release-1aa" src="http://www.esawdust.com/blog/gps/files/trebuchet-release-1aa.jpg" width="480" height="343"/><br /><br />If you look closely at the next shot, the ring on one of the sling ropes has just slipped loose from the rod and the full release has begun:<br /><img class="imageStyle" alt="trebuchet-release-1aaa" src="http://www.esawdust.com/blog/gps/files/trebuchet-release-1aaa.jpg" width="480" height="343"/><br /><br />The release at full extension - you can see one side of the sling totally opened up and the pumpkin is flying: <br /><img class="imageStyle" alt="the-release" src="http://www.esawdust.com/blog/gps/files/the-release.jpg" width="480" height="333"/><br /><br /><br /><strong><em><u>Results</u></em></strong><br /><br />In one sense, it was &ldquo;mission accomplished&rdquo; on all 3 counts.  We did find out the answers to these questions.  Question #1 (crash test) and #2 (RF signal) were positive outcomes and I was pleased with the results.    Goal 3 - not so much.  Oh well, you win some and lose some.<br /><br />We did three launches total.  One each with the Pumpkin GPS and accelerometer.  One combined GPS/accelerometer flight.<br /><br />In the first launch of the Pumpkin GPS, the electronics survived and still had a red blinking light.  The device was coated with pumpkin mush and it landed with its 900 MHz antenna and faceplate down in the ground.  So, we lost RF signal on impact.  As soon as I lifted it out of the dirt and mush, we got signal again to the base-station.   The middle of the lid was dented on one end and dented the faceplate edge somewhat, but the enclosure was basically intact and electronics were obviously still working - we had a blinking LED from the GPS and RF signal back to the ground station.  The external GPS antenna was not ripped and the SMA connector miraculously survived impact despite ending up on its faceplate.<br /><br /><img class="imageStyle" alt="Still 4" src="http://www.esawdust.com/blog/gps/files/still-4.jpg" width="480" height="270"/><br /><br />Here&rsquo;s Nathan and Jon inspecting the accelerometer capsule when they recovered it after the first flight - it was ejected from the pumpkin (wasn&rsquo;t found in the mush.)<br /><br /><a href="http://www.esawdust.com/blog/gps/files/pasted-graphic-2.pict">Pasted Graphic 2</a><img class="imageStyle" alt="Still 3" src="http://www.esawdust.com/blog/gps/files/still-3.jpg" width="480" height="270"/><br /><br />Before the launch, we were all speculating about what would get destroyed.  Nate and Pete thought for sure the velcro&rsquo;d lipo battery for the GPS would rip loose...I was sure it would not.  We were all pretty sure the SMA connector and GPS would be destroyed.  When I picked it up after its first flight and saw it was all still running, I shook the box to hear if anything was loose and there was nothing rattling inside - the battery definitely held tight.   <br /><br />With the box intact, I felt compelled to smack-talk Pete - I was proud that my velcro&rsquo;d battery design and enclosure worked.   Pete was a good sport and offered to send me some of his -<strong><em>Rejected</em></strong>- PCB&rsquo;s as my reward.  I&rsquo;m still looking for some autographed PCB&rsquo;s in the mail from him.  Here&rsquo;s a shot of Pete in a good mood when his accelerometer data was being downloaded from the device - the look of relief.<br /><br /><img class="imageStyle" alt="DSCF3925" src="http://www.esawdust.com/blog/gps/files/dscf3925.jpg" width="274" height="365"/><br /><br />I did not open the Pumpkin GPS between launches, but just stuffed it in a second launch vehicle. <br /><br />By this time, the GPS was horrified with anticipation of a second launch but the freshly picked, fleshy pumpkin had no idea it was about to experience the ride of its life.   After the second ride, the Chameleon 1 was a bit more squashed (sorry for the pun, couldn&rsquo;t help it) and yet still functioning.  Still nothing rattling inside after all that.<br /><br /><img class="imageStyle" alt="Still 8" src="http://www.esawdust.com/blog/gps/files/still-8.jpg" width="480" height="270"/><br /><br />Even in this condition, the first two goals were met - the electronics survived two huge impacts and we were able to receive good RF from the XBee 900&rsquo;s during a wild flight.<br /><br />The 3rd goal, GPS data, was probably unrealistic to begin with.    GPS is by its nature a heads-up technology and I did not get good GPS data in this experiment.   To say I got squirrelly GPS data is an understatement.    This is the Google Earth profile I got on the 2nd flight - south facing:<br /><br /><img class="imageStyle" alt="gps-googleearth-profile" src="http://www.esawdust.com/blog/gps/files/gps-googleearth-profile.jpg" width="480" height="118"/><br /><br />Needless to say, I consider that basically garbage.  To the degree it resembles the nice parabolic arc we observed, well, you&rsquo;d have to have a wild imagination (and more than a few beers and explosive charges ringing in your ears.) I was able to put together an elevation/distance profile and try to tease out the basic launch data from the NMEA strings and came up with these plots.  The fingerprint of the launch and impact are in the plot but the numbers are not correct despite having a good satellite fix.<br /><br /><img class="imageStyle" alt="sample-distance-elevation" src="http://www.esawdust.com/blog/gps/files/sample-distance-elevation.jpg" width="480" height="304"/><img class="imageStyle" alt="sample-velocity-elevation" src="http://www.esawdust.com/blog/gps/files/sample-velocity-elevation.jpg" width="480" height="304"/><br /><br />Regarding Sparkfun&rsquo;s accelerometer, initially Pete thought the launch was definitely less than 18g&rsquo;s but that the impact might have pegged it.  He sent me these two flight graphs and they came out like this:<br /><br /><img class="imageStyle" alt="treb1" src="http://www.esawdust.com/blog/gps/files/treb1.jpg" width="480" height="301"/><img class="imageStyle" alt="Treb2" src="http://www.esawdust.com/blog/gps/files/treb2-2.jpg" width="480" height="271"/><br /><br />Since the accelerometer was not fixed in a specific orientation, probably the best you can make of these is an absolute value G force it withstood in any axis in flight.<br /><br />[ Accelerometer graphs provided courtesy of Pete Dokter - Sparkfun EE, and designer of the accelerometer ]<br /><br /><strong><em><u>What do you get when you fling a pumpkin 100 mph?</u></em></strong><br /><br />Despite the problems I had with the GPS, this was pretty cool finding:   if you fling an oblong pumpkin out of a trebuchet at a theoretical 100 mph (Jon did the dynamics and math with a JPL engineer), it will very often spin perfectly on a horizontal axis that&rsquo;s perpendicular to the line of flight.  That was not theoretical - that was how they often flew!   Sometimes they would fly like a football spiral.  We could not have predicted that!   Jon had seen it 100&rsquo;s of times.  I thought maybe they&rsquo;d come out end over end or wobbly, and sometimes do the more round they are, but often they come out of the sling with a wicked spin John Elway would be proud of.<br /><br />If you look at a closeup of the accelerometer data from Pete&rsquo;s acceleration graph, mid-flight it looked like this:<br /><br /><img class="imageStyle" alt="mid-flight-accel-1" src="http://www.esawdust.com/blog/gps/files/mid-flight-accel-1.jpg" width="156" height="514"/><img class="imageStyle" alt="mid-flight-accel-2" src="http://www.esawdust.com/blog/gps/files/mid-flight-accel-2.jpg" width="413" height="191"/><br /><br />I might be reaching based on this data but looks like the pumpkin was rotating in two dimensions at about 7Hz.  Like I said, I might be reaching, but think it&rsquo;s interesting to see these small periodic waves mid-flight embedded in an overall sine-like wave.  Is that vibration or rotation?  I&rsquo;m not sure.<br /><br />We were able to receive RF data throughout the flight, but found the GPS numbers were sketch....speed and altitude were out of the pale with our visual observations (they were too slow and too low from what the flight looked like.)  <br /><br />If pumpkins fly with their vertical axis horizontal, parallel with the ground, perpendicular to the line of flight, that means the GPS antenna is more or less rotating around the pumpkin&rsquo;s vertical axis with its antenna plane facing north or south not up towards the sky.  The line of flight was west towards the Rocky Mountains.<br /><br />When I looked at the data, I had a 3D GPS fix and the number of satellites fixed was, on average, at least 8.  But the altitude read low even before the start, so I had something wrong with the GPS from the get-go.  Instead of 7,000 feet, it was reading about 4900 feet (~1500M).   My velocity numbers looked like 14 feet / sec at the max which is speed over ground...obviously, a GPS can&rsquo;t really measure airspeed through the arc which would have had to be a lot higher.  Still 14 ft/sec was way low.  One flight was pretty short - maybe 200 ft distance and the other flight was about 350 feet.   <br /><br /><strong><em><u>Lessons Learned</u></em></strong><br /><br />I should have validated the altitude numbers I was getting from the GPS before the flight, but it was kind of chaotic getting set up....what with carving pumpkins, shooting high pressure corn cob cannons, cranking down monster Trebuchets and all.   Next year I&rsquo;ll try to do better with the numbers.  Think it would be really cool to use a gyro next time also.  I&rsquo;d do more ground work on marking specific waypoints of impact to get more accurate ranges.<br /><br />I hope you enjoyed seeing the Great Pumpkin Launch of 2009.   The whole thing was a hoot, but the most fun was combining medieval technology with high-tech instruments in the same event.  I think geeks should make this an annual event the world over. <br /><br /><strong><em><u>THANKS!</u></em></strong><br /><br />Many thanks to Jon Dory for making such a cool toy and letting us use it.  And thanks to Sparkfun for being a willing sport to launch their products in such a zany event.  <br /><br />Next time you&rsquo;re in the Ft. Collins area and feel the need to lay siege to a pumpkin patch, go checkout <a href="http://www.somethingfromthefarm.com/webstudiotriala_002.htm" rel="external" title="Something from the Farm.">&ldquo;Something From the Farm&rdquo;</a>, launch some pumpkins and be sure to meet Jon ( <span style="color:#004FB0;"><u>jonrdory@gmail.com  </u></span>) and his crew.  Lets do it again next year.<br /><br /><a href="http://esawdust.com/feedback/" rel="self" title="Contact ESawdust">Landon Cox </a><br /><a href="http://www.esawdust.com" rel="external" title="ESawdust.com">www.ESawdust.com</a><br />]]></content:encoded></item><item><title>Sparkfun Autonomous Vehicle Comp &#x27;09</title><dc:creator>landon@360vl.com</dc:creator><category>GPS</category><dc:date>2009-04-15T19:55:40-06:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/SparkfunAutonomousVehicle09.html#unique-entry-id-3</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/SparkfunAutonomousVehicle09.html#unique-entry-id-3</guid><content:encoded><![CDATA[Only in Boulder.   Only at Sparkfun.  Only in the town that gave us <a href="http://boulderkinetics.com/" rel="external">Kenetics</a> could you have an event like this.  It was the inaugural <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9016" rel="external">Sparkfun Autonomous Vehicle competition</a> where the only rule was pretty much:<br /><br /><strong><em>Build a vehicle that will get around the Sparkfun building autonomously once without cheating.</em></strong><br /><br />My son and I went up for the day to watch and it was a gas. <br /><br />Two of the funniest highlights of the day were:<br /><ol class="arabic-numbers"><li>The entrant &ldquo;ocraptheresalake&rdquo;, a completely out of control and dizzingly fast R/C car chassis, ended up in the adjacent creek. (video below)</li><li>One of the UAV airplanes from <a href="http://diydrones.com/" rel="self">DIY Drones</a> ended up in a tree so high it took the local fire department and its ladder truck to retrieve it.  (photo later/below)</li></ol><br /><a href="http://www.esawdust.com/blog/gps/blog/autveh/files/category-autonomous-vehicles.html" rel="self" title="Autonomous Vehicles:Category: Autonomous Vehicles">[Update 2/3/10: See the ESawdust Autonomous Vehicle category for a series on controlling an R/C car autonomously.]</a><br /><br />There were so many cameras (mondo Canon 5Ds), media and so on, I feel foolish for putting these pictures up because there are probably better ones elsewhere to be had.  But these might be some of the first to emerge from the day, so enjoy them.  I&rsquo;m sure Sparkfun will be putting up lots of fun stuff over the next few weeks just from today.   We had a beautiful wind-free (for the most part) day.<br /><br />My pictures and video below.  Thanks Sparkfun for holding a really fun event.  Next time, I&rsquo;m in.<br /><br /><img class="imageStyle" alt="DSCF2529" src="http://www.esawdust.com/blog/gps/files/dscf2529.jpg" width="480" height="360"/><br />The Sparkfun building and lake.<br /><br /><img class="imageStyle" alt="DSCF2530" src="http://www.esawdust.com/blog/gps/files/dscf2530.jpg" width="480" height="360"/><br />The pit area next to the production area on the ground level.<br /><br />This next picture is of one of the coolest contraptions in the pit area, but unfortunately the owner couldn&rsquo;t ever get it to work in order to enter the race.  It&rsquo;s a wire ball with a motor, controller and battery that pendulums from the axle.   I really wish I could have seen this guy go.<br /><img class="imageStyle" alt="DSCF2533" src="http://www.esawdust.com/blog/gps/files/dscf2533.jpg" width="411" height="548"/><br /><img class="imageStyle" alt="DSCF2537" src="http://www.esawdust.com/blog/gps/files/dscf2537.jpg" width="480" height="360"/><br /><br /><img class="imageStyle" alt="DSCF2545" src="http://www.esawdust.com/blog/gps/files/dscf2545.jpg" width="480" height="640"/><br />Eric from Highland Ranch (suburb of Denver) with the fastest and only ground AV to complete the one lap.   He got second place to the UAV that was able to finally fly the course in 36 seconds.<br /><img class="imageStyle" alt="DSCF2546" src="http://www.esawdust.com/blog/gps/files/dscf2546.jpg" width="480" height="360"/><br />His car had two AVRs on it, a 5 Hz GPS, compass, and IR sensors on the front.   Good software too - his first run he was able to pull out of a pickle where he got caught behind an island on the first turn.<br /><br />The most dangerous and wettest entrant goes to &ldquo;ocraptheresalake&rdquo;:<br /><br /><img class="imageStyle" alt="DSCF2567" src="http://www.esawdust.com/blog/gps/files/dscf2567.jpg" width="480" height="360"/><br /><br />This is the video I shot of it going right off the course.  Unfortunately, I couldn&rsquo;t catch it flying over the side and into the creek, but I got the aftermath in this video:<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/VeY5hNXzDE4&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VeY5hNXzDE4&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<br /><br />Another crowd favorite had to be this cooler on wheels by Dennis of Norman, OK:<br /><img class="imageStyle" alt="DSCF2556" src="http://www.esawdust.com/blog/gps/files/dscf2556.jpg" width="480" height="640"/><br /><br />He had a rough go of it, but this thing was the balls.  It could turn on a dime with each wheel independently driven.   He used a Propeller dev board and a bunch of grease and glue to keep this thing running.<br /><br />Here&rsquo;s a video of his last (unsuccessful) run:<br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/aC8Srh3I1SA&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/aC8Srh3I1SA&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br /><br />The <a href="http://diydrones.com/" rel="external">DIY Drones guys</a> stuck one in the tree twice, but this one was the cats meow.   Good thing the fire dept is right around the corner:<br /><img class="imageStyle" alt="DSCF2593" src="http://www.esawdust.com/blog/gps/files/dscf2593.jpg" width="480" height="640"/><br /><br />Here&rsquo;s a fun video of the mass start they did at the very end.   There&rsquo;s just stuff driving every which way as you&rsquo;ll see:<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/LMxPJ46X4pc&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LMxPJ46X4pc&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><span style="font:10px Arial, Verdana, Helvetica, sans-serif; "><br /></span><br />Thanks to Nate and all the staff at SparkFun for making a really fun day for all of us.<br />]]></content:encoded></item><item><title>Compute the Distance Between Two Latitude/Longitudes - Haversine Formula in Ruby</title><dc:creator>landon@360vl.com</dc:creator><category>GPS</category><category>Ruby</category><dc:date>2008-12-16T18:37:28-07:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/HaversineFormulaInRuby.html#unique-entry-id-2</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/HaversineFormulaInRuby.html#unique-entry-id-2</guid><content:encoded><![CDATA[<strong>Synopsis: Haversine formula in Ruby. </strong> This is Ruby code to compute the distance between two points when their position is given as a latitude and longitude.  It&rsquo;s very handy and I used it to compute an absolute distance to signal strength graph using a GPS and custom code I wrote which could read signal strength from a <a href="http://www.lantronix.com/device-networking/embedded-device-servers/matchport.html" rel="external">embedded WiFi device</a> I was testing.   The test was undertaken to determine the signal strength vs distance characteristics in the field of a <a href="http://www.lantronix.com/device-networking/embedded-device-servers/matchport.html" rel="external">LANtronix Matchport b/g.</a>   This article answers the question:  How to compute the distance between two GPS coordinates using Ruby?<br /><br />Here&rsquo;s one of many resulting graphs (<a href="http://www.gnuplot.info/" rel="self">gnuplot</a>) based on lat/lon points, ping latency, and signal strength.   There were many more graphs and tests done, but this gives you an idea of what the Haversine formula is good for.   For every lat/lon I took a signal strength reading (automated of course.)  Using the Haversine formula coded in Ruby, presented below, I could easily compute the distance between points to create a signal strength to distance graph.   Those distances comprised the X axis of this graph of Signal Strength and Ping latency vs Distance in feet:<br /><br /><img class="imageStyle" alt="LANtronix Matchport b/g signal strength" src="http://www.esawdust.com/blog/gps/files/signalstrength.jpg" width="480" height="302"/><br /><br /> 
<script type="syntaxhighlighter" class="brush: ruby"><![CDATA[
# haversine.rb
#
# haversine formula to compute the great circle distance between two points given their latitude and longitudes
#
# Copyright (C) 2008, 360VL, Inc
# Copyright (C) 2008, Landon Cox
#
# http://www.esawdust.com (Landon Cox)
# contact:
# http://www.esawdust.com/blog/businesscard/businesscard.html
#
# LICENSE: GNU Affero GPL v3
# The ruby implementation of the Haversine formula is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.  
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public 
# License version 3 for more details.  http://www.gnu.org/licenses/
#
# Landon Cox - 9/25/08
# 
# Notes:
#
# translated into Ruby based on information contained in:
#   http://mathforum.org/library/drmath/view/51879.html  Doctors Rick and Peterson - 4/20/99
#   http://www.movable-type.co.uk/scripts/latlong.html
#   http://en.wikipedia.org/wiki/Haversine_formula
#
# This formula can compute accurate distances between two points given latitude and longitude, even for 
# short distances.

# PI = 3.1415926535
RAD_PER_DEG = 0.017453293  #  PI/180

# the great circle distance d will be in whatever units R is in

Rmiles = 3956           # radius of the great circle in miles
Rkm = 6371              # radius in kilometers...some algorithms use 6367
Rfeet = Rmiles * 5282   # radius in feet
Rmeters = Rkm * 1000    # radius in meters

@distances = Hash.new   # this is global because if computing lots of track point distances, it didn't make
                        # sense to new a Hash each time over potentially 100's of thousands of points

=begin rdoc
  given two lat/lon points, compute the distance between the two points using the haversine formula
  the result will be a Hash of distances which are key'd by 'mi','km','ft', and 'm'
=end

def haversine_distance( lat1, lon1, lat2, lon2 )

  dlon = lon2 - lon1
  dlat = lat2 - lat1

  dlon_rad = dlon * RAD_PER_DEG 
  dlat_rad = dlat * RAD_PER_DEG

  lat1_rad = lat1 * RAD_PER_DEG
  lon1_rad = lon1 * RAD_PER_DEG

  lat2_rad = lat2 * RAD_PER_DEG
  lon2_rad = lon2 * RAD_PER_DEG

  # puts "dlon: #{dlon}, dlon_rad: #{dlon_rad}, dlat: #{dlat}, dlat_rad: #{dlat_rad}"

  a = (Math.sin(dlat_rad/2))**2 + Math.cos(lat1_rad) * Math.cos(lat2_rad) * (Math.sin(dlon_rad/2))**2
  c = 2 * Math.atan2( Math.sqrt(a), Math.sqrt(1-a))

  dMi = Rmiles * c          # delta between the two points in miles
  dKm = Rkm * c             # delta in kilometers
  dFeet = Rfeet * c         # delta in feet
  dMeters = Rmeters * c     # delta in meters

  @distances["mi"] = dMi
  @distances["km"] = dKm
  @distances["ft"] = dFeet
  @distances["m"] = dMeters
end

def test_haversine

  lon1 = -104.88544
  lat1 = 39.06546

  lon2 = -104.80
  lat2 = lat1

  haversine_distance( lat1, lon1, lat2, lon2 )

  puts "the distance from  #{lat1}, #{lon1} to #{lat2}, #{lon2} is:"
  puts "#{@distances['mi']} mi"
  puts "#{@distances['km']} km"
  puts "#{@distances['ft']} ft"
  puts "#{@distances['m']} m"

  if ( @distances['km'].to_s.match(/7\.376*/) != nil )
    puts "Test: Success"
  else
    puts "Test: Failed"
  end

end

test_haversine
]]>
</script>]]></content:encoded></item><item><title>Next Prototype of XBee GPS</title><dc:creator>landon@360vl.com</dc:creator><category>XBee - SirfIII</category><category>GPS</category><category>XBee Project</category><dc:date>2007-05-24T12:01:58-06:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/XBee-GPS-SirfIII.html#unique-entry-id-1</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/XBee-GPS-SirfIII.html#unique-entry-id-1</guid><content:encoded><![CDATA[I've spent some time to take the concept of an XBee GPS off the breadboard and have built a 2nd generation prototype of an XBee GPS.<br /><br /><br /><img class="imageStyle" alt="HPIM4347" src="http://www.esawdust.com/blog/gps/files/page1_blog_entry1_1.jpg" width="299" height="226"/>]]></content:encoded></item><item><title>XBee Pro Wireless GPS</title><dc:creator>landon@360vl.com</dc:creator><category>XBee - Copernicus</category><category>GPS</category><category>XBee Project</category><dc:date>2007-04-12T05:27:30-06:00</dc:date><link>http://www.esawdust.com/blog/blog/gps/files/BreadboardGPSCopernicus.html#unique-entry-id-0</link><guid isPermaLink="true">http://www.esawdust.com/blog/blog/gps/files/BreadboardGPSCopernicus.html#unique-entry-id-0</guid><content:encoded><![CDATA[<span style="font-size:13px; ">This shows a quick and dirty wireless GPS I made from a </span><span style="font-size:13px; "><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8146" rel="external" title="Copernicus Module">Copernicus GPS </a></span><span style="font-size:13px; ">and</span><span style="font-size:13px; "><a href="http://www.maxstream.com" rel="external" title="XBee"> XBee Pro.</a></span><span style="font-size:13px; ">   I use it because my office doesn't get a good GPS signal, so I can set this little gizmo up on the south side where the GPS signal is good and spit the NMEA strings to my office.  I catch them with another XBee that pipes them into my microcontroller....it's none the wiser.</span><br /><p style="text-align:center;"><a href="http://www.esawdust.com/blog/gps/blog/gps/files/BreadboardGPSCopernicus.html" rel="self" title="GPS:XBee Pro Wireless GPS"><img class="imageStyle" alt="HPIM4276" src="http://www.esawdust.com/blog/gps/files/page1_blog_entry0_1.jpg" width="127" height="96"/></a></p>]]></content:encoded></item></channel>
</rss>