<?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>My Gorram Frakking Blog</title>
	<atom:link href="http://blog.roderickmann.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.roderickmann.org</link>
	<description>The unimportant rants of a petulant engineer...
Plus: occasional raves, and hopefully, some useful info</description>
	<lastBuildDate>Sun, 08 Jan 2012 00:28:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Improving PCBs</title>
		<link>http://blog.roderickmann.org/2012/01/improving-pcbs/</link>
		<comments>http://blog.roderickmann.org/2012/01/improving-pcbs/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 00:25:06 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=917</guid>
		<description><![CDATA[I&#8217;ve made a handful of]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made a handful of PCBs, using Osmond on Mac OS X. This is the latest (click on the images for larger versions):</p>
<p><a href="http://www.flickr.com/photos/21202303@N00/6655992789" title="View 'Competition Altimeter' on Flickr.com"><img height="204" style="display:block; margin-left:auto; margin-right:auto;" alt="Competition Altimeter" border="0" src="http://farm8.staticflickr.com/7024/6655992789_6e00852b47.jpg" width="500"/></a></p>
<p>One of my concerns is that my solder mask is so far away from all the pads and holes. On this board, you can see how each side of the TQFP44 part (U1) has no solder mask in between pads. Many of the pads easily lift off the substrate when touched with the soldering iron.</p>
<p>Here&#8217;s an example of a board where the mask seems to go all the way onto the pads (and between them):</p>
<p><a href="http://www.flickr.com/photos/21202303@N00/6656008225" title="View 'Example PCB with better mask' on Flickr.com"><img height="232" style="display:block; margin-left:auto; margin-right:auto;" alt="Example PCB with better mask" border="0" src="http://farm8.staticflickr.com/7009/6656008225_815406b5f3.jpg" width="500"/></a></p>
<p>Obviously, I have some spacing set a certain way in Osmond, but I don&#8217;t know if that&#8217;s required, or if I should be doing things differently.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2012/01/improving-pcbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 km Flight Video, New UAV Parts Ordered</title>
		<link>http://blog.roderickmann.org/2011/09/6-km-flight-video-new-uav-parts-ordered/</link>
		<comments>http://blog.roderickmann.org/2011/09/6-km-flight-video-new-uav-parts-ordered/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 06:49:15 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Aviation]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Embedded]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=913</guid>
		<description><![CDATA[We had several successes this]]></description>
			<content:encoded><![CDATA[<p>We had several successes this weekend, with longer-range flights. We flew the small wing out 2 km, and it successfully returned and landed. A couple days later, we flew out to 3 km. We started to lose telemetry at that range with the rubber ducky antenna, but the plane flew without trouble. Here&#8217;s a video of a successful flight with autoland:</p>
<div style="text-align: center;">
	<iframe src="http://player.vimeo.com/video/28649155?title=0&amp;byline=0&amp;portrait=0&amp;autoplay=0" width="600" height="333" frameborder="0"></iframe>
</div>
<p>The wing above is the red one in this photo. The new wing is the black one:</p>
<div style="text-align: center;">
<a href="http://www.flickr.com/photos/jetforme/6114791521/" title="The 2.1 m Wing by JetForMe, on Flickr"><img src="http://farm7.static.flickr.com/6210/6114791521_4af305da61.jpg" width="500" height="374" alt="The 2.1 m Wing"></a>
</div>
<p>The new wing will use an E-flight Power 32 motor, shown here on the test stand:</p>
<div style="text-align: center;">
	<iframe src="http://player.vimeo.com/video/28604823?title=0&amp;byline=0&amp;portrait=0&amp;autoplay=0" width="600" height="335" frameborder="0"></iframe>
</div>
<h3>New UAV Parts</h3>
<p>I had a flurry of buying activity this weekend, after seeing the new wing. The thing is huge: 2.1 m. I decided to build one, too. The wing it self will take the longest to arrive, some time next week, but I ordered everything else in the mean time, which should arrive before the weekend.</p>
<p>Here’s the list of stuff:</p>
<table style="width: 80%; margin-left: auto; margin-right: auto;">
<tr>
<th>Item</th>
<th>Source</th>
<th style="text-align: right;">Price</th>
</tr>
<tr>
<td>Wing</td>
<td><a href="http://www.flyingfoam.com/products.html">Flying Foam Mothership 2.1 m</a></td>
<td style="text-align: right;">$145</td>
</tr>
<tr>
<td>Motor</td>
<td><a href="http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLM4032A">Power 32 Brushless Outrunner Motor, 770 Kv</a></td>
<td style="text-align: right;">$74.99</td>
</tr>
<tr>
<td>ESC</td>
<td><a href="http://www.castlecreations.com/products/phoenix_ice.html">Castle Creations Phoenix ICE Lite 75</a></td>
<td style="text-align: right;">$110.95</td>
</tr>
<tr>
<td>Autopilot</td>
<td><a href="http://store.diydrones.com/ArduPilot_Mega_kit_p/kt-apm-01.htm">ArduPilot</a></td>
<td style="text-align: right;">$250.00</td>
</tr>
<tr>
<td>Airspeed</td>
<td><a href="http://store.diydrones.com/ProductDetails.asp?ProductCode=KT-MPXV7002DP-01">Airspeed Kit</a></td>
<td style="text-align: right;">$24.95</td>
</tr>
<tr>
<td rowspan="4" style="vertical-align: top;">Communications</td>
<td><a href="http://store.diydrones.com/ProductDetails.asp?ProductCode=BR-0015-01">XtreamBee Board</a></td>
<td style="text-align: right;">$24.95</td>
</tr>
<tr>
<td><a href="http://store.diydrones.com/ProductDetails.asp?ProductCode=BR-0015-02">XtreamBee USB Adapter</a></td>
<td style="text-align: right;">$24.95</td>
</tr>
<tr>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?KeyWords=602-1169-ND">Digi XBP09-DPSIT-156 SMA Connector</a></td>
<td style="text-align: right;">$42</td>
</tr>
<tr>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?KeyWords=602-1167-ND">Digi XBP09-DPWIT-156 Wire Antenna</a></td>
<td style="text-align: right;">$42</td>
</tr>
<tr>
<td>Lighting</td>
<td>Numerous bright LEDs from SparkFun</td>
<td style="text-align: right;">$72.50</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/09/6-km-flight-video-new-uav-parts-ordered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best WFH Email, Ever</title>
		<link>http://blog.roderickmann.org/2011/08/best-wfh-email-ever/</link>
		<comments>http://blog.roderickmann.org/2011/08/best-wfh-email-ever/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 21:10:48 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=909</guid>
		<description><![CDATA[This just hit my inbox:

From:]]></description>
			<content:encoded><![CDATA[<p>This just hit my inbox:</p>
<blockquote><p>
From: Anton S. [mailto:xxx@yyy.com]<br />
Sent: Monday, August 29, 2011 9:42 AM<br />
To: dept@yyyy.com<br />
Subject: Anton WFH Today</p>
<p>There was a shooting Saturday night in SF where my car was parked. When I was walking to my car I got hit by a ricochet bullet. Luckily it hit the side of my neck and didn’t enter the body (just a flesh wound). I am fully functional, but my neck is a little sore. Working from home today.</p>
<p>Related local news links<br />
<a href="http://www.ktvu.com/news/29005645/detail.html">http://www.ktvu.com/news/29005645/detail.html</a><br />
<a href="http://www.sfexaminer.com/blogs/law-and-disorder/2011/08/two-wounded-san-francisco-soma-shooting-early-sunday-morning">http://www.sfexaminer.com/blogs/law-and-disorder/2011/08/two-wounded-san-francisco-soma-shooting-early-sunday-morning</a></p>
<p>-Anton
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/08/best-wfh-email-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ice Twisters</title>
		<link>http://blog.roderickmann.org/2011/06/ice-twisters/</link>
		<comments>http://blog.roderickmann.org/2011/06/ice-twisters/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 05:01:54 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=890</guid>
		<description><![CDATA[I&#8217;m watching this scientific train]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m watching this scientific train wreck of a movie called <em>Ice Twisters</em>, about a government-funded cloud-seeding experiment gone wrong. The EPG gives it three out of four stars, a rating clearly not awarded, in any part, based on scientific accuracy.</p>
<p>Here&#8217;s the worst bit of science so far. The research team developed a Predator-like drone that flies a swarm formation, creating rain clouds (the drones are called SERIFs, but I don&#8217;t remember the exact acronym). The first test run of the swarm of 2000 drones is initially successful, causing the expected rain. But soon, violent, brief storms begin to form in the surrounding areas, accompanied by dramatic drops in temperature, and icy tornadoes. Anyone caught a tornado is instantly frozen. And that&#8217;s not the bad science. Read on.</p>
<p>The team brings in Charlie, a former scientist (now a science calamity fiction author) to &#8220;think outside the box&#8221;. The principal investigator is Joanne. Other scientists include Damon, Gary, and Phil. Here&#8217;s the dialogue from the scene, with the worst parts in italics.</p>
<div style="margin-left: 2em; margin-right: 5em;">
<strong>Charlie:</strong> &#8220;There was a very loud <em>sonic boom</em> during the storm.&#8221;</p>
<p><strong>Damon:</strong> &#8220;You, uh, heard thunder.&#8221;</p>
<p><strong>Charlie:</strong> &#8220;No, no, it wasn&#8217;t thunder, it was something else. These SERIFs, you say they make the clouds, then seed them with silver iodide? How, exactly, are they doing this?&#8221;</p>
<p>(Cut to CG shot of the drones doing their thing in the sky.)</p>
<p><strong>Joanne:</strong> &#8220;They use <em>tiny wind turbines to supply power to their propulsion systems, so there&#8217;s no limit to how long they can stay airborne.</em></p>
<p>Once up, each one has a <em>revolutionary moisture evaporator designed to condense liquid nitrogen out of the upper atmosphere.</em>&#8221;</p>
<p><strong>Charlie:</strong> &#8220;Upper atmosphere? I thought these were in the troposphere.&#8221;</p>
<p><strong>Joanne:</strong> &#8220;They are, right at the ceiling, just below the tropopause.&#8221;</p>
<p>(Charlie walks over to a large diagram of the atmosphere, gestures toward it.)</p>
<p><strong>Charlie:</strong> &#8220;Your SERIFs are here, <em>taking any moisture in the atmosphere, and processing it into liquid nitrogen,</em> right? Making this area extremely dry at first, right? Correct me if I&#8217;m wrong.&#8221;</p>
<p><strong>Joanne:</strong> &#8220;No, you&#8217;re right.&#8221;</p>
<p><strong>Charlie:</strong> &#8220;All right. There&#8217;s a <em>subatomic reaction happening.</em> It&#8217;s <em>drawing moisture from the upper atmosphere</em>. The effect of this process is <em>creating…vertical weather.</em>&#8221;
</div>
<p>What kills me is that it&#8217;s not necessary to create such bullshit. Movies are better when they&#8217;re more believable, and &#8220;science&#8221; movies like this have to be on their best behavior when creating their disasters.</p>
<p>Anyway, enough procrastinating. Project time!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/06/ice-twisters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Nissan LEAF Finally Arrived</title>
		<link>http://blog.roderickmann.org/2011/05/the-nissan-leaf-finally-arrived/</link>
		<comments>http://blog.roderickmann.org/2011/05/the-nissan-leaf-finally-arrived/#comments</comments>
		<pubDate>Tue, 24 May 2011 04:41:18 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=887</guid>
		<description><![CDATA[On Friday, May 20, 2011,]]></description>
			<content:encoded><![CDATA[<p>On Friday, May 20, 2011, I finally took delivery of the <a href="http://www.nissanusa.com/leaf-electric-car/">Nissan LEAF</a> I had on order for so long. I reserved it in April of 2010, and ordered it September 23, 2010.</p>
<p><a href="http://www.flickr.com/photos/21202303@N00/5753253031" title="View 'My New LEAF' on Flickr.com"><img height="374" style="display:block; margin-left:auto; margin-right:auto;" alt="My New LEAF" border="0" src="http://farm4.static.flickr.com/3250/5753253031_6ded4bb474.jpg" width="500"/></a></p>
<p>Overall, I quite like it. My only other car is a 1995 Acura Integra GS-R that I bought new. It was a basic car, but well engineered, and very fun to drive.</p>
<p>The LEAF is a huge step up in luxury. Much quieter, about a thousand more airbags, computerized, cool. It has a range of about 100 miles, which is fine for my daily commute. It&#8217;s smooth, and has excellent fit and finish. The traction motor control is excellent. It has a really cool backup camera that draws lines predicting where you&#8217;ll go based on steering angle input. It has an excellent Bluetooth hands-free system, and it can play music directly off my iPhone via A2DP.</p>
<p>The computer systems leave a lot to be desired, though. I don&#8217;t think they&#8217;re generally any worse than those of other cars, but now that I own one, I see lots of places where they really failed to create a great product. I&#8217;ll write an article about that later.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/05/the-nissan-leaf-finally-arrived/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trouble with Static C++ Constructors in ChibiOS/ARM</title>
		<link>http://blog.roderickmann.org/2011/04/trouble-with-static-c-constructors-in-chibiosarm/</link>
		<comments>http://blog.roderickmann.org/2011/04/trouble-with-static-c-constructors-in-chibiosarm/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 03:32:25 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Embedded]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=867</guid>
		<description><![CDATA[For the last few days]]></description>
			<content:encoded><![CDATA[<p>For the last few days I&#8217;ve been troubleshooting a problem with a C++ <a href="/2011/04/using-templates-to-statically-allocate-thread-working-area-in-chibios/">thread class</a> I created to aid in the static allocation of threads under <a href="http://chibios.org/">ChibiOS</a>.</p>
<p>The problem boiled down to the fact that the ChibiOS ARM port (specifically, the ARM7 port, but it&#8217;s probably true for most ports) isn&#8217;t properly executing the constructors for statically (globally) allocated class objects. To clean up the other post, I moved the troubleshooting material to this post.</p>
<p><strong>Note:</strong> I&#8217;ve discussed this with the author of ChibiOS, and he hopes to resolve the issue in ChibiOS version 2.3.2.</p>
<p>When any object with a vtable pointer is allocated on the stack (i.e. at run time), it works. But when it is allocated as a global variable, the vtable pointer is NULL. Here&#8217;s the test code and output:</p>
<p>As you can see, the constructor isn&#8217;t getting called, (and vtable initialization isn&#8217;t happening) for the statically-allocated object <code>f</code>, but does get called for object <code>g</code>, allocated on the stack.</p>
<p>This is a GCC issue. It needs to call static ctors (and dtors, theoretically), but it&#8217;s failing to do so. It could be a mis-configured build of the toolchain, or a bug in the run-time library, or something else along those lines.</p>
<h3>Thoughts While Troubleshooting</h3>
<p>It currently fails on ARM (on an AT91SAM7X). The symptom is typical of exceeding the allocated stack space: the processor appears to reset (that is, it re-starts execution from the start of code).</p>
<p>There are two failure modes: in the first, it fails in <code>ThreadEntry()</code>, where the the thread context is cast to a pointer to the <code>BaseThread</code> class, and the virtual <code>entry()</code> method is called, executing the <code>CThread</code> subclass&#8217; implementation. If I remove the call to <code>entry()</code> and just implement some code directly in <code>ThreadEntry()</code>, it works fine.</p>
<p>The second failure mode has to do with what I put in the modified <code>ThreadEntry()</code>. Although it executes, subsequent execution later in the program fails (by failure, it is meant that the processor appears to reset).</p>
<p>At this point, I&#8217;m not sure what is wrong. Code seems well-enough aligned, when the GCC <code>.map</code> file is examined. The <code>self/this</code> pointer in <code>ThreadEntry()</code> has the correct value. I&#8217;ve tried with very large stacks to ensure I&#8217;m not overrunning the stack. I&#8217;ve tried a non-template class hierarchy to be sure virtual method dispatch works correctly (it does).</p>
<p>I&#8217;m going to try twiddling some outputs on the MCU (instead of calling the <code>stdlib</code> routines I have been). Without JTAG debugging, it&#8217;s going to be difficult to figure this out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/04/trouble-with-static-c-constructors-in-chibiosarm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Templates to Statically Allocate Thread Working Area in ChibiOS</title>
		<link>http://blog.roderickmann.org/2011/04/using-templates-to-statically-allocate-thread-working-area-in-chibios/</link>
		<comments>http://blog.roderickmann.org/2011/04/using-templates-to-statically-allocate-thread-working-area-in-chibios/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 00:56:06 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Embedded]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=831</guid>
		<description><![CDATA[On both 8-bit AVR and]]></description>
			<content:encoded><![CDATA[<p>On both 8-bit AVR and 32-bit ARM (AT91SAM7X and SAM3S), I&#8217;ve been using <a href="http://chibios.org/">ChibiOS</a>. It&#8217;s a nifty little OS that supports fully-static operation. That is to say, it&#8217;s possible to allocate all OS structures statically, at compile time, so none need be allocated dynamically at run-time, an operation that can possibly fail. This also allows the exact memory requirements to be known before loading the code onto the target.</p>
<p>I wrote a <code>CThread</code> class (so named to avoid conflict with the OS <a href="http://chibios.sourceforge.net/html/group__threads.html"><code>Thread</code></a> object) that wraps the allocation of the thread working area and OS thread creation. To do this, <code>CThread</code> is a template class, parameterizing the stack size. Clients subclass <code>CThread</code> and implement the <code>virtual msg_t entry()</code> method.</p>
<p><strong>Note:</strong> If you&#8217;re looking for the description of what goes wrong when the compiler fails to properly initialize static C++ object instances, I moved that material to a new post, <a href="http://blog.roderickmann.org/2011/04/trouble-with-static-c-constructors-in-chibiosarm/">Trouble with Static C++ Constructors in ChibiOS/ARM</a>.</p>
<h3>ChibiOS Threads</h3>
<p>In ChibiOS, to create a thread, you allocate the thread working area with a macro provided by the OS, and call <code>chThdCreateStatic()</code>:</p>
<p>The last parameter to <code>chThdCreateStatic()</code> is passed into the thread&#8217;s entry point. We use it later to pass a reference to the thread class.</p>
<p>As soon as <code>chThdCreateStatic()</code> is called, the thread begins executing. ChibiOS provides numerous synchronization primitives, but we won&#8217;t get into those here.</p>
<h3><code>CThread</code> Class</h3>
<p>The idea with the <code>CThread</code> wrapper is to provide a class to be subclassed to tidy up the creation of a thread. It would be used like this:</p>
<p>And the implementation:</p>
<p>Finally, the thread is allocated as a global (as before), and started:</p>
<p>Considerably tidier, isn&#8217;t it?</p>
<p>Pulling this off requires two classes: A non-template <code>BaseThread</code> class that provides the basic thread functionality, and the <code>CThread</code> template class that derives from it. Note that I do this to try to avoid redundant code generation, which can probably be done using partial specialization or a smart compiler, but I wasn&#8217;t sure how much luck I would have. The approach does result in a an extra member variable in the base class: the working area size from construction to be used when the thread is started.</p>
<p><code>BaseThread::entry()</code> should be pure virtual, but I had link errors on AVR with that.</p>
<p>Here&#8217;s the complete implementation.</p>
<p>CThread.h:</p>
<p>And the implementation:</p>
<p>What you see above is a little messier than it could be, given a number of issues I ran into while developing it, and concerns about code bloat. But it works reasonably well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/04/using-templates-to-statically-allocate-thread-working-area-in-chibios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baro Sensor Works!</title>
		<link>http://blog.roderickmann.org/2011/04/baro-sensor-works/</link>
		<comments>http://blog.roderickmann.org/2011/04/baro-sensor-works/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 10:27:10 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Embedded]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=822</guid>
		<description><![CDATA[It&#8217;s amazing how often a]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing how often a problem that seems unsolvable while you&#8217;re working on it ends up having an easy solution after you put it aside for a while.</p>
<p>Several months ago I <a href="http://blog.roderickmann.org/2010/12/baro-sensor/">wrote</a> about a problem with a <a href="http://www.meas-spec.com/">Measurement Specialties</a> <a href="http://www.meas-spec.com/product/t_product.aspx?id=7413">barometric pressure sensor</a>. I had come to the conclusion that either the sensor was faulty, or I had damaged it during installation on the <a href="http://blog.roderickmann.org/2010/09/balloon-controller/">board</a>. I kept putting off desoldering it, partly because it&#8217;s a challenging part to solder, and partly because I only had two spares, and they&#8217;re expensive; I didn&#8217;t want it to be faulty.</p>
<p><img style="display:block; margin-left:auto; margin-right:auto; border: 1px solid gray;" src="http://blog.roderickmann.org/wp-content/uploads/2011/04/BaroSensor.jpg.jpg" alt="Baro Sensor" border="0" width="600" height="546" /></p>
<p>Well, late last night I got the bug to look at it again. The data sheet shows the calculations that need to be made to get a calibrated result, and shows &#8220;typical values&#8221; for each of the six factory calibration parameters, uncalibrated pressure and temperature measurements, and each step of the process. It never dawned on me that those values might all be part of one measurement and calculation operation.</p>
<p>So I wrote a small app on the Mac that used the same calculation code that was on the sensor board, but put in the example values instead. Sure enough, the result I got did not match, and I started looking into the intermediate results. I noticed one of those was exactly double the example value, and that got me looking at the implementation of the equation. Looking very closely at the data sheet, I started re-writing the equations. Turns out, the code I had found on their site was incorrect, and the code I wrote based solely on the data sheet worked correctly.</p>
<p>For reference, here is C/C++ code that works. <code>mC1</code> through <code>mC6</code> are the calibration parameters from the device ROM. <code>mRawTemperature</code> and <code>mRawPressure</code> are the raw sensor readings. <code>mTemperature</code> and <code>mPressure</code> are the final, calibrated result. Temperature is in degrees Celcius * 100, so you have to divide the result by 100 to get the temperature. Pressure is in millibars * 100, so do a similar division to get mb.</p>
<p>This sensor should prove to be very accurate, and will give us the balloon&#8217;s pressure altitude, as well as the temperature inside the insulated payload box. It&#8217;s only real drawback is a lower pressure limit of 10 mbar, corresponding to an altitude of about 26 km (~85 kft). We&#8217;re hoping to go past 30 km (~100 kft). Hopefully the GPS will be a good backup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/04/baro-sensor-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decimal Days and Metric Time</title>
		<link>http://blog.roderickmann.org/2011/03/decimal-days-and-metric-time/</link>
		<comments>http://blog.roderickmann.org/2011/03/decimal-days-and-metric-time/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 04:00:14 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=808</guid>
		<description><![CDATA[I always thought it would]]></description>
			<content:encoded><![CDATA[<p>I always thought it would be cool if we counted time in units that were multiples of ten of each other. This is known as <em>decimal time.</em> There&#8217;d be 100 seconds in a minute, 100 minutes in an hour, and ten hours in day. A recent Twitter conversation got me thinking about this again.</p>
<p>The problem with this idea is that it requires the second to be redefined. To be sure, there are other problems, too, like how do you convince six billion people to change their notion of what seconds, minutes, and hours are?</p>
<p>But changing the length of a second means changing a lot of scientific constants, and that&#8217;s a pretty serious undertaking. It would be better to start with the existing unit of a second (which, incidentally, is a metric unit), and build on top of that.</p>
<p>So, let&#8217;s put aside the actual labels we&#8217;ll give each of these units, and let&#8217;s keep a second a second. Now let&#8217;s put 100 seconds in a minute, 100 minutes in an hour, and that gives us 8.64 hours in a day. That&#8217;s not a very nice, round number. How important is it that it be a &#8220;nice&#8221; number, though?</p>
<p>On Earth, the average day is 86,400 seconds long. On Mars, the average day (sol) is 88,775 seconds. In our decimal time units, that would be 8.86 hours. On Earth&#8217;s moon, a day is 2,551,443 seconds long, or 255.1 hours (are you starting to see the advantage of decimal time?). Obviously, as our species spreads out to other celestial bodies, having an even number of hours in the day everywhere will impossible, because not all days will be the same duration.</p>
<p>So, let&#8217;s compare some other durations:</p>
<table style="width: 60%; margin-top: 3em; margin-bottom: 3em; margin-left: auto; margin-right: auto; border: 1px solid gray; padding: 1em;">
<tr>
<th>Duration</th>
<th style="text-align: right;">Traditional Units</th>
<th style="text-align: right;">Decimal Time</th>
</tr>
<tr>
<td>Second</td>
<td style="text-align: right;">1 s</td>
<td style="text-align: right;">1 s</td>
</tr>
<tr>
<td>Traditional Minute</td>
<td style="text-align: right;">1 m</td>
<td style="text-align: right;">0.6 m</td>
</tr>
<tr>
<td>Traditional Hour</td>
<td style="text-align: right;">1 h</td>
<td style="text-align: right;">0.36 h</td>
</tr>
<tr>
<td>Day</td>
<td style="text-align: right;">24 h</td>
<td style="text-align: right;">8.64 h</td>
</tr>
<tr>
<td>Shower</td>
<td style="text-align: right;">15 m</td>
<td style="text-align: right;">0.36 h</td>
</tr>
<tr>
<td>Typical Work Day</td>
<td style="text-align: right;">8 h</td>
<td style="text-align: right;">2.88 h</td>
</tr>
<tr>
<td>Lunch</td>
<td style="text-align: right;">1 h</td>
<td style="text-align: right;">0.36 h</td>
</tr>
<tr>
<td>Movie</td>
<td style="text-align: right;">2 h</td>
<td style="text-align: right;">0.72 h</td>
</tr>
</table>
<p>Yuck! The problem with decimal time based on the existing second is that there are no conveniently-sized units for most day-to-day human activity.</p>
<p>The quarter-hour, or 15 minutes, is 900 seconds. That&#8217;s nearly 1000 seconds, so perhaps the <em>kilosecond</em> would be a convenient unit. Ten kiloseconds would be a little over 2 h 45 m traditional, so maybe we&#8217;re on to something here.</p>
<table style="width: 60%; margin-top: 3em; margin-bottom: 3em; margin-left: auto; margin-right: auto; border: 1px solid gray; padding: 1em;">
<tr>
<th>Duration</th>
<th style="text-align: right;">Traditional Units</th>
<th style="text-align: right;">Kilseconds</th>
</tr>
<tr>
<td>Kilosecond</td>
<td style="text-align: right;">0.27 h, 16.6 m</td>
<td style="text-align: right;">1 ks</td>
</tr>
<tr>
<td>Traditional Hour</td>
<td style="text-align: right;">1 h</td>
<td style="text-align: right;">3.6 ks</td>
</tr>
<tr>
<td>Decimal Hour</td>
<td style="text-align: right;">2.78 h</td>
<td style="text-align: right;">10 ks</td>
</tr>
<tr>
<td>Day</td>
<td style="text-align: right;">24 h</td>
<td style="text-align: right;">86.4 ks</td>
</tr>
<tr>
<td>Shower</td>
<td style="text-align: right;">15 m</td>
<td style="text-align: right;">1 ks</td>
</tr>
<tr>
<td>Typical Work Day</td>
<td style="text-align: right;">8 h</td>
<td style="text-align: right;">29 ks</td>
</tr>
<tr>
<td>Lunch</td>
<td style="text-align: right;">1 h</td>
<td style="text-align: right;">4 ks</td>
</tr>
<tr>
<td>Movie</td>
<td style="text-align: right;">2 h</td>
<td style="text-align: right;">7 ks</td>
</tr>
</table>
<p>I&#8217;ve rounded the kilosecond times for the activities, because their durations aren&#8217;t very precise to begin with. It seems like the kilosecond could be a fairly convenient unit, after all.</p>
<p>Now we just need to find good names for these decimal units. Seconds are fine, but the rest need new names that are easy to say, abbreviate acceptably to unit labels, and don&#8217;t sound cheesy (the old Battlestar Galactica used &#8220;centons,&#8221; and I never did figure out how much time that represented).</p>
<p>We might also ponder how one writes decimal time. Traditionally, in the U.S. and other parts of the world (but definitely not all!), a time of day (or duration) is written as double-digit numerals separated by colons: 12:37:58. Decimal time can be written much more simply, as decimal hours in the day: 4.548. Now, imagine you want to add (in traditional units) 4 minutes and 22 seconds to 12:37:58. Try it. It sucks. But adding 262 seconds to 4.548 decimal hours is much easier: 4.548 h + 0.0262 h = 4.574 h.</p>
<p>It may seem weird, but if you grow up with these units, and everything around you uses them, they&#8217;d be obvious, and the units we use today would seem strange.</p>
<h3>Sources</h3>
<p><a href="http://en.wikipedia.org/w/index.php?title=Metric_time&#038;oldid=414432996">Metric time</a>. (2011, February 17). In Wikipedia, The Free Encyclopedia. Retrieved 05:51, March 27, 2011, from <a href="http://en.wikipedia.org/w/index.php?title=Metric_time&#038;oldid=414432996">http://en.wikipedia.org/w/index.php?title=Metric_time&#038;oldid=414432996</a></p>
<p><a href="http://en.wikipedia.org/w/index.php?title=Timekeeping_on_Mars&#038;oldid=408111863">Timekeeping on Mars</a>. (2011, January 15). In Wikipedia, The Free Encyclopedia. Retrieved 05:52, March 27, 2011, from <a href="http://en.wikipedia.org/w/index.php?title=Timekeeping_on_Mars&#038;oldid=408111863">http://en.wikipedia.org/w/index.php?title=Timekeeping_on_Mars&#038;oldid=408111863</a>.</p>
<p><a href="http://en.wikipedia.org/w/index.php?title=Lunar_day&#038;oldid=419235268">Lunar day</a>. (2011, March 17). In Wikipedia, The Free Encyclopedia. Retrieved 05:53, March 27, 2011, from <a href="http://en.wikipedia.org/w/index.php?title=Lunar_day&#038;oldid=419235268">http://en.wikipedia.org/w/index.php?title=Lunar_day&#038;oldid=419235268</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/03/decimal-days-and-metric-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NASA Mission Audio</title>
		<link>http://blog.roderickmann.org/2011/03/nasa-mission-audio/</link>
		<comments>http://blog.roderickmann.org/2011/03/nasa-mission-audio/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 16:27:22 +0000</pubDate>
		<dc:creator>rmann</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.roderickmann.org/?p=806</guid>
		<description><![CDATA[http://wow05.ustream.tv/ustreamVideo/114136/BW2/streams/live_1_audio/playlist.m3u8
]]></description>
			<content:encoded><![CDATA[<p><a href="http://wow05.ustream.tv/ustreamVideo/114136/BW2/streams/live_1_audio/playlist.m3u8">http://wow05.ustream.tv/ustreamVideo/114136/BW2/streams/live_1_audio/playlist.m3u8</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.roderickmann.org/2011/03/nasa-mission-audio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

