<?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>echelon &#187; development</title>
	<atom:link href="http://www.soa-world.de/echelon/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.soa-world.de/echelon</link>
	<description>A personal  technology  blog about software  development  and other interesting stuff.</description>
	<lastBuildDate>Tue, 06 Jul 2010 07:52:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>3D Vision for Embedded Systems</title>
		<link>http://www.soa-world.de/echelon/2010/07/3d-vision-for-embedded-systems.html</link>
		<comments>http://www.soa-world.de/echelon/2010/07/3d-vision-for-embedded-systems.html#comments</comments>
		<pubDate>Mon, 05 Jul 2010 20:51:10 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=458</guid>
		<description><![CDATA[3D Vision is an integral part of every autonomous robot. Getting it right is not trivial and certainly not cheap. We struggled with this problem ourselves when trying to build an autonomous Mikrokopter drone. Cheap systems are not very reliable, good systems are disproportionately expensive and often very heavy. However I believe there may be [...]]]></description>
			<content:encoded><![CDATA[<p>3D Vision is an integral part of every autonomous robot. Getting it right is not trivial and certainly not cheap. We struggled with this problem ourselves when trying to build an <a href="http://www.soa-world.de/echelon/2009/09/civilian-autonomous-and-remote-controlled-drones.html">autonomous Mikrokopter drone</a>. Cheap systems are not very reliable, good systems are disproportionately expensive and often very heavy. However I believe there may be hope yet for usable and cheap 3D vision systems for hobbyist and hackers alike. Granted, Microsoft is a rather unexpected reason for such hope but their <a href="http://en.wikipedia.org/wiki/Project_Natal">Project Natal</a> (now <a href="http://www.xbox.com/en-US/kinect/">Kinect</a>) might just be what we have been waiting for (image by <a href="http://www.flickr.com/people/84606909@N00/">litheon</a>).</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/07/800px-Kinect_Sensor_at_E3_2010_front2.jpg" alt="" title="800px-Kinect_Sensor_at_E3_2010_(front)" width="480" height="199" class="alignright size-full wp-image-469" /></p>
<p>It&#8217;s a <a href="http://en.wikipedia.org/wiki/Structured-light_3D_scanner">structured-light 3D scanner</a> developed by <a href="http://www.primesense.com/?p=514">PrimeSense</a>. While being used for measuring the three-dimensional shape of an object I think it should be possible to use it as a 3D vision system for indoor robots. So I would really like to see hackers taking this cheap device apart and re-purposing it for home-brew 3D vision. In their paper &#8220;<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.21.5393&#038;rep=rep1&#038;type=pdf">A low cost 3D scanner based on structured light</a>&#8220;, Rocchini et al. describe how to build one and this incredible <a href="http://www.instructables.com/id/Structured-Light-3D-Scanning/">instructables article</a> explains how to build one also and even provides source code.</p>
<p>Of course there are other exiting technologies out there, a comprehensive list of 3D vision devices can be found at <a href="http://www.acroname.com/robotics/parts/c_Sensors.html">acroname.com</a> (including prices). The devices range from expensive but effective and impressive <a href="http://en.wikipedia.org/wiki/ToF_camera">Time-of-flight cameras</a> (vendors: <a href="http://www.fotonic.com/content/Products/Default.aspx">[1]</a> <a href="http://www.pmdtec.com/technology/whitepapers/">[2]</a> <a href="http://www.mesa-imaging.ch/prodview4k.php">[3]</a>) to <a href="http://en.wikipedia.org/wiki/LIDAR">LIDAR systems</a>. The latter were very <a href="http://www.technologyreview.com/read_article.aspx?id=18908">successfully used</a> in DARPA&#8217;s Urban Challenge autonomous driving competition. A very interesting video that describes how LIDAR works in detail is available at <a href="http://blip.tv/file/1326596/">blip.tv</a>.</p>
<p>Of course there&#8217;s also the good old <a href="http://www.robot-electronics.co.uk/htm/srf02tech.htm">ultrasonic</a> and <a href="http://www.acroname.com/robotics/info/articles/sharp/sharp.html">infrared sensors</a> that are cheap and have low resolution and are moderately reliable but they can certainly be very useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2010/07/3d-vision-for-embedded-systems.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sphinx Cheatsheet</title>
		<link>http://www.soa-world.de/echelon/2010/03/sphinx-cheatsheet.html</link>
		<comments>http://www.soa-world.de/echelon/2010/03/sphinx-cheatsheet.html#comments</comments>
		<pubDate>Sat, 06 Mar 2010 00:19:36 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=447</guid>
		<description><![CDATA[I find myself working with the Sphinx Documentation Generator  a lot recently. It is a great tool to easily create intelligent and beautiful documentation and it is based on reStructuredText. I put together a cheat sheet of all the commands I frequently use. There are a number of very good ones out there ([1] [...]]]></description>
			<content:encoded><![CDATA[<p>I find myself working with the <a href="http://sphinx.pocoo.org/">Sphinx Documentation Generator </a> a lot recently. It is a great tool to easily create intelligent and beautiful documentation and it is based on <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>. I put together a cheat sheet of all the commands I frequently use. There are a number of very good ones out there (<a href="http://neuroimaging.scipy.org/site/doc/manual/html/devel/guidelines/sphinx_helpers.html">[1]</a> <a href="http://matplotlib.sourceforge.net/sampledoc/cheatsheet.html">[2]</a> <a href="http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt">[3]</a> <a href="http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/tutorial/rest_syntax.html">[4]</a>) but I find it more convenient to work with my own.</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/03/cheatsheet.pdf"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/03/cheatsheet.png" alt="" title="cheatsheet" width="454" height="293" class="alignnone size-full wp-image-449" /></a></p>
<p>You can access the PDF from <a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/03/cheatsheet.pdf">here</a> and the source (OpenOffice Writer document) <a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/03/cheatsheet.odt">here</a>. If you find it useful or would like an item added, feel free to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2010/03/sphinx-cheatsheet.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Infobox Icons</title>
		<link>http://www.soa-world.de/echelon/2010/01/infobox-icons.html</link>
		<comments>http://www.soa-world.de/echelon/2010/01/infobox-icons.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 23:50:14 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=418</guid>
		<description><![CDATA[I like to scribble with Inkscape while listening to great music or radio plays to relax and clear my head. Today I created a couple of icons that I plan to use in documents to mark special boxes:

It&#8217;s a question, an error, a warning, an information and an idea icon. I currently use them in [...]]]></description>
			<content:encoded><![CDATA[<p>I like to scribble with <a href="http://www.inkscape.org/">Inkscape</a> while listening to <a href="http://www.mule.net/">great</a> <a href="http://albertacross.net/">music</a> or <a href="http://www.dreifragezeichen.de/">radio plays</a> to relax and clear my head. Today I created a couple of icons that I plan to use in documents to mark special boxes:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/icons1.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/icons1.png" alt="" title="icons" width="650" height="190" class="alignnone size-full wp-image-427" /></a></p>
<p>It&#8217;s a question, an error, a warning, an information and an idea icon. I currently use them in software documentation using the <a href="http://sphinx.pocoo.org/">Shpinx Python Documentation Generator</a>. It&#8217;s a very good tool to create beautiful documentation especially for software projects but I also use it to publish my <a href="http://www.soa-world.de/dev/foundationdoc/">game design document</a>. Here&#8217;s an example of how the icons could be used:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/usecase.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/usecase.png" alt="" title="usecase" width="485" height="144" class="alignnone size-full wp-image-429" /></a></p>
<p>I based the icons upon images from the <a href="http://tango.freedesktop.org/Tango_Icon_Gallery">Tango Icon Gallery</a>. You may download an archive containing the source (Inkscape .svg) and PNGs of different size <a href='http://www.soa-world.de/echelon/wp-content/uploads/2010/01/icons.zip'>here</a>. Use them as you wish, if you find them useful I&#8217;d be very happy if you left a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2010/01/infobox-icons.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to Browser Games</title>
		<link>http://www.soa-world.de/echelon/2010/01/back-to-browser-games.html</link>
		<comments>http://www.soa-world.de/echelon/2010/01/back-to-browser-games.html#comments</comments>
		<pubDate>Sun, 10 Jan 2010 21:26:51 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=407</guid>
		<description><![CDATA[I&#8217;m back thinking about games, browser games to be exact. It&#8217;s been a while since I thought about games or wrote code for one &#8211; it&#8217;s been about 1 year since I stopped developing a prototype I called &#8216;Prototype 4&#8242; which is a web based Master of Orion clone. I was working on the game [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back thinking about games, browser games to be exact. It&#8217;s been a while since I thought about games or wrote code for one &#8211; it&#8217;s been about 1 year since I stopped developing a prototype I called &#8216;Prototype 4&#8242; which is a web based <a href="http://en.wikipedia.org/wiki/Master_of_Orion">Master of Orion</a> clone. I was working on the game full time for about a month but then had to stop because I had to take up a job to get some money and I also had to finish my diploma thesis. It progressed fairly far further than any other of my prototypes in fact: I created some nice graphics and a layout, a cool javascript user interface, a very efficient yet flexible back end library in PHP and a C++ battle calculator. Here are 2 screenshots of what the game looks like:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/prototype41.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/prototype41-300x193.png" alt="Prototype 4 Screenshot 1" title="prototype41" width="300" height="193" class="size-medium wp-image-408"/></a> <a href="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/prototype42.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2010/01/prototype42-300x193.png" alt="Prototype 4 Screenshot 2" title="prototype42" width="300" height="193" class="size-medium wp-image-409" /></a></p>
<p>This was supposed to be a very literal copy of Master of Orion that you could play online with up to 15 other players on one map. Yet now I have something different in mind and I also have a different approach. It will only be a hobby project and I don&#8217;t plan to get immediate results, I want it to progress and evolve in my mind until I&#8217;m at a point where I can start writing code. Writing the code should be just handcraft at that point as I have most of the skills and knowledge to develop such a game.</p>
<p>What I&#8217;m doing now is writing a design document. The design will be highly influenced by the <a href="http://en.wikipedia.org/wiki/Foundation_series">Foundation Series</a>, one of the greatest science fiction series ever written. The first version of the design document can be found <a href="http://www.soa-world.de/dev/foundationdoc/index.html">here</a>. I still want the game to have a Master of Orion look and feel to it and it will certainly be a <a href="http://en.wikipedia.org/wiki/4x_game">4X type of game</a> but I want different factions to be completely different (comparable to the different races in <a href="http://en.wikipedia.org/wiki/Starcraft">Starcraft</a>) in the way they are played. I would like to see a &#8220;First Foundation&#8221; faction that relies on technology, economy and firepower and a &#8220;Second Foundation&#8221; faction that relies solely on the power of their minds, e.g. mind control. More about that can be found int the <a href="http://www.soa-world.de/dev/foundationdoc/index.html">design document</a>. A third faction is also possible but I have no concrete ideas about that yet. As the game design and the game itself progresses I will occasional write articles about it here on this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2010/01/back-to-browser-games.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Matlab C++ Integration</title>
		<link>http://www.soa-world.de/echelon/2009/11/matlab-c-integration.html</link>
		<comments>http://www.soa-world.de/echelon/2009/11/matlab-c-integration.html#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:30:02 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=349</guid>
		<description><![CDATA[I&#8217;m currently working on integrating some Matlab Algorithms into a larger C++ project using the Matlab Compiler. It works rather well however I stumbled across a couple of quirks and caveats. First two facts that make integrating Matlab difficult: in Matlab indexes start at 1 and Matlab arrays are column-major ordered. As a result if [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on integrating some Matlab Algorithms into a larger C++ project using the <a href="http://www.mathworks.com/products/compiler/">Matlab Compiler</a>. It works rather well however I stumbled across a couple of quirks and caveats. First two facts that make integrating Matlab difficult: in Matlab indexes start at 1 and Matlab arrays are column-major ordered. As a result if you want to use data fields in both C/C++ and Matlab you have to transpose the fields. If the fields contain indexes you might also have to increment and decrement the values of the fields.</p>
<p>Another caveat I found is also related to array indexes. When using a Matlab function that takes as parameters matrix indexes you might think of creating an mwArray of type <em>mxUINT32_CLASS</em>. Wrong. You have to pass indices &#8211; as strange as it sounds &#8211; as doubles so you should use <em>mxDOUBLE_CLASS</em>.</p>
<p>One custom Matlab function I wanted to use in C++ took as an argument a cell array. A cell array is an array containing other arrays. In Matlab you create a cell array like this:<br />
<code><br />
a = magic(5);<br />
b = ones(3);<br />
z{1} = a;<br />
z{2} = b;<br />
</code><br />
If you look at z now you will get something like this:<br />
<code><br />
z =<br />
    [5x5 double]    [3x3 double]<br />
</code><br />
An array of arrays. Easy. Well if you want to construct a cell array in C++ you have to do something like this:<br />
<code><br />
mwArray a(5, 5, mxDOUBLE_CLASS);<br />
mwArray b(3, 3, mxINT16_CLASS);<br />
mwArray z(1, 2, mxCELL_CLASS);<br />
z.Get(1,1).Set(a);                        // Sets z(1) = a<br />
z.Get(1,2).Set(b);                        // Sets z(2) = b<br />
</code><br />
You can find the description on <a href="http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/voidsetconstmwarrayarr.html">this page</a>.<br />
If you get used to those little quirks however the Matlab Compiler is a very powerful tool to include your crazy Matlab scripts in a stand alone C++ application. One of the next things I would like to investigate are free (open source) Matlab Compiler alternatives such as the Octave C++ integration and compiler.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2009/11/matlab-c-integration.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Civilian autonomous and remote controlled drones</title>
		<link>http://www.soa-world.de/echelon/2009/09/civilian-autonomous-and-remote-controlled-drones.html</link>
		<comments>http://www.soa-world.de/echelon/2009/09/civilian-autonomous-and-remote-controlled-drones.html#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:08:07 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=307</guid>
		<description><![CDATA[Here&#8217;s a quick summary of some of the most interesting autonomous and remote controlled drones out there today. The occasion is that I and 3 others have built a quadcopter drone last semester with the goal to fly it autonomously. While the time we had to finish the project was limited and our project did [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick summary of some of the most interesting autonomous and remote controlled drones out there today. The occasion is that I and 3 others have built a quadcopter drone last semester with the goal to fly it autonomously. While the time we had to finish the project was limited and our project did not reach full autonomous flight just yet we learned a lot about the system and the challenges of such an endeavor. One team member has made the project his diploma thesis and continues to work on the vehicle.</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2009/09/bird.jpg"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2009/09/bird-300x198.jpg" alt="bird" title="bird" width="300" height="198" class="alignnone size-medium wp-image-328" /></a> <a href="http://www.soa-world.de/echelon/wp-content/uploads/2009/09/DSC_0007.jpg"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2009/09/DSC_0007-300x210.jpg" alt="DSC_0007" title="DSC_0007" width="283" height="198" class="alignright size-medium wp-image-335" /></a></p>
<p>The two images show our drone dubbed B.I.R.D. (Basic intelligent research drone) in flight and the microcontrollers and sensors that control the drone. It is based on the the <a href="http://mikrokopter.net/ucwiki/">Mikrokopter</a> project.</p>
<p>Another very interesting drone is the nano air vehicle by AeroVironment. It&#8217;s a flapping-wing vehicle for indoors use. Check out <a href="http://www.youtube.com/watch?v=Cov7-XWUa18">this amazing video</a> to see it in action. I&#8217;m guessing that while the flapping-wing design is a lot more complicated than the brushless motors in our drone it is more energy efficient.</p>
<p>The third drone I would like to share was built by Armadillo Aerospace. They claim level 2 of the Northrop Grumman Lunar Lander Challenge with it. For more information <a href="http://spacefellowship.com/2009/09/13/armadillo-aerospace-claim-level-2-ngllc-prize/comment-page-1/">read on here</a> and be sure to check out <a href="http://www.youtube.com/watch?v=NuJ_jASXMVY&#038;feature=player_embedded">this video</a>. Notice how large this vehicle is (can be seen in the end of the video).</p>
<p>The fourth drone is really scary. And it&#8217;s not civilian at all. It&#8217;s called the Multiple Kill Vehicle and was supposed to shoot down intercontinental rockets in space. The project is apparently canceled but the video is impressive and scary nevertheless. <a href="http://www.youtube.com/watch?v=oPFj8kGXnwk">Check it out here</a>.</p>
<p><strong>Update:</strong> Researchers at MIT&#8217;s <a href="http://groups.csail.mit.edu/rrg/">Robust Robotics Group</a> have developed a robotic helicopter capable of autonomously flying inside buildings or other GPS-denied environments. Here&#8217;s a very interesting <a href="http://techtv.mit.edu/videos/4149-indoor-autonomous-helicopter">video</a> about their project. They achieved what we planned for our project &#8211; and I have to say it is very impressive and they did an excellent job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2009/09/civilian-autonomous-and-remote-controlled-drones.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualizing Multithreading</title>
		<link>http://www.soa-world.de/echelon/2009/07/visualizing-multithreading.html</link>
		<comments>http://www.soa-world.de/echelon/2009/07/visualizing-multithreading.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 18:53:17 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=296</guid>
		<description><![CDATA[I&#8217;ve been pondering about the question of how to model and visualize multithreaded applications in a simple, efficient and aesthetic way. Naturally I&#8217;ve been looking into UML behavior diagrams first but I was not really satisfied with what I found. Now I am not an expert on UML but I know my way around class [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been pondering about the question of how to model and visualize multithreaded applications in a simple, efficient and aesthetic way. Naturally I&#8217;ve been looking into UML behavior diagrams first but I was not really satisfied with what I found. Now I am not an expert on UML but I know my way around class diagrams, activity diagrams, sequence diagram and state machines but they all did not seem to fit what I wanted to visualize.</p>
<p>I wanted to show multiple threads communicating and synchronizing with each other. I&#8217;ve read the argument that something like multithreading concerns only the implementation of a system and can thus be ignored when modeling. I agree with the argument however there will come a time in the development phase of a system when one needs to think about multithreading and one wants to sketch out how the system facilitates multiple threads to be efficient. And for that I have not found good tool within UML.</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2009/06/multithreading.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2009/06/multithreadingsmall.png" alt="multithreadingsmall" title="multithreadingsmall" width="600" height="414" class="alignnone size-full wp-image-299" /></a></p>
<p>So I searched for examples of diagrams that visualize multithreading. The collage shows 4 different diagrams I found rather interesting. The first one is from <a href="http://honerbrink.com/?p=41">this page</a> about a traffic simulator written in Java (<a href="http://honerbrink.com/wp-content/uploads/2008/08/traffic-simulator-state-diagram.png">orignal image</a>). It shows different threads and how they signal each other. It&#8217;s simple yet quite clear what is going an. The second image is taken from a CodeProject documentation about a <a href="http://www.codeproject.com/KB/recipes/geneticlibrary.aspx">genetic library</a> (<a href="http://www.codeproject.com/KB/recipes/geneticlibrary/ga_multithread_alg.png">original image</a>). It sort of uses UML symbols but it&#8217;s not clear what happens at the fork and join points. The way I figure it, those symbols inside the threads are supposed to be branches not forks. The third image is also from a <a href="http://www.codeproject.com/KB/cs/DisposeWindowsFormsApp.aspx">CodeProject page</a> &#8211; this time it&#8217;s a how-to about avoiding an exception when using multiple threads (<a href="http://www.codeproject.com/KB/cs/DisposeWindowsFormsApp/Solution_ThreadDiagram.JPG">original image</a>). It reminds me of a sequence diagram. There are no blocking states in the diagram and I figure in this particular application the threads are non-blocking so diagram fits the application perfectly. The fourth diagram I liked the most. It&#8217;s from the <a href="http://www.cs.mtu.edu/~shene/NSF-3/e-Book/">Multithreaded Programming with ThreadMentor</a> tutorial (<a href="http://www.cs.mtu.edu/~shene/NSF-3/e-Book/SEMA/DIAGRAM-smoker.jpg">original image</a>) and has special symbols for sending signals and waiting for signals.</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2009/06/threading.svg"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2009/07/threading.png" alt="threading" title="threading" width="450" height="555" class="alignnone size-full wp-image-313" /></a></p>
<p>So I gave it a try myself and tried to model a simple controller and worker thread scenario based on the last of the example diagrams I found. The gray boxes and circle represent a signaling concept where one thread can send a signal and the other thread waits until it receives the signal. I also included a shared variable that handles the task shutdown. One thread can set the variable and the other branches depending on that variable. I am not happy yet with this particular part of the image. If anyone has a better idea or pointer to resources on that topic feel free to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2009/07/visualizing-multithreading.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building a simple ECG Amplifier</title>
		<link>http://www.soa-world.de/echelon/2008/12/simple-ecg-amplifier.html</link>
		<comments>http://www.soa-world.de/echelon/2008/12/simple-ecg-amplifier.html#comments</comments>
		<pubDate>Sat, 20 Dec 2008 19:30:33 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=230</guid>
		<description><![CDATA[A friend and I joined forces to build a simple ECG (or EKG) Amplifier for our Signal Processing class at University of Applied Sciences Regensburg. We searched the web, magazines and books for suitable circuit diagrams and instructions on how to build one. We found that the instrumentation amplifier INA121 (datasheet) was a suitable IC [...]]]></description>
			<content:encoded><![CDATA[<p>A friend and I joined forces to build a simple ECG (or EKG) Amplifier for our Signal Processing class at University of Applied Sciences Regensburg. We searched the web, magazines and books for suitable circuit diagrams and instructions on how to build one. We found that the instrumentation amplifier INA121 (<a href='http://www.soa-world.de/echelon/wp-content/uploads/2008/12/ina121.pdf'>datasheet</a>) was a suitable IC and also the precision instrumentation amplifier AD624 (<a href='http://www.soa-world.de/echelon/wp-content/uploads/2008/12/ad624ad.pdf'>datasheet</a>) mentioned in <a href="http://www.sciam.com/article.cfm?id=home-is-where-the-ecg-is">this Scientific American article</a> seem to be viable option. However as it turned out those ICs are very hard to come by and rather expensive ranging from about $10 to over $50.</p>
<p>We also found a quite professional solution in <a href="http://www.funkamateur.de/">Funkamateur</a>, edition 12/93, pages 794-796. The article is in German and can be found <a href='http://www.soa-world.de/echelon/wp-content/uploads/2008/12/biover_funkamateur.pdf'>here</a>. We found another very simple circuit diagram for an amplifier in <a href="http://www.elektor.de/">Elektor</a>, edition 7-8/2000 that we ended up building. Here&#8217;s the diagram:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/elektor.jpg"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/elektor.jpg" alt="" title="Elektor Einfacher EKG Verstaerker" width="480" height="409" class="alignleft" /></a></p>
<p>The components cost about 10â?¬. We built in on two breadboards one for the amplifier itself and one for the power supply. With two 9V batteries connected it supplies -9V and +9V. Here&#8217;s a picture of the amplifier board:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/ekg_schaltung.jpg"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/ekg_schaltung.jpg" alt="" title="EKG Lochraster" width="500" height="385" class="alignleft size-full wp-image-242" /></a></p>
<p>Green red and black cables are connected to the power supply, the thick black cables are connected to the subject and at the bottom there are two pins to connect the oscilloscope probe or an AD-converter.<br />
We used real ECG pads from the hospital to collect the signal from the subject. At first we used regular unshielded copper cables to connect the electrodes which resulted in a lot of noise. We then replaced the copper cables with shielded thin microphone cables and connected the shield to ground. This hugely reduced the signal noise. Here&#8217;s an image showing an EKG taken with our amplifier:</p>
<p><a href="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/bild1.png"><img src="http://www.soa-world.de/echelon/wp-content/uploads/2008/12/bild1.png" alt="" title="EKG Corina" width="600" height="339" class="alignnone size-full wp-image-244" /></a></p>
<p>The electrodes are connected to right hand, left hand and right foot. As you can see it&#8217;s pretty much what you would expect. You can see the P-wave, the QRS-complex and the T-wave. We&#8217;re quite happy with the results.</p>
<p>If you try to build something like this yourself please be advised that you should be careful when connecting this amplifier to anything that carries high voltage (line voltage). The amplification circuit and measuring devices are not separated from each other. So you should only use battery powered devices like a USB oscilloscopes connected to a laptop running on battery. This is important as you 	consciously connect the subject to your circuit in a very well conducting manner (because that&#8217;s what you want) and at very dangerous points. So you should take care that no high voltages can flow between the electrodes at any time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2008/12/simple-ecg-amplifier.html/feed</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Convertig CSV files to LibSea graph files for CAIDA&#8217;s Walrus</title>
		<link>http://www.soa-world.de/echelon/2008/10/convertig-csv-files-to-libsea-graph-files-for-caidas-walrus.html</link>
		<comments>http://www.soa-world.de/echelon/2008/10/convertig-csv-files-to-libsea-graph-files-for-caidas-walrus.html#comments</comments>
		<pubDate>Sun, 05 Oct 2008 10:09:47 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=138</guid>
		<description><![CDATA[Quite a few responses to my posts about social network visualization with Walrus contained questions about how to create the input files for Walrus. Walrus itself is very well documented and the LibSea graph file format is also explained in detail. But people seem to run into trouble when trying to create the spanning tree [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a few responses to <a href="http://www.soa-world.de/echelon/2008/09/visualization-of-social-network-reloaded.html">my</a> <a href="http://www.soa-world.de/echelon/2007/01/visulization-of-social-network.html">posts</a> about social network visualization with <a href="http://www.caida.org/tools/visualization/walrus/">Walrus</a> contained questions about how to create the input files for Walrus. Walrus itself is very well documented and the <a href="http://www.caida.org/tools/visualization/libsea/">LibSea</a> graph file format is also explained in detail. But people seem to run into trouble when trying to create the <a href="http://en.wikipedia.org/wiki/Spanning_tree_(mathematics)">spanning tree</a> required for Walrus.<br />
<img src="http://www.soa-world.de/echelon/wp-content/uploads/2008/10/walruscsv1.gif" alt="" title="walruscsv logo" width="302" height="77" class="alignnone size-full wp-image-149" style="float: left; padding-right: 5px;"/><br />
The Walrus documentation states that it only makes sense to visualize data that contain a meaningful spanning tree and that visualizations created with the help of an arbitrary spanning tree are not very useful. While that&#8217;s probably true the visualizations still look awesome. And I guess that&#8217;s what people want. Furthermore Raffael Marty from <a href="http://secviz.org/">secviz.org</a> contacted me and asked if I had a tool that could read CSV files as input and output a LibSea file for Walrus. </p>
<p>I didn&#8217;t have such a tool but it sounded like a fun challenge and I thought that such a tool might also help all the people who run into trouble when trying to create a spanning tree for their graphs. So I created walruscsv &#8211; a command line tool written in C++ that reads a CSV and outputs a LibSea graph file that can be visualized with Walrus. The CSV file hast to contain a link in each row and consist of 2 columns. The first column in each row represents the first node of the link and the second column the second node of the link. It automatically generates an <em>arbitrary</em> spanning tree.</p>
<p>A sample CSV file containing the links node1<->node2, node1<->node3, node3<->node4 could look like this:</p>
<p class="codebox">
node1,node2<br />
node1,node3<br />
node3,node4
</p>
<p>Although Walrus is only capable of visualizing one network at a time walruscsv can handle multiple networks in one CSV file. It creates an arbitrary node and connects a node of each network to that node enabling Walrus to visualize the data. Currently the tool creates an arbitrary spanning tree so it&#8217;s not weighted and therefore not minimal.</p>
<p>Walruscsv reads the name of the CSV file to process as the first command line parameter passed to it. It is released under a non restrictive open source license so in addition to binaries the source code is provided. To compile it using the <a href="http://gcc.gnu.org/">GNU C++ compiler</a> simply type:</p>
<p class="codebox">g++ wlink.cpp main.cpp wtree.cpp -o walrus.exe
<p>
You can use the program by typing</p>
<p class="codebox">walrus.exe testfile1.csv
<p>
whereas testfile1.csv is the CSV file containing the graphs you want to visualize. Bloodshed <a href="http://www.bloodshed.net/devcpp.html">Dev-C++</a> can also be used to compile the code and although I didn&#8217;t try it it should also work with C++ compilers from Microsoft (e.g. using Visual Studio). Here are the files:</p>
<p><a href="http://www.soa-world.de/dev/walruscsv/walruscsv.zip">Source code</a> (the source code released to the public domain)<br />
<a href="http://www.soa-world.de/dev/walruscsv/testdata.zip">Test files</a> (a collection of test CSV files)<br />
<a href="http://www.soa-world.de/dev/walruscsv/walruscsv-win32.zip">Win32 binary</a><br />
<a href="http://www.soa-world.de/dev/walruscsv/walruscsv-debian-x86_64.zip">Debian x86 64bit binary</a></p>
<p>If you&#8217;re having trouble using or compiling the tool or if you have suggestions or comments of if you find a bug feel free to <a href="mailto:echelon.blog@gmail.com">contact me</a> or leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2008/10/convertig-csv-files-to-libsea-graph-files-for-caidas-walrus.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Visualization of Social Network Reloaded</title>
		<link>http://www.soa-world.de/echelon/2008/09/visualization-of-social-network-reloaded.html</link>
		<comments>http://www.soa-world.de/echelon/2008/09/visualization-of-social-network-reloaded.html#comments</comments>
		<pubDate>Fri, 12 Sep 2008 07:54:30 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=105</guid>
		<description><![CDATA[Update: I created a tool to convert CSV files to Walrus compatible LibSea files. Check out walruscvs here.
About one and a half years ago I spent a considerable amount of time experimenting with social network visualization. My methods to gather and generate the data for the visualization tools I used were very limited. 
However just [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> I created a tool to convert CSV files to Walrus compatible LibSea files. Check out <a href="http://www.soa-world.de/echelon/2008/10/convertig-csv-files-to-libsea-graph-files-for-caidas-walrus.html">walruscvs here</a>.</p>
<p>About <a href="http://www.soa-world.de/echelon/2007/01/visulization-of-social-network.html">one and a half years ago</a> I spent a considerable amount of time experimenting with social network visualization. My methods to gather and generate the data for the visualization tools I used were very limited. </p>
<p>However just after posting my first results I stumbled upon the <a href="http://studivz.irgendwo.org/">Studivz Statistics page</a> created by Hagen Fritsch who crawled the entire social network within only 4 hours in November 2006. Back then security measures were virtually non existent so it was an easy thing to do. Today the <a href="http://www.studivz.net/">Studivz</a> (which is a German <a href="http://www.facebook.com/">Facebook</a> clone) uses a <a href="http://en.wikipedia.org/wiki/Captcha">Captcha</a> to prevent such endeavors. </p>
<p>Hagen Fritsch was so kind as to make the data he crawled available to me. Thanks Hagen! Not all the data, just the relevant pages to determine the connections between users in particular the &#8220;Friends&#8221; pages. So now after 1 and a half years I found some time to look at the data, analyze it and feed it to <a href="http://www.caida.org/tools/visualization/walrus/">Walrus</a>. Some results: </p>
<p><a href="http://www.flickr.com/photos/ebastian/2848725101/" title="Social Network Visualization with Walrus 1 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3113/2848725101_1bd8571504_m.jpg" width="240" height="174" alt="Social Network Visualization with Walrus 1" /></a> <a href="http://www.flickr.com/photos/ebastian/2848725119/" title="Social Network Visualization with Walrus 5 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3265/2848725119_45102b32e3_m.jpg" width="240" height="174" alt="Social Network Visualization with Walrus 5" /></a></p>
<p>The first graph consists of 17142 nodes and 22838 links whereas 17141 links are part of the spanning tree Walrus uses for rendering. The second graph consists of 25313 nodes and 37794 links. Four levels of the social network are displayed meaning the tree&#8217;s depth is 4.</p>
<p><a href="http://www.flickr.com/photos/ebastian/2848729961/" title="Huge Social Network Visualization with Walrus 5 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3095/2848729961_2ab972a426_m.jpg" width="240" height="174" alt="Huge Social Network Visualization with Walrus 5" /></a> <a href="http://www.flickr.com/photos/ebastian/2849561362/" title="Huge Social Network Visualization with Walrus 6 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3152/2849561362_a6fd6b6c8d_m.jpg" width="240" height="174" alt="Huge Social Network Visualization with Walrus 6" /></a></p>
<p>This two images show one of the largest graphs I created: 413193 nodes and 1247702 links with a tree depth of four. The left images only shows the spanning tree and the image on the right shows the entire network. When working with such large networks I encountered a couple of problems. </p>
<p>I was using PHP to create the Walrus graph file. Because of the spanning tree this is no trivial task and it became very clear that PHP is the wrong tool for it. A PHP script ran for about 4 hours to create a 30000 node graph file. I wanted bigger trees so I ported the PHP script to C++ and was surprised to find that the same task took mere seconds. This is not due to inefficient coding but PHP definitely has problems when dealing with huge junks of data especially when they are stored in associative arrays. In C++ I used <a href="http://www.sgi.com/tech/stl/hash_map.html">hash_maps</a> which worked out perfectly. Here are two more images of the above network:</p>
<p><a href="http://www.flickr.com/photos/ebastian/2849562518/" title="Huge Social Network Visualization with Walrus 4 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3295/2849562518_894a1fce57_m.jpg" width="240" height="174" alt="Huge Social Network Visualization with Walrus 4" /></a> <a href="http://www.flickr.com/photos/ebastian/2848731265/" title="Huge Social Network Visualization with Walrus 3 by einer von denen, on Flickr"><img src="http://farm4.static.flickr.com/3248/2848731265_c3d60beb19_m.jpg" width="240" height="174" alt="Huge Social Network Visualization with Walrus 3" /></a></p>
<p>My Celeron 1.7GHz 512MB RAM workstation thought I was being ridiculous when I loaded the 60MB text file that contained the graph into Walrus. After some swapping and heavy calculation it worked reasonably well though.</p>
<p>If you feel like playing around with Walrus and the data <a href="http://www.soa-world.de/echelon/uploaded_files/graphs.zip">here&#8217;s a zip file</a> containing the 3 networks on display. You can get Walrus <a href="http://www.caida.org/tools/visualization/walrus/">form here</a>. Start Walrus with the following command:<br />
<code>
<pre>
java -Xmx512m -cp mp.jar;antlrall-mod.jar;libsea.jar;walrus.jar H3Main
</pre>
<p></code>I added the &#8220;-Xmx512m&#8221; part to allow java to allocate more memory. This is necessary for the very large graph file. Enjoy! I will try to add a video in the next couple of days. I was also able to extract the university each of the members of the social networks attends so there are a couple of possibilities to create more visualizations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2008/09/visualization-of-social-network-reloaded.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
