<?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>JamsAlx</title>
	<atom:link href="http://www.jamsalx.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamsalx.com</link>
	<description>A bit about tech and a bit about me</description>
	<lastBuildDate>Sun, 15 Apr 2012 20:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Unit testing for CodeIgniter: PHPUnit and CIUnit</title>
		<link>http://www.jamsalx.com/unit-testing-for-codeigniter-phpunit-and-ciunit/</link>
		<comments>http://www.jamsalx.com/unit-testing-for-codeigniter-phpunit-and-ciunit/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 20:15:32 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=146</guid>
		<description><![CDATA[I have been looking into building a Continuous Integration Environment on my Mac for my Code Igniter Projects. To achieve this I need to put together some robust tests, I have selected PHPUnit to use as my test framework as I have used this before. I know that Code Igniter has a built in test Lib http://codeigniter.com/user_guide/libraries/unit_testing.html but this is not robust enough and it will not integrate with my Continuous Integration environment, which in&#8230; <a href="http://www.jamsalx.com/unit-testing-for-codeigniter-phpunit-and-ciunit/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I have been looking into building a Continuous Integration Environment on my Mac for my Code Igniter Projects. To achieve this I need to put together some robust tests, I have selected PHPUnit to use as my test framework as I have used this before. I know that Code Igniter has a built in test Lib <a href="http://codeigniter.com/user_guide/libraries/unit_testing.html" target="_blank">http://codeigniter.com/user_guide/libraries/unit_testing.html</a> but this is not robust enough and it will not integrate with my Continuous Integration environment, which in this case is Jenkins.</p>
<p>To right tests for your code, you need to be able to load in your controllers and models and in turn for them to load in the rest of the Code Igniter core. It is I&#8217;m affried not as easy as just inclueding the classes you want and then instantiating them, you need to have the framework run like a page request. To do this is a bit of a mission, but, being a good little developer rather then reinvention the wheel I fired up Google and started haveing a search around.</p>
<p>I found that someone had started a project called CIUnit, but it seems that the project has gone cold and was not complete. Some more searching turned up a fork of this called My CIUnit. It seemed to be completed &#8211; but slow on the updats. I have used it for a while and it seems to do the job just right.</p>
<p>It was easy to install you just download the latest version from: <a href="https://bitbucket.org/kenjis/my-ciunit" target="_blank">https://bitbucket.org/kenjis/my-ciunit</a>. Then unzip and copy the test folder to the root of you project.</p>
<p>In the test folder there is a folder for each class type; models, controllers, libs ect&#8230; There are examples tests in each folde. There is a PHPUnit xml file which you can use to intagrate the tests in to your chosen Continuous Integration enviroment.</p>
<p>That&#8217;s it easy to install and simple to use, just how I like it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/unit-testing-for-codeigniter-phpunit-and-ciunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project 480: Suspension: Front</title>
		<link>http://www.jamsalx.com/project-480-suspension-front/</link>
		<comments>http://www.jamsalx.com/project-480-suspension-front/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 22:08:24 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Racing]]></category>
		<category><![CDATA[Cars]]></category>
		<category><![CDATA[Suspention]]></category>
		<category><![CDATA[Volvo]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=124</guid>
		<description><![CDATA[Current Suspension Apparently the Volvo 480&#8242;s suspension was designed in partnership with Lotus, so you would hope there is no need to change anything. Well that assumption is mostly right. Although it does have great suspension it has been commercialised somewhat. It&#8217;s a road car designed for comfort and price with handling as a secondary consideration, so we need to tighten and strengthen things up a bit. The front suspension is a normal MacPherson strut(MacPherson&#8230; <a href="http://www.jamsalx.com/project-480-suspension-front/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<h2>Current Suspension</h2>
<p>Apparently the Volvo 480&#8242;s suspension was designed in partnership with Lotus, so you would hope there is no need to change anything. Well that assumption is mostly right. Although it does have great suspension it has been commercialised somewhat. It&#8217;s a road car designed for comfort and price with handling as a secondary consideration, so we need to tighten and strengthen things up a bit.</p>
<p>The front suspension is a normal MacPherson strut(<a href="http://en.wikipedia.org/wiki/MacPherson_strut">MacPherson Wikipedia</a>):</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/mac-strut.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/mac-strut.jpg" alt="Mac Strut" title="mac-strut" width="600" height="367" class="aligncenter size-full wp-image-139" /></a></p>
<p><span id="more-124"></span></p>
<p>This is pretty much the standard for front wheel drive cars and it&#8217;s a great design with few drawbacks over other FF (Front steer, Front drive) suspension designs.</p>
<h2>Tightening</h2>
<p>Why do we need to tighten things up?</p>
<p>Normal cars have all the suspension parts attached to the car by rubber bushes. Rubber bushes enable you to join two metal components together, it helps to reduce vibration in the car, and metal on metal wear. Also road cars are designed for comfort, so the springs which cushion the car from lumps and bumps in the road, are quite soft.</p>
<p>Soft springs and squidgy rubber all adds up to unwanted movement. When you turn the steering wheel, all that unwanted movement gets soaks up, so the first few movements don&#8217;t turn the wheels. Also any bumps that hit the wheel will move the suspension parts around.</p>
<p>To tighten things up we need to do two thing, replace all the rubber bushes with something called Rose Joints. These are metal joints, that have the suspension parts to move only in the direction they are required to. This, coupled with some harder springs, will reduce all the slack in the front suspension. We will also get the added benefit of greater feedback though the wheels and suspension to the steering wheel, which allows the driver to gauge the road surface and let you know when you fit an apex.</p>
<h2>Strut Bracing</h2>
<p>One of the problems you can get with MacPherson strut suspension is lateral movement on the top suspension mounts. This is where the coil-over damper that also acts as a support, mounts to the body work. From the diagram below you can see where the issue is:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/front-suspention.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/front-suspention.jpg" alt="" title="front-suspention" width="600" height="199" class="aligncenter size-full wp-image-143" /></a></p>
<p>To solve this you create a bar that attaches to each mount which keeps them at the same distance apart:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-front.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-front.jpg" alt="Strut Brace" title="strut-brace-front" width="600" height="227" class="aligncenter size-full wp-image-140" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-top.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-top.jpg" alt="Strut Brace" title="strut-brace-top" width="600" height="339" class="aligncenter size-full wp-image-141" /></a></p>
<p>The option I&#8217;m looking to go for would also help movement back and forth under backing and acceleration, bay triangulating between the mount point and a sturdy piece of body work:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-tri.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/strut-brace-tri.jpg" alt="Triangulated Strut Brace" title="strut-brace-tri" width="600" height="352" class="aligncenter size-full wp-image-142" /></a></p>
<h2>Anti-Roll Bar</h2>
<p>Anti-roll bars are a simple idea, but a very effective one. But like most simple ideas implementation is a dark art.</p>
<p>Roll work to reduce the amount of roll you get when a car turns a corner. Reducing roll helps keep weight displacement down and tyre grip up.</p>
<p>A roll bar is a wide u shaped bar, with the middle of the are attached to the body work and each end attached to the upright of each wheel, like this:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/anti-rollbar.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/anti-rollbar.jpg" alt="Anti-Rollbar" title="anti-rollbar" width="600" height="243" class="aligncenter size-full wp-image-138" /></a></p>
<p>When you go over a speed bump for instance both suspension uprights rise and fall in much the same amount, and the anti-rollbar just rise and fills along with this movement. But when you&#8217;re cornering one side of your car is lifting and the other side is falling, the wheel uprights match this. As the roll bar is attached to the uprights, the roll bar is twisted, and by doing so applies a counter pressure as it tries to untwist itself. This untwisting is what levels out your car.</p>
<p>But mounting points, thickness, material, radius and arm lengths all effect how well your anti-rollbar works. This is where the dark art bit comes in. When I have finished the breaks and suspension modifications I&#8217;ll come back to the anti-rollbar and do the complicated maths to see if the stock one is good enough, I&#8217;m guessing not.</p>
<h2>Coil Over Shock Absorbers</h2>
<p>One of the other tasks I need to carry out on the front suspension, is to replace the front damper and spring for an uprated version. Up rated in this case meaning, stronger and more adjustable. I&#8217;ll have to dome some maths on this to work out ride height and spring rating, when I have taken the existing suspension apart, so I can measure the wishbone length to workout the rate of leverage.</p>
<h2>Options</h2>
<p>As I&#8217;m working to a tight time and budget the options for the 480 are below, and we will just have to see how things get on.</p>
<h6>Platinum</h6>
<p>Convert to SLA (Short Long Arm) double wishbone<br />
+ Gold option</p>
<h6>Gold</h6>
<p>Replace all bushes with rose joints<br />
Make a stronger wishbone<br />
Make a custom upright<br />
Fit a height adjust coil over damper<br />
Make a triangulated strut brace<br />
Upgrade anti-roll bar</p>
<h6>Silver</h6>
<p>New adjustable coilover and basic strut brace</p>
<h6>Bronze</h6>
<p>Do nothing, rock up and hope</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/project-480-suspension-front/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project 480: Engine: 15cc is a bridge too fare</title>
		<link>http://www.jamsalx.com/project-480-engine-15cc-is-a-bridge-too-fare/</link>
		<comments>http://www.jamsalx.com/project-480-engine-15cc-is-a-bridge-too-fare/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 23:10:39 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Racing]]></category>
		<category><![CDATA[Cars]]></category>
		<category><![CDATA[CTCRC]]></category>
		<category><![CDATA[Engines]]></category>
		<category><![CDATA[Volvo]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=133</guid>
		<description><![CDATA[The next part of the engine build I&#8217;m going to cover is more to do with the rules then to do with Horse Power, or at least the interaction between the two. Within the Classic Thunder championship, like with most motorsports championships, cars are divided up into groups called classes. The classes are grouped by engine capacity, and then there are some multipliers added for certain setups. The classes are divided out like this: Class&#8230; <a href="http://www.jamsalx.com/project-480-engine-15cc-is-a-bridge-too-fare/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>The next part of the engine build I&#8217;m going to cover is more to do with the rules then to do with Horse Power, or at least the interaction between the two.</p>
<p>Within the Classic Thunder championship, like with most motorsports championships, cars are divided up into groups called classes. The classes are grouped by engine capacity, and then there are some multipliers added for certain setups.</p>
<p><span id="more-133"></span></p>
<p>The classes are divided out like this:<br />
Class B &#8211; 2,901cc to 3,600cc<br />
Class C &#8211; 2,151cc to 2,900cc<br />
Class D &#8211; 1,701cc to 2,150cc<br />
Class E &#8211; 1,401cc to 1,700cc<br />
Class F &#8211; Up to 1,400cc</p>
<p>The following rules also apply cumulatively;<br />
• Forced induction is subject to an equivalency factor of 1.7<br />
• Rotary engines are subject to an equivalency factor of 1.8<br />
• Cars on List 1a or 1b tyres move down one class<br />
• Cars running sequential gearboxes move up one class<br />
• Cars with any original suspension mounts not visible (see section 5.8) move up one class<br />
• Cars using engine block AND cylinder head AND transmission casings AND number of forward gears AND original suspension pickup points AND glass windscreen AND has the engine in the original location (+-15mm) AND, if using forced induction, uses the original inlet AND exhaust manifolds AND original capacity supercharger/turbocharger unit as the original car move down one class</p>
<p>Let&#8217;s see how the 480 fits in to this. The engine displacement is 1721cc, but as the Volvo is turbocharged we need to times the CCs by 1.7. So this brings it up to 2925.7, this means it just scrapes into class B. This is not a good place to be for two reasons, first we are at the very bottom of the class and secondly the target BHP for that class is 400bhp, well out of range of the little 480.</p>
<p>Target BHP for the classes:<br />
Class D &#8211; 230BHP<br />
Class C &#8211; 300BHP<br />
Class B &#8211; 400BHP</p>
<h2>Target Class</h2>
<p>In fact the target class we want is Class D. To do this we need to reduce the CC of the engine and run with semi-slick road tyres to drop us down a further class. Using semi-slick tyres wont drop my lap times down that much, and in relation to driving in a class that is running 70bhp more then me it&#8217;s going to be a life saver.</p>
<h2>Reduction</h2>
<p>We have two options here, drop the CC down or increase the CCs to the max in that class.</p>
<p>I don&#8217;t think boring out the engine to up it&#8217;s CC is necessarily a good idea. It will mean that the weight limit will be increased (as weight is linked to CC), and it means that everything else in the engine will have to be upgraded.</p>
<p>The next option is to reduce the engine down by 15.15cc. This would put it at the very top of the class C. The first way I thought of doing this, was a little unconventional, and that is to skim the cylinder head and piston crowns down by 0.73mm. This would then reduce the chamber down by 15.15cc. But after checking with the CTCRC, this would not give a reduced CC as the calculate it. They calculate CC by the Bore and Crank Stroke &#8211; which to honest is how everyone else does it. So, as I&#8217;m not reducing them, it would still remain at 1721cc, even though if you filled the chamber with water it would be 15.15cc less.</p>
<p>This leaves me with two options reduce the Stroke or reduce the Bore:</p>
<h5>Reducing Stroke</h5>
<p>Reduce the stroke of the crank, this can be done it two ways, get a custom crank made, which will be very pricy indeed. Or reground the crank so that with the use of oversized bigend bears the conrod would be moved down thus reducing the stroke. I would then have to skim the cylinder head to match things up. After speaking with one racing shop, the reduction I need to make of 0.73mm would be to much to make as the largest bigend bearings available is 0.75mm and would not give enough room for balancing. This is a real shame as it&#8217;s going to be the cheapest option and I would have the added advantage of having a balanced crank too. I&#8217;m still very hopeful about this option and when I get a chance I&#8217;m going to call round and see if I can find somewhere else that might be able to do it.</p>
<h5>Reducing Bore</h5>
<p>To reduce the bore things get very messy. First job is to &#8220;sleeve&#8221; the cylinder block. This involves drilling the cylinders out to a size larger then you need, then adding in a cylinder of metal (sleeve) in under pressure. When that is all done we bore out the cylinder out to the smaller size you require. We then need to reduce the size of the pistons to fit, this is is done by make brand new costume pistons based on the design of the piston that was in there before. We then also need to match the head to fit the new piston and cylinder block. It&#8217;s a lot of work and more then my entire budget for the build. This is pretty much ruled out.</p>
<h2>Other Options?</h2>
<p>There is a rule we could use to are benefit here but what it gives with one had it takes with the other. &#8220;Cars using engine block AND cylinder head AND transmission casings AND number of forward gears AND original suspension pickup points AND glass windscreen AND has the engine in the original location (+-15mm) AND, if using forced induction, uses the original inlet AND exhaust manifolds AND original capacity supercharger/turbocharger unit as the original car move down one class&#8221; This means that if I run with mainly modified stock parts rather then fully custom, then I can drop down a class and not need to reduce the engine size. The problem with this is that you have to run with the stock turbo and the one fitted to the 480 was small, a Garrett T2. This means that the turbo becomes the main blocker in getting extra power out of the engine. Can I get 230+bhp out of a Garrett T2? I&#8217;m not sure.</p>
<p>Research tells me that the AFR (Air Flow Rate) on it will cures me problems, but I have seen documentation saying that it can be good for up to 260bhp. I can grind out the inlet and outlet as well as use an external waste gate. If I use an oversized external waste gate and create almost it&#8217;s own separate exhaust for it, then I could use this to stop the turbo become an air flow blocker but, but as the RPM and air flow increases the turbo will become less and less effective.</p>
<p>The stats that I have found on the turbo are that it&#8217;s a TB0262, and the details on the internals are:</p>
<table>
<tr>
<td colspan="3">Compressor</td>
<td colspan="3">Turbine</td>
</tr>
<tr>
<td>Inducer Wheel Dia(mm)</td>
<td>Exd Whl Dia(mm)</td>
<td>Trim</td>
<td>Ind Whl Dia(mm)</td>
<td>Exd Whl Dia(mm)</td>
<td>Trim</td>
</tr>
<tr>
<td>47.12</td>
<td>35.48</td>
<td>57</td>
<td>37.24</td>
<td>48.01</td>
<td>66</td>
</tr>
</table>
<p>This is just internet research so I would need to take the turbo off the car and check to be sure it&#8217;s correct. I had a look at the current Garrett specs and an equivalent turbo GT2056, an it&#8217;s giving me a BHP range of 140bhp &#8211; 260bhp. So might be ok, but that is a modern turbo.</p>
<p>Capacity referred to in the turbo reg is the internal capacity of the turbo, I&#8217;m not sure how you work that out, but if I can work that out I can replace the current turbo with another of the same capacity, but hopefully find a more efficient turbo.</p>
<h2>Conclusion</h2>
<p>This is a prime example of the balancing act you have to do between: Budget, Competitiveness, Rules, Time and Ability. This balancing act is something I&#8217;ll be wrestling with throughout the build.</p>
<p>I need to do more research in to regrinding the crank and modifying the stock components. If anyone has any ideas or solutions to this please add them to the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/project-480-engine-15cc-is-a-bridge-too-fare/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Project 480: Engine: ECU</title>
		<link>http://www.jamsalx.com/project-480-engine-ecu/</link>
		<comments>http://www.jamsalx.com/project-480-engine-ecu/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 22:20:24 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Racing]]></category>
		<category><![CDATA[Cars]]></category>
		<category><![CDATA[ECU]]></category>
		<category><![CDATA[Engines]]></category>
		<category><![CDATA[MegaSquirt]]></category>
		<category><![CDATA[Volvo]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=122</guid>
		<description><![CDATA[Time to talk engines! I&#8217;m going to start with the engine as it&#8217;s the part of the build that I&#8217;m most experienced with. There is a lot to do on the engine so I will split it out in to different posts. As I mentioned before the 480 had it&#8217;s BHP reduced by Volvo from 190bhp to 120bhp. This was done mainly by the cars ECU (Engine Control Unit) So the first thing to do&#8230; <a href="http://www.jamsalx.com/project-480-engine-ecu/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Time to talk engines!</p>
<p>I&#8217;m going to start with the engine as it&#8217;s the part of the build that I&#8217;m most experienced with. There is a lot to do on the engine so I will split it out in to different posts.</p>
<p>As I mentioned before the 480 had it&#8217;s BHP reduced by Volvo from 190bhp to 120bhp. This was done mainly by the cars ECU (Engine Control Unit) So the first thing to do is reprogram or replace this.</p>
<p><span id="more-122"></span></p>
<p>After a lot of research I found that one of the guys on the Volvo 480 Forum had come up with a way of reprogramming the stock Volvo ECU. But guy has retired from creating them, and the ones that he did make are hard to find.</p>
<p>The next option I looked at was to create my own ECU using something like an Arduino or Propeller Microcontrollers. Although this does appeal to my Geeky programing side, due to time constraints &#8211; Championship starts in March &#8211; I shelved this idea. I might still come back to using Microcontrollers in another part of the build.</p>
<p>The next is an aftermarket programmable ECU. There are several option of ECUs out there but the one that I have researched before and heard the most about is by MegaSquirt. One of the things that attracts me to the ECU is that you can buy it as a self assembly kit. This means you can buy it for cheaper then an assembled ECU, and as I can solder and have a fair grasp of electronics I should have no problems assembling it.</p>
<p>There are a few different versions out there MS1, MS2 and MS3. MS3 is the latest version and most expensive, but the features it provides over the others does not justify the extra money. MS1 lakes some of the features I want, mainly spark plug control. I think you can guess where this is going, and like Goldilocks the middle one is just right&#8230; The MS2 has both Fuel Injection control and Spark control. There is also some MS2 Extra code that gives you sequential fuel injection. So after some research I found that again, the best place was eBay and I picked up a good deal, and this is what I have to contend with:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/megasquirt-e1328019878234.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/megasquirt-e1328019878234-286x300.jpg" alt="" title="megasquirt" width="286" height="300" class="aligncenter size-medium wp-image-129" /></a></p>
<p>Time to start soldering&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/project-480-engine-ecu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project 480: Off to the races</title>
		<link>http://www.jamsalx.com/project-480-off-to-the-races/</link>
		<comments>http://www.jamsalx.com/project-480-off-to-the-races/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 22:15:31 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Racing]]></category>
		<category><![CDATA[Cars]]></category>
		<category><![CDATA[CTCRC]]></category>
		<category><![CDATA[Volvo]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=121</guid>
		<description><![CDATA[So I&#8217;m really going to do it&#8230; Honest, promise, well at least try, hopefully, possibly. I have been going on about building a car or racing a car for a long time now. But this time I&#8217;m actually going to get past planning and buying a few parts. Before I was trying to do it on too much of a shoe string budget with no real place to build it. Now I have the Lab&#8230; <a href="http://www.jamsalx.com/project-480-off-to-the-races/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m really going to do it&#8230; Honest, promise, well at least try, hopefully, possibly.</p>
<p>I have been going on about building a car or racing a car for a long time now. But this time I&#8217;m actually going to get past planning and buying a few parts. Before I was trying to do it on too much of a shoe string budget with no real place to build it. Now I have the Lab (garage) I have somewhere to build it in the dry and as for the budget, that&#8217;s not really changed, but I hit it lucky, and got a great deal on a car.</p>
<p><span id="more-121"></span></p>
<p>One of the my weak points when it comes to projects like this, is my obsession with unlikely car choices. More specifically with the use of a Volvos. Although on the face of it, a group of cars renowned for there &#8216;wardrobe on wheels&#8217; look might not first seem like a good choice I maintain it is. Volvo make a lot of brilliant engines (well at least they used to) which have been used in some very fast cars, across multiple brands. Volvo&#8217;s 850 did fatalistically well in British Touring car racing (<a href="http://en.wikipedia.org/wiki/Volvo_850#Motorsport" target="_blank">Wikipedia Volvo 850 in Motorsports</a>), and the current C30 and S60 are winning in Scandinavian Touring Car Racing and SCCA Pro Racing World Challenge. I also have a bit of an ace up my sleeve with the Volvo I have chosen, it&#8217;s the Volvo 480, not really your typical Volvo. It&#8217;s a sleek two door coupe.</p>
<p><img alt="" src="http://www.volvoracing.co.uk/images/cars/xvolvo-480.jpg.pagespeed.ic.TzOdiRmu5j.jpg" title="Volvo 480" class="alignnone" width="500" height="205" /></p>
<p>The <a href="http://www.volvoracing.co.uk/cars/volvo-480" target="_blank">Volvo 480 Turbo</a> was the first car to have a full electronic ECU and had better or similar performance and handling then the Golf GTi of the same era (<a href="http://www.volvoracing.co.uk/cars/volvo-480#video" target="_blank">There some great test videos of the 480 against the GTi here</a>). But by no means is this going to be an easy car to race. After speaking with the people who run the series I&#8217;m looking to race in, any other choice then a BMW M3 is going to be hard work. The problem is that the 480 unlike the M3 was never meant to be a full on race car and it was never entered into any race series during it&#8217;s production. This means that there are no aftermarket parts available within the race series rules. Where as the M3 had aftermarket part homologated for the race series.</p>
<p>The way I look at it, if the only option is the BMW M3 you might as well race in a BMW championship and all drive them, and not in a mixed car championship.</p>
<p>After looking around I found that the <a href="http://www.csccgb.co.uk/" target="_blank">CTCRC (Classic Touring Car Racing Club)</a>  would be the best fit for the type of racing and cars I&#8217;d like to use. More specifically after looking at the rules, and selecting the car that I have, I&#8217;ll be trying to race in the <a href="http://www.csccgb.co.uk/champ_thunderboss.html" target="_blank">Classic Thunder Championship</a>. Classic Thunder has fewer restrictions and rules, on what parts you can use, and what you can do to the cars. This appeals to the mad-scientist and bodger in me. This does come with one down side, most if not all of the people in the series are seasoned professionals and the cars, they&#8217;re quick and at the top of their game.</p>
<p>If it was easy, it wouldn&#8217;t be fun now would it?</p>
<p>Lets find out more about the trusty steed and what we need to do to get it to championship spec:</p>
<table cellpadding="10px">
<tr>
<td></td>
<td>Volvo 480</td>
<td>Championship</td>
</tr>
<tr>
<td>Power</td>
<td>120bhp</td>
<td>230bhp</td>
</tr>
<tr>
<td>Weight</td>
<td>995kg</td>
<td>854kg</td>
</tr>
</table>
<p>The weight is not going to be an issue, just removing the seats, carpets and trim has to be getting close to 100kg reduction I would need. But I will have to weigh things as I remove them, to get a better idea.</p>
<p>Power wise the 120bhp is looking a bit bleak for the little Volvo. But 120bhp is not the true capability of the Volvo. From research, I found out that the 480 when first built by Volvo had 190bhp but was reduced down before release, as Volvo thought that 190bhp might be too much for there clientele. So 190bhp to 230bhp is less of a jump.</p>
<p>I got my Volvo 480 from eBay. It&#8217;s a 1993 Volvo 480 Turbo, in blue. It&#8217;s in great condition no rust that I can find, even the info center still works. Only issue is that the front tyres have a slow leak and keep going flat, but as I&#8217;m removing the wheels and tyres anyway, it should not really be an issue.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2012/01/KGrHqZiE3dEhEJWBOGCKHeQ_12.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2012/01/KGrHqZiE3dEhEJWBOGCKHeQ_12.jpg" alt="My Volvo 480 Turbo" title="My Volvo 480 Turbo" width="500" height="375" class="aligncenter size-full wp-image-127" /></a></p>
<p>A good base for what is going to be a fun, if hard project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/project-480-off-to-the-races/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bestcookbook.co.uk update: authors and price comparison</title>
		<link>http://www.jamsalx.com/bestcookbook-co-uk-update-authors-and-price-comparison/</link>
		<comments>http://www.jamsalx.com/bestcookbook-co-uk-update-authors-and-price-comparison/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 01:10:56 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[bestcookbook]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=116</guid>
		<description><![CDATA[I&#8217;ve been very bad and not done an update on the site&#8217;s progress in a long while. There&#8217;s been a lot going on. New Features: I have been pretty busy updating the site. First off, as a quick win I added a Google+ button. Next, I created Author pages, which as you can guess gives you a list of all the books the site has for a particular author. It all helps. The next big&#8230; <a href="http://www.jamsalx.com/bestcookbook-co-uk-update-authors-and-price-comparison/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been very bad and not done an update on the site&#8217;s progress in a long while. There&#8217;s been a lot going on.</p>
<p><strong>New Features:</strong><br />
I have been pretty busy updating the site. First off, as a quick win I added a Google+ button. Next, I created Author pages, which as you can guess gives you a list of all the books the site has for a particular author. It all helps.</p>
<p>The next big addition is that I added our first alternative book seller. The Book Depository, is the second seller to go on Bestcookbook.co.uk, so you can now compare prices, on the price comparison site, pretty handy&#8230; I also started trying to add in Tescos through their Beta API, but it only covers groceries, which I found out though much faffing. Hopefully, they will soon expand it out to include books.</p>
<p><span id="more-116"></span></p>
<p>The addition of new sellers lead to several quite big changes to the site. First off, the scraping script that used to be one big script is now redesigned and split out. Now you have a main class that scrapes the latest top 20 from Amazon, then you have satellite scripts triggered over HTTP for concurrency, that scrape the individual book sellers.</p>
<p>The second is that I have gone all newfangled and gone proper OO with the introduction of the Book Object. Now that we have multiple prices we want to be able to  get the cheapest, as well as show all prices in ascending order. But we don&#8217;t want to be handling this in every controller and I didn&#8217;t feel it would work well in a helper. So I created the Book class with is instantiated in the Book model and overrides the standard CI results objects that get return per DB row. It all works pretty sweet and I have a feel of a job well coded, which is why we code in the first place (or at least I do).</p>
<p>Some other features that have been in for a while but I have not mentioned before are: auto updating site maps and OpenGraph on the book pages to make sharing in Facebook and other supported social media sites much easier and look better to users.</p>
<p>So, all in all, a lot of work, especially as it&#8217;s just one of my many side projects, but before you go and rush to check out the new features, there is some bad news. The site is broken at the moment, the scraping tool has had a fail. Since Amazon changed their markup on book pages the scraper has been failing. And due to the way it failed it has stopped the site from working. I did try and code things so that if it failed then the site should live on! But in transferring it over to the new scraper layout I must have put in a dependance by accident (that&#8217;s the trouble with coding late at night after a full<br />
day&#8217;s work). But there is a silver lining, Amazon have released a new API.</p>
<p><strong>Scraping and APIs:</strong><br />
When I first put the site together Amazon had deprecated their API and there was no other way then scraping the site to get the data I needed. The new API should make things a lot easier and more stable. I have started reading though the manual and I should have it all setup soon. As a side note, the new API is very powerful giving the option to have your own shopping cart on your site and passing a complete order over to Amazon to process, where as at the moment you have to send users over with a link to one product and hope they buy the other things your have recommended. I&#8217;m not going to use this feature on this is as it won&#8217;t fit the price comparison model but I will be using it for yet another side project I have in mind.</p>
<p><strong>Traffic &#038; Earnings</strong><br />
At the moment the traffic is not high, in fact it&#8217;s pretty dismal, about 40 monthly uniques and I have yet to make a sale. The lack of sales don&#8217;t bother me too much at the moment, as up until recently there where no prices to compare and there was an issue with prices showing £0 for a week or so, when Book Depository did not have the book listed. I would have hoped for much higher traffic by now. So if you have any suggestions on how to get traffic up let me know. I am thinking of running an Ad Sense campaign closer to Christmas, but we will see if I can get the site up to scratch in time.</p>
<p><strong>What&#8217;s next?</strong><br />
On the author pages I&#8217;d like to get some information about the author from somewhere maybe Wikipedia. I&#8217;m open to suggestions on where I can scrape that from. Obviously I need to get the Amazon API integrated and the site back up and running properly. Then start investigating other book sellers to add in.</p>
<p><strong>Conclusion</strong><br />
It&#8217;s been a bumpy ride so far, but as far as coding experiments go it&#8217;s working well. Lets hope we can get some sales in for Christmas.</p>
<p><a href="http://www.bestcookbook.co.uk" title="Visit the Best Cookbook Price Comparison site" target="_blank">Visit the Best Cookbook Price Comparison site</a><br />
<a href="http://www.jamsalx.com/bestcookbook-co-uk/" title="Previous Bestcookbook.co.uk post">Previous post about Bestcookbook.co.uk</a><br />
<a href="http://www.jamsalx.com/tag/bestcookbook/" title="All Bestcookbook.co.uk posts">All Bestcookbook.co.uk posts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/bestcookbook-co-uk-update-authors-and-price-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TimesCube &#8211; Arduino based standalone web-client cube thing</title>
		<link>http://www.jamsalx.com/timescube-arduino/</link>
		<comments>http://www.jamsalx.com/timescube-arduino/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 20:17:41 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[feature]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=102</guid>
		<description><![CDATA[As if I was not geeky enough, I have signed up for News International’s weekly Arduino Lunch club&#8230; Yes I’m giving up my own lunch hour to play around with Microprocessors. What is Arduino? A good question, I’m glad you asked. Arduio is an open-source signal-board microprocessor (Don’t know what a microprocessor is? Then your reading the wrong blog! but more info can be found here). It’s powered by 3.5 or 5 volts so is&#8230; <a href="http://www.jamsalx.com/timescube-arduino/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>As if I was not geeky enough, I have signed up for News International’s weekly Arduino Lunch club&#8230; Yes I’m giving up my own lunch hour to play around with Microprocessors.<br />
<span id="more-102"></span><br />
What is Arduino? A good question, I’m glad you asked. Arduio is an open-source signal-board microprocessor (Don’t know what a microprocessor is? Then your reading the wrong blog! but more info can be <a href="http://en.wikipedia.org/wiki/Microcontroller" title="wikipedia Microcontroller" target="_blank">found here</a>). It’s powered by 3.5 or 5 volts so is great for low power and USB based projects. It has it’s own SDK (as limited as it is) and is programed in a language similar to C++.</p>
<p>This project was developed using the Arduino Uno, which the most versatile of the Arduino rage. The Micro and the Mega are also available. The Micro is, as you may have guessed, is a much smaller unit, and conversely the Mega is a much bigger unit with a lot more inputs and outputs available.</p>
<p>When I was at collage I did an extra module on microprocessors, and studied for an A-Level in electronics but never took the exam due to a clash in exam times with my main course. So I feel at home with basic circuits and programming microprocessors.</p>
<p>So what have a been up to with Arduino?<br />
One of the projects was to create a module to sit on people’s desks and dotted around in receptions that would display interesting information about the NI Titles.</p>
<p>Taking an Agile approach to developing it, I split the build up in to tasks:</p>
<p>1, Ethernet/wireless enable the Arduino board<br />
2, Get the Arduino unit communicating with a web-server<br />
3, Interpret the responses<br />
4, Display the responses<br />
5, Human interface</p>
<p>This is what it looks like now:<br />
<a href="http://www.jamsalx.com/wp-content/uploads/2011/09/49f74d8e80c34ec89ad7f16293430f60_7.jpg"><img src="http://www.jamsalx.com/wp-content/uploads/2011/09/49f74d8e80c34ec89ad7f16293430f60_7.jpg" alt="Arduino based web clisent" title="49f74d8e80c34ec89ad7f16293430f60_7" width="612" height="612" class="aligncenter size-full wp-image-114" /></a></p>
<p>The first one was pretty straight forward. There are a lot of modules or Shields for Arduino Uno. Shields available include: Ethernet, WiFi 802.11g/n, Bluetooth and motor controllers to name a few. The Club already had some Ethernet Shields so I used one of them. If you developing on a budget there is a plane to make you own integrated Ethernet enabled Arduino board <a href="http://www.instructables.com/id/A-credit-card-sized-Ethernet-Arduino-compatable-co/" title="Credit card sized Ethernet Arduino compatable" target="_blank">A credit card sized Ethernet Arduino compatable controller board</a>.</p>
<p>With the Ethernet Sheild installed I connected it up to my laptop, and opened the Arduino SDK. Poking around in the net and in the <a href="http://arduino.cc/en/Reference/HomePage" title="Arduino Reference" target="_blank">Arduino manual</a> I found that I should be able to do most of the hard work using <a href="http://arduino.cc/en/Reference/Libraries" title="Arduino Libraries" target="_blank">Arduino Libraries</a>.</p>
<p>To get the Arduino board talking to my MBP over Ethernet, I loaded in the <a href="http://arduino.cc/en/Reference/Ethernet" title="Arudino Ethernet Lib" target="_blank">Ethernet lib</a> and the <a href="http://arduino.cc/en/Reference/SPI" title="Arduino SPI Lib " target="_blank">SPI lib</a>. The SPI library is&#8230; well the manual can explain it better: “Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. It can also be used for communication between two microcontrollers.”.</p>
<p>The Ethernet library comes complete with a set of server and client calls. So talking to the web-server is pretty easy, you just make a GET request, it’s interpreting the response when it starts to get harder. Lets take a look at the Arduino code so far, a lot of this code is just a straight copy of the examples on the Arduino site:</p>
<pre class="prettyprint ">
#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;

byte mac[]       = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
byte ip[]           = {10,0,0,1};
byte server[]   = {10,0,0,100};

Client client(server, 80); // Start client mode

void setup() {
  Ethernet.begin(mac, ip);
  Serial.begin(9600);

  delay(1500); // give the Ethernet a second

  // if you get a connection, report back via serial:
  if(client.connect()) {
    Serial.println(&quot;connected&quot;);
    client.println(&quot;GET / HTTP/1.0&quot;);
    client.println();
  }
}

void loop()
{
    // print out whatever you have been sent or wait before checking again.
    if(client.available()) {
      char c = client.read();
      Serial.print(c);
    } else {
      delay(1000);
    }

    // we have read all we need from the server stop now
    if(!client.connected()) {
      client.stop();
    }
}
</pre>
<p>Rather then assume that everyone knows what is going on with the Arduino, but to avoid turning this into an Arduino 101, I’ll try and weave in the basics. If you’re interested in me writing a 101 guide leave a comment below and if I get enough I&#8217;ll make one.</p>
<p>There are two default functions within an Arduino project, they are setup() and loop(). For the PHP developers out there the setup() function is like the __construct() function. It’s run once on start up. The loop() function is run constantly like a while loop with no end match. So every 16mhz I guess the loop code is run, excluding any delays you put in the code.</p>
<p>In the setup() of this code we initiate the Ethernet class and pass over the IP address details of the client and server. Then we set up the communication speed for the Serial library which is a default included library then enable you to respond back to the programing computer over USB.</p>
<p>Then after a brief delay to enable the Ethernet shield and the library to setup to, we make a basic get all to the remote servers IP address.</p>
<p>Then the loop takes over and listens to the response. This is where it all goes a bit strange. What the loop does is grabs a letter at a time from the response until it’s empty. It also passes over the header information.</p>
<p>Part three, interpreting the response. We need to fire all of the response into a buffer so we can then treat it as an entire string. The code goes something like this:</p>
<pre class="prettyprint ">
#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;

byte mac[]       = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
byte ip[]           = {10,0,0,1};
byte server[]   = {10,0,0,100};

String messageBuffer = &quot;&quot;;

Client client(server, 80); // Start client mode

void setup() {
  Ethernet.begin(mac, ip);
  Serial.begin(9600);

  delay(1500); // give the Ethernet a second

  // if you get a connection, report back via serial:
  if(client.connect()) {
    Serial.println(&quot;connected&quot;);
    client.println(&quot;GET / HTTP/1.0&quot;);
    client.println();
  }
}

void loop()
{
   // print out whatever you have been sent or wait before checking again.
   if(client.available()) {
     char c = client.read();
     messageBuffer.concat(c);
   }

   // we have read all we need from the server stop now
   if(!client.connected()) {
     client.stop();

     if(messageBuffer.length() &gt; 0) {
       lcd.clear();
       sendToScreen(&quot;one&quot;);
       sendToScreen(&quot;two&quot;);
       messageBuffer = &quot;&quot;;
     }
}

void sendToScreen(String find) {
 int from    = messageBuffer.indexOf(&quot;&lt;line_&quot;+find+&quot;&gt;&quot;) + 10;
 int to      = messageBuffer.lastIndexOf(&quot;&lt;/line_&quot;+find+&quot;&gt;&quot;);
 String line = messageBuffer.substring(from, to);

 Serial.print(line);
}
</pre>
<p>As you can see we are pushing the response in to the variable messageBuffer, when the response buffer is empty, we proses the string and string out the details we need. To make life easy I have added in some pseudo XML in to the response to make striping of the header information. The code then separates the two strings and displays them on their respective lines.</p>
<p>A quick conclusion on the Arduino Uno: It’s a great little microprocessor, the learning curve on it is not that steep compared to others on the market. There is enough in/out pins to do most hobby projects. But the biggest win for the Arduino is that it’s high adoption in the market, meaning there are plenty of add-ons, libraries and code examples to help along your way, to creating crazy-ass project you never knew you wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/timescube-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TwitterGalaxy &#8211; Part 2 &#8211; Twitter API Integration into Google Earth using a KML Tour</title>
		<link>http://www.jamsalx.com/twittergalaxy-part-2/</link>
		<comments>http://www.jamsalx.com/twittergalaxy-part-2/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:20:48 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Liquid Galaxy]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=109</guid>
		<description><![CDATA[In my last post TwitterGalaxy – DIY Google Liquid Galaxy from Recycled Monitors with integrated Twitter Feed we had put together massive great array of monitors and I had promised that there was a reason &#8211; other then porn and gaming. The idea is to show the locations and latest Tweets of the Times’ foreign corespondents on Google Earth. The code to do this is not clean but it’s a prototype *cough* so what are&#8230; <a href="http://www.jamsalx.com/twittergalaxy-part-2/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>In my last post <a href="http://www.jamsalx.com/twittergalaxy/" title="TwitterGalaxy – DIY Google Liquid Galaxy from Recycled Monitors with integrated Twitter Feed">TwitterGalaxy – DIY Google Liquid Galaxy from Recycled Monitors with integrated Twitter Feed</a> we had put together massive great array of monitors and I had promised that there was a reason &#8211; other then porn and gaming.<br />
<span id="more-109"></span><br />
The idea is to show the locations and latest Tweets of the Times’ foreign corespondents on Google Earth. The code to do this is not clean but it’s a prototype *cough* so what are you going to do? The reason for the mess in the code is that Google Earth uses a variant on XML, KML to control the content seen in Google Earth. This means you end up with a sea of string concatenation to create the file from you back-end server.</p>
<p>First lets deal with the easy bit and look at getting the Tweet data. Handily, the list of Times correspondents are kept in a Twitter list. Using this and the <a href="https://dev.twitter.com/docs/api/1/get/search" title="Twitter Search API" target="_blank">Twitter search API</a> we can dodge the need to use o’Auth or even have an account. To make life even easier the API call to get a Twitter list returns the latest Tweet for each User in the list, result!. The code goes something like this:</p>
<pre class="prettyprint ">
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;
</pre>
<p>The problem is that none of the tweets or the accounts have Geo tags in, this is for security reasons, so people don&#8217;t know exactly where they are. So we need to add in a look up table (code’s looking clunky already):</p>
<pre class="prettyprint ">
$locations = array(
    'user1'  =&gt; array(&quot;lat&quot; =&gt; '51.50015240', &quot;lng&quot; =&gt; '-0.12623620',        'location' =&gt; 'London'),
    'user2'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user3'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user4'  =&gt; array(&quot;lat&quot; =&gt; '38.89511180', &quot;lng&quot; =&gt; '-77.03636580',       'location' =&gt; 'Washington')
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;
</pre>
<p>Next comes the mess, the Google KML code. First off we have to actually create a file as Google Earth does not support a direct like to anything that does not have a .KML extension. So we can’t just point it to the web server, I guess you could do something with rewrite rules, but I’m not up for that at the moment. Let’s just use the inbuilt PHP functions to write out a .KML file.</p>
<p>I’m going to build up the file step by step, rather then show you all the code and try and explain it. First lest create a KML file with all the locations of the Journalists marked out with a Placemarker:</p>
<pre class="prettyprint ">
$locations = array(
    'user1'  =&gt; array(&quot;lat&quot; =&gt; '51.50015240', &quot;lng&quot; =&gt; '-0.12623620',        'location' =&gt; 'London'),
    'user2'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user3'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user4'  =&gt; array(&quot;lat&quot; =&gt; '38.89511180', &quot;lng&quot; =&gt; '-77.03636580',       'location' =&gt; 'Washington')
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;

$kml = fopen(getcwd().&quot;/tweets.kml&quot;, &quot;w+&quot;);

$content = '';
$content .= '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';
$content .= '&lt;kml xmlns=&quot;http://www.opengis.net/kml/2.2&quot; xmlns:gx=&quot;http://www.google.com/kml/ext/2.2&quot;&gt;';
$content .= '  &lt;Document&gt;';

foreach($correspondents as $k =&gt; $c) {
  $content .= '  &lt;Placemark id=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '    &lt;name&gt;'.ucwords($c-&gt;name).'&lt;/name&gt;';
  $content .= '    &lt;open&gt;0&lt;/open&gt;';
  $content .= '    &lt;description&gt;';
  $content .= '      &amp;lt;img src=&quot;'.$c-&gt;profile_image_url.'&quot; /&amp;gt;';
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Tweet: &amp;lt;/b&amp;gt;'.htmlspecialchars(strip_tags($c-&gt;status-&gt;text));
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Sent: &amp;lt;/b&amp;gt;'.$c-&gt;status-&gt;created_at;
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Location: &amp;lt;/b&amp;gt;'.$locations[$c-&gt;screen_name]['location'];
  $content .= '    &lt;/description&gt;';
  $content .= '    &lt;address&gt;'.$locations[$c-&gt;screen_name]['location'].'&lt;/address&gt;';
  $content .= '  &lt;/Placemark&gt;';
}
$content .= '  &lt;/Document&gt;';
$content .= '&lt;/kml&gt;';

fwrite($kml, $content);
fclose($kml);
</pre>
<p>With the code in place, hit your web server to create the KML file. Now lets load it into Google Earth. Open up Google Earth goto File>Open. Point to the KML file you have created. Now you should have drop pins for all of the locations you listed in you XML file. This is great for a test but we want this to be dynamic so you can update on the KML file on the fly.</p>
<p>To do this in Google Earth you have to create a Network link, which means another KML file. Create a file containing the below code:</p>
<pre class="prettyprint ">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;kml xmlns=&quot;http://www.opengis.net/kml/2.2&quot;&gt;
&lt;NetworkLink&gt;
  &lt;name&gt;Loads Times&lt;/name&gt;
  &lt;Link&gt;
    &lt;href&gt;http://www.YOURSERVER.com/tweets.kml&lt;/href&gt;
    &lt;refreshMode&gt;onInterval&lt;/refreshMode&gt;
    &lt;refreshInterval&gt;240&lt;/refreshInterval&gt;
    &lt;viewRefreshMode&gt;onStop&lt;/viewRefreshMode&gt;
    &lt;viewRefreshTime&gt;0&lt;/viewRefreshTime&gt;
  &lt;/Link&gt;
&lt;/NetworkLink&gt;
&lt;/kml&gt;
</pre>
<p>Change the code to point to your web server and KML file. Now go back in to Google Earth, remove the placmerker file you created earlier by right clicking on it in the side bar and selecting delete. Then go to File>Open select the network file. Now in the right hand bar you should have a network drive listed, if all has gone to plan you will have folder icon with a green network light, if not you will get a red light.</p>
<p>Assuming that the light is green if you click the arrow to the left of the logo you should see your main KML file. Now when you update your code every four minutes Google Earth should update. If you want this to happen quicker you can right click on the network icon and select refresh or edit the network file and reduce the waiting time.</p>
<p>Back to the PHP code again. You can override the default Google Earth displays from your KML file. So lets change the icons from a drop pin to something more interesting, and style up the placemarker overlay box:</p>
<pre class="prettyprint ">
$locations = array(
    'user1'  =&gt; array(&quot;lat&quot; =&gt; '51.50015240', &quot;lng&quot; =&gt; '-0.12623620',        'location' =&gt; 'London'),
    'user2'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user3'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user4'  =&gt; array(&quot;lat&quot; =&gt; '38.89511180', &quot;lng&quot; =&gt; '-77.03636580',       'location' =&gt; 'Washington')
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;

$kml = fopen(getcwd().&quot;/tweets.kml&quot;, &quot;w+&quot;);

$content = '';
$content .= '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';
$content .= '&lt;kml xmlns=&quot;http://www.opengis.net/kml/2.2&quot; xmlns:gx=&quot;http://www.google.com/kml/ext/2.2&quot;&gt;';
$content .= '  &lt;Document&gt;';
$content .= '    &lt;Style id=&quot;barStyle&quot;&gt;';
$content .= '      &lt;IconStyle id=&quot;barIcon&quot;&gt;';
$content .= '        &lt;Icon&gt;';
$content .= '            &lt;href&gt;http://www.YOURSERVER.com/YOURICON.png&lt;/href&gt;';
$content .= '        &lt;/Icon&gt;';
$content .= '      &lt;/IconStyle&gt;';

$content .= '    &lt;BalloonStyle&gt;';
$content .= '      &lt;bgColor&gt;ffffff&lt;/bgColor&gt;';
$content .= '      &lt;text&gt;&lt;![CDATA[';
$content .= '      &lt;b&gt;&lt;font size=&quot;+3&quot; face=&quot;Times New Roman&quot;&gt;$[name]&lt;/font&gt;&lt;/b&gt;';
$content .= '      &lt;br/&gt;&lt;br/&gt;';
$content .= '      &lt;font size=&quot;+2&quot; face=&quot;Times New Roman&quot;&gt;$[description]&lt;/font&gt;';
$content .= '      ]]&gt;&lt;/text&gt;';
$content .= '    &lt;/BalloonStyle&gt;';
$content .= '  &lt;/Style&gt;';

foreach($correspondents as $k =&gt; $c) {
  $content .= '  &lt;Placemark id=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '    &lt;name&gt;'.ucwords($c-&gt;name).'&lt;/name&gt;';
  $content .= '    &lt;open&gt;0&lt;/open&gt;';
  $content .= '    &lt;description&gt;';
  $content .= '      &amp;lt;img src=&quot;'.$c-&gt;profile_image_url.'&quot; /&amp;gt;';
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Tweet: &amp;lt;/b&amp;gt;'.htmlspecialchars(strip_tags($c-&gt;status-&gt;text));
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Sent: &amp;lt;/b&amp;gt;'.$c-&gt;status-&gt;created_at;
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Location: &amp;lt;/b&amp;gt;'.$locations[$c-&gt;screen_name]['location'];
  $content .= '    &lt;/description&gt;';
  $content .= '    &lt;address&gt;'.$locations[$c-&gt;screen_name]['location'].'&lt;/address&gt;';
  $content .= '    &lt;styleUrl&gt;#barStyle&lt;/styleUrl&gt;';
  $content .= '  &lt;/Placemark&gt;';
}
$content .= '  &lt;/Document&gt;';
$content .= '&lt;/kml&gt;';

fwrite($kml, $content);
fclose($kml);
</pre>
<p>When you have saved the code changes, don’t forget to run the code in your browser to update the KML file. Alternatively you can setup a Cron to run and update the KML file. </p>
<p>I’ve made the sizing on the alert boxes much bigger then is needed on a normal screen so you might want to play around with it. This time when you update Google Earth if all has gone according to plan then when you click on a placemarker in the side bar you should see the latest Tweet for that Twitter User.</p>
<p>Now as this is a passive display, we don’t want people to have to go and click on each user to display these tweets. This is where Google Earth tours helps us out. A tour goes thought a list of predefined destinations, then if you click the repeat button in the play/pause controller then it will loop infinitely. This coupled with the network loader means things are now updated automatically.</p>
<p>Here is the code:</p>
<pre class="prettyprint ">
$locations = array(
    'user1'  =&gt; array(&quot;lat&quot; =&gt; '51.50015240', &quot;lng&quot; =&gt; '-0.12623620',        'location' =&gt; 'London'),
    'user2'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user3'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user4'  =&gt; array(&quot;lat&quot; =&gt; '38.89511180', &quot;lng&quot; =&gt; '-77.03636580',       'location' =&gt; 'Washington')
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;

$kml = fopen(getcwd().&quot;/tweets.kml&quot;, &quot;w+&quot;);

$content = '';
$content .= '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';
$content .= '&lt;kml xmlns=&quot;http://www.opengis.net/kml/2.2&quot; xmlns:gx=&quot;http://www.google.com/kml/ext/2.2&quot;&gt;';
$content .= '  &lt;Document&gt;';
$content .= '    &lt;Style id=&quot;barStyle&quot;&gt;';
$content .= '      &lt;IconStyle id=&quot;barIcon&quot;&gt;';
$content .= '        &lt;Icon&gt;';
$content .= '            &lt;href&gt;http://www.YOURSERVER.com/YOURICON.png&lt;/href&gt;';
$content .= '        &lt;/Icon&gt;';
$content .= '      &lt;/IconStyle&gt;';

$content .= '    &lt;BalloonStyle&gt;';
$content .= '      &lt;bgColor&gt;ffffff&lt;/bgColor&gt;';
$content .= '      &lt;text&gt;&lt;![CDATA[';
$content .= '      &lt;b&gt;&lt;font size=&quot;+3&quot; face=&quot;Times New Roman&quot;&gt;$[name]&lt;/font&gt;&lt;/b&gt;';
$content .= '      &lt;br/&gt;&lt;br/&gt;';
$content .= '      &lt;font size=&quot;+2&quot; face=&quot;Times New Roman&quot;&gt;$[description]&lt;/font&gt;';
$content .= '      ]]&gt;&lt;/text&gt;';
$content .= '    &lt;/BalloonStyle&gt;';
$content .= '  &lt;/Style&gt;';

$content .= '  &lt;gx:Tour&gt;';
$content .= '    &lt;name&gt;Play me&lt;/name&gt;';
$content .= '    &lt;gx:Playlist&gt;';
foreach($correspondents as $k =&gt; $c) {
  $content .= '      &lt;gx:FlyTo&gt;';
  $content .= '        &lt;gx:duration&gt;24.0&lt;/gx:duration&gt;';  $content .= '        &lt;LookAt&gt;';
  $content .= '          &lt;longitude&gt;'.getLng($c-&gt;screen_name, $locations).'&lt;/longitude&gt;';
  $content .= '          &lt;latitude&gt;'.getLat($c-&gt;screen_name, $locations).'&lt;/latitude&gt;';
  $content .= '          &lt;altitude&gt;2000&lt;/altitude&gt;';
  $content .= '          &lt;heading&gt;-9&lt;/heading&gt;';
  $content .= '          &lt;tilt&gt;75&lt;/tilt&gt;';
  $content .= '          &lt;range&gt;10000&lt;/range&gt;';
  $content .= '          &lt;gx:altitudeMode&gt;relativeToGround&lt;/gx:altitudeMode&gt;';
  $content .= '        &lt;/LookAt&gt;';
  $content .= '      &lt;/gx:FlyTo&gt;';
}
$content .= '    &lt;/gx:Playlist&gt;';
$content .= '  &lt;/gx:Tour&gt;';

foreach($correspondents as $k =&gt; $c) {
  $content .= '  &lt;Placemark id=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '    &lt;name&gt;'.ucwords($c-&gt;name).'&lt;/name&gt;';
  $content .= '    &lt;open&gt;0&lt;/open&gt;';
  $content .= '    &lt;description&gt;';
  $content .= '      &amp;lt;img src=&quot;'.$c-&gt;profile_image_url.'&quot; /&amp;gt;';
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Tweet: &amp;lt;/b&amp;gt;'.htmlspecialchars(strip_tags($c-&gt;status-&gt;text));
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Sent: &amp;lt;/b&amp;gt;'.$c-&gt;status-&gt;created_at;
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Location: &amp;lt;/b&amp;gt;'.$locations[$c-&gt;screen_name]['location'];
  $content .= '    &lt;/description&gt;';
  $content .= '    &lt;address&gt;'.$locations[$c-&gt;screen_name]['location'].'&lt;/address&gt;';
  $content .= '    &lt;styleUrl&gt;#barStyle&lt;/styleUrl&gt;';
  $content .= '  &lt;/Placemark&gt;';
}
$content .= '  &lt;/Document&gt;';
$content .= '&lt;/kml&gt;';

fwrite($kml, $content);
fclose($kml);
</pre>
<p>Now we have a a block of code to do the tour. When you play the tour, it will fly to each location and then on to the next. Next we want it to fly to a user, pause and show there tweet before moving on to the next:</p>
<pre class="prettyprint ">
$locations = array(
    'user1'  =&gt; array(&quot;lat&quot; =&gt; '51.50015240', &quot;lng&quot; =&gt; '-0.12623620',        'location' =&gt; 'London'),
    'user2'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user3'  =&gt; array(&quot;lat&quot; =&gt; '40.71435280', &quot;lng&quot; =&gt; '-74.00597309999999', 'location' =&gt; 'New York'),
    'user4'  =&gt; array(&quot;lat&quot; =&gt; '38.89511180', &quot;lng&quot; =&gt; '-77.03636580',       'location' =&gt; 'Washington')
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, &quot;https://api.twitter.com/1/lists/members.json?slug=LISTNAME&amp;owner_screen_name=USERNAME&quot;);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($ch);
curl_close($ch);
$correspondents = json_decode($output);
$correspondents = $correspondents-&gt;users;

$kml = fopen(getcwd().&quot;/tweets.kml&quot;, &quot;w+&quot;);

$content = '';
$content .= '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';
$content .= '&lt;kml xmlns=&quot;http://www.opengis.net/kml/2.2&quot; xmlns:gx=&quot;http://www.google.com/kml/ext/2.2&quot;&gt;';
$content .= '  &lt;Document&gt;';
$content .= '    &lt;Style id=&quot;barStyle&quot;&gt;';
$content .= '      &lt;IconStyle id=&quot;barIcon&quot;&gt;';
$content .= '        &lt;Icon&gt;';
$content .= '            &lt;href&gt;http://www.YOURSERVER.com/YOURICON.png&lt;/href&gt;';
$content .= '        &lt;/Icon&gt;';
$content .= '      &lt;/IconStyle&gt;';

$content .= '    &lt;BalloonStyle&gt;';
$content .= '      &lt;bgColor&gt;ffffff&lt;/bgColor&gt;';
$content .= '      &lt;text&gt;&lt;![CDATA[';
$content .= '      &lt;b&gt;&lt;font size=&quot;+3&quot; face=&quot;Times New Roman&quot;&gt;$[name]&lt;/font&gt;&lt;/b&gt;';
$content .= '      &lt;br/&gt;&lt;br/&gt;';
$content .= '      &lt;font size=&quot;+2&quot; face=&quot;Times New Roman&quot;&gt;$[description]&lt;/font&gt;';
$content .= '      ]]&gt;&lt;/text&gt;';
$content .= '    &lt;/BalloonStyle&gt;';
$content .= '  &lt;/Style&gt;';

$content .= '  &lt;gx:Tour&gt;';
$content .= '    &lt;name&gt;Play me&lt;/name&gt;';
$content .= '    &lt;gx:Playlist&gt;';
foreach($correspondents as $k =&gt; $c) {
  $content .= '      &lt;gx:FlyTo&gt;';
  $content .= '        &lt;gx:duration&gt;24.0&lt;/gx:duration&gt;';  $content .= '        &lt;LookAt&gt;';
  $content .= '          &lt;longitude&gt;'.$locations[$c-&gt;screen_name]['lng'].'&lt;/longitude&gt;';
  $content .= '          &lt;latitude&gt;'.$locations[$c-&gt;screen_name]['lat'].'&lt;/latitude&gt;';
  $content .= '          &lt;altitude&gt;2000&lt;/altitude&gt;';
  $content .= '          &lt;heading&gt;-9&lt;/heading&gt;';
  $content .= '          &lt;tilt&gt;75&lt;/tilt&gt;';
  $content .= '          &lt;range&gt;10000&lt;/range&gt;';
  $content .= '          &lt;gx:altitudeMode&gt;relativeToGround&lt;/gx:altitudeMode&gt;';
  $content .= '        &lt;/LookAt&gt;';
  $content .= '      &lt;/gx:FlyTo&gt;';

  $content .= '      &lt;gx:AnimatedUpdate&gt;';
  $content .= '        &lt;Update&gt;';
  $content .= '          &lt;targetHref/&gt;';
  $content .= '          &lt;Change&gt;';
  $content .= '            &lt;Placemark targetId=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '              &lt;gx:balloonVisibility&gt;1&lt;/gx:balloonVisibility&gt;';
  $content .= '            &lt;/Placemark&gt;';
  $content .= '          &lt;/Change&gt;';
  $content .= '        &lt;/Update&gt;';
  $content .= '      &lt;/gx:AnimatedUpdate&gt;';

  $content .= '      &lt;gx:Wait&gt;';
  $content .= '        &lt;gx:duration&gt;9.0&lt;/gx:duration&gt;';
  $content .= '      &lt;/gx:Wait&gt;';

  $content .= '      &lt;gx:AnimatedUpdate&gt;';
  $content .= '        &lt;Update&gt;';
  $content .= '          &lt;targetHref/&gt;';
  $content .= '          &lt;Change&gt;';
  $content .= '            &lt;Placemark targetId=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '              &lt;gx:balloonVisibility&gt;0&lt;/gx:balloonVisibility&gt;';
  $content .= '            &lt;/Placemark&gt;';
  $content .= '          &lt;/Change&gt;';
  $content .= '        &lt;/Update&gt;';
  $content .= '      &lt;/gx:AnimatedUpdate&gt;';
}
$content .= '    &lt;/gx:Playlist&gt;';
$content .= '  &lt;/gx:Tour&gt;';

foreach($correspondents as $k =&gt; $c) {
  $content .= '  &lt;Placemark id=&quot;placemark'.$k.'&quot;&gt;';
  $content .= '    &lt;name&gt;'.ucwords($c-&gt;name).'&lt;/name&gt;';
  $content .= '    &lt;open&gt;0&lt;/open&gt;';
  $content .= '    &lt;description&gt;';
  $content .= '      &amp;lt;img src=&quot;'.$c-&gt;profile_image_url.'&quot; /&amp;gt;';
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Tweet: &amp;lt;/b&amp;gt;'.htmlspecialchars(strip_tags($c-&gt;status-&gt;text));
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Sent: &amp;lt;/b&amp;gt;'.$c-&gt;status-&gt;created_at;
  $content .= '      &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
  $content .= '      &amp;lt;b&amp;gt;Location: &amp;lt;/b&amp;gt;'.$locations[$c-&gt;screen_name]['location'];
  $content .= '    &lt;/description&gt;';
  $content .= '    &lt;address&gt;'.$locations[$c-&gt;screen_name]['location'].'&lt;/address&gt;';
  $content .= '    &lt;styleUrl&gt;#barStyle&lt;/styleUrl&gt;';
  $content .= '  &lt;/Placemark&gt;';
}
$content .= '  &lt;/Document&gt;';
$content .= '&lt;/kml&gt;';

fwrite($kml, $content);
fclose($kml);
</pre>
<p>t</p>
<p>All that is left is some flair to the tour. The final code I made included a stating point and flying out to space and back between users to give an overview, but it’s just a sea of code which I’m not going to include. Google Earth has some great additional features you can also include, images and music loading during a tour (Flight of the Valkyries springs to mind). You can also see mappings of the sea, star constellations and the moon. For more on how to construct tours checkout <a href="http://code.google.com/apis/kml/documentation/touring.html" title="Google's touring in KML" target="_blank">Google&#8217;s Touring in KML</a>.</p>
<p>Hope you have enjoyed the madness of this project. Let me know in the comments below, what you would do with a massive monitor array? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/twittergalaxy-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TwitterGalaxy &#8211; DIY Google Liquid Galaxy from Recycled Monitors with integrated Twitter Feed</title>
		<link>http://www.jamsalx.com/twittergalaxy/</link>
		<comments>http://www.jamsalx.com/twittergalaxy/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 19:00:12 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Garage Projects]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Liquid Galaxy]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=66</guid>
		<description><![CDATA[I have been working in the R&#38;D department for the last couple of weeks. One of the projects they were working on was a Google Liquid Galaxy setup. I asked if I could help out with my engineering skills. This is what I got up to&#8230; First off, What is Google Liquid Galaxy? Well Liquid Galaxy is basically Google Earth on a massive screen! It enables you to sync Google Earth across multiple computers, so&#8230; <a href="http://www.jamsalx.com/twittergalaxy/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I have been working in the R&amp;D department for the last couple of weeks. One of the projects they were working on was a Google Liquid Galaxy setup. I asked if I could help out with my engineering skills. This is what I got up to&#8230;</p>
<p><span id="more-66"></span></p>
<p>First off, What is Google Liquid Galaxy? Well Liquid Galaxy is basically Google Earth on a massive screen! It enables you to sync Google Earth across multiple computers, so as you navigate around on the master computer it updates the slave computers.</p>
<p>What equipment do we have? Well we had 32 19&#8243; screens, picked up when clearing out the old Wapping site, which I removed all the stands from. Eight quad core computers each with two quad core dual output graphics cards, also scavenged from the old site.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2453.jpg"><img class="floatleft size-medium wp-image-70" title="IMG_2453" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2453-300x225.jpg" alt="Prototype setup, the first lot of monitors to be disasembled" width="300" height="225" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2451.jpg"><img class="floatleft size-medium wp-image-68" title="IMG_2451" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2451-300x225.jpg" alt="The old stands ready for the bin" width="300" height="225" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2452.jpg"><img class="floatleft size-medium wp-image-69" title="IMG_2452" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2452-300x225.jpg" alt="The monitors stack much easyer with the stands removed" width="300" height="225" /></a></p>
<div class="clear-both"></div>
<p>So the first thing I was brought in to do was to build the frames to hold the screens. After a bit of designing and scribbling, I came up with a kick ass design.</p>
<p>It&#8217;s quite a neat design if I do say so myself. There are four bases that hold eight monitors in two stacks of four. The bases are also storage cabinets for when the display is not use. The cabinet also holds the two computers and all the required cabling. The frame that holds the monitors is made of 1&#8243; x 1&#8243; steel box section. The frame slots together the cabinet/base with two options for having the monitors straight or at a slight curve.</p>
<p>This was a bit too much too soon, so a scaled it down to basically a wooden Christmas tree&#8230;</p>
<p>Each stand can hold eight monitors in stacks of four. There is wooden base plate that uses the computers as a counter weight to the monitors.</p>
<p>This was a much quicker and cheaper design to make for the proof of concept. This is how I built it.</p>
<p>After working out roughly how much wood I would need I headed out to the shops for some woody goodness. In the garage a made up a cut list of all the pieces I needed.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2401.jpg"><img class="floatleft size-medium wp-image-71" title="IMG_2401" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2401-225x300.jpg" alt="The wood fresh from the shop ready to build the stands for the Google Liquid Galaxy screens" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_24001.jpg"><img class="floatleft size-medium wp-image-73" title="IMG_2400" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_24001-225x300.jpg" alt="My cut list for the Google Liquid Galaxy stands" width="225" height="300" /></a></p>
<div class="clear-both"></div>
<p>Time to cut up the wood from the list. To make the job easy I have &#8220;invested&#8221; in a new toy for the garage. It&#8217;s a bench circular slide saw that can cut box steel as well as wood with the same blade. It has compound cut settings so you can do a 45 degree on a 45 degree cut:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2402.jpg"><img class="aligncenter size-medium wp-image-74" title="IMG_2402" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2402-300x225.jpg" alt="My new toy" width="300" height="225" /></a></p>
<p>I cut up all of the cross beams that would hold the monitors, four per tree. I used the bench saw to cut do the mortice joint down to the right depth. Using a good old hammer and chisel I knocked out the unwanted wood, to make a nice smooth joint:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2410.jpg"><img class="floatleft size-medium wp-image-75" title="IMG_2410" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2410-300x225.jpg" alt="Cut ready for knocking out the unwanted wood" width="300" height="225" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2407.jpg"><img class="floatleft size-medium wp-image-76" title="IMG_2407" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2407-300x225.jpg" alt="Using a chisel to knock out the wood to make a nice joint" width="300" height="225" /></a></p>
<div class="clear-both"></div>
<p>I cut out a base for each tree out of 1\4&#8243; Ply Wood. I then made up some 45 degree side supports and a larger one for the rear support so that the screws in all the supports would not clash. I used some right-angle squares I use for welding to align the supports for drilling.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2417.jpg"><img class="floatleft size-medium wp-image-77" title="IMG_2417" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2417-225x300.jpg" alt="Getting a nice collection of cut bits going" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2422.jpg"><img class="floatleft size-medium wp-image-78" title="IMG_2422" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2422-225x300.jpg" alt="Using a right-angel to align the wood perfectly" width="225" height="300" /></a></p>
<div class="clear-both"></div>
<p>Then I drilled the base on to the truck (loving the tree comparison for explain this). I then used a large spirit level clamped to the truck to align it and drilled the supports in to the base and the first tree is done:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1262.jpg"><img class="floatleft size-medium wp-image-89" title="IMG_1262" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1262-225x300.jpg" alt="Aligning the stand for the Liquid Galaxy Monitor Array" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1268.jpg"><img class="floatleft size-medium wp-image-90" title="IMG_1268" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1268-225x300.jpg" alt="Making sure it's all correct in both plans for the monitor array" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1266.jpg"><img class="floatleft size-medium wp-image-91" title="IMG_1266" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1266-225x300.jpg" alt="This is how the legs look attached to the base" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1269.jpg"><img class="floatleft size-medium wp-image-92" title="IMG_1269" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_1269-225x300.jpg" alt="The first Google Liquid Galaxy Monitor Array Stand is complete" width="225" height="300" /></a></p>
<div class="clear-both"></div>
<p>The first fail came when I tried to put the trees in my Volvo Estate whole&#8230; It was late I don&#8217;t know what I was thinking either. Not only were they about 2&#8243; too long the base was too high when laid on it&#8217;s side. Back in to the garage to disassemble the stands, and try again. The next day I drove in to work and took them up to the lab for assembly.</p>
<p>I had purposely not drilled the holes for the the monitors in to the arms, as they say measure twice cut once! and as I had done most of the measuring of the monitors by eye and then used the monitor specs I had found online I wanted to make sure when all was well with a dry assembly:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2424.jpg"><img class="floatleft size-medium wp-image-79" title="IMG_2424" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2424-300x225.jpg" alt="All the parts at the lab ready for asemberly" width="300" height="225" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2426.jpg"><img class="floatleft size-medium wp-image-80" title="IMG_2426" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2426-300x225.jpg" alt="Checking for alignment before drilling" width="300" height="225" /></a></p>
<div class="clear-both"></div>
<p>All is good, time to drill, I marked out the vertical center of the branches, and then measured half a monitors width from the centre of the truck. I did this on all of the branches on both sides. I worked out what the hypotenuses should be between to diagonally opposing bolt hols and checked for alignment before I drilled, they were accurate to +/- a couple of mills.</p>
<p>With the drill holes made, and the stand fully assembled, I started to lead it up. First came the computers that sit on the base to act as a counter weight to the monitors. After setting up a stand I found out that one computer is enough to hold the stand up, so it makes swapping then around easier, you don&#8217;t have to worry about the stand catapulting a computer a cross the room if you try and lift one off:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2427.jpg"><img class="aligncenter size-medium wp-image-81" title="IMG_2427" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2427-225x300.jpg" alt="Computers on stands to weight them down" width="225" height="300" /></a></p>
<p>Next came hanging the monitors. Each monitor has a backing plate that used to hold it to the stand they came with, this has been very handy. So I simply pushed a bolt though the centre hole before I screwed the plate to the back of the monitor. Then pushed the bolt thought the stand and tightened up the nut. Luckily the clamping pressure was enough to stop the bolt from spinning, and I could tighten up the screens nice and tight. I did add a washer between the nut and the frame to stop it from ripping in to the soft pine wood. Here we go:</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2429.jpg"><img class="floatleft size-medium wp-image-82" title="IMG_2429" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2429-225x300.jpg" alt="One monitro and all is well" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2432.jpg"><img class="floatleft size-medium wp-image-83" title="IMG_2432" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2432-225x300.jpg" alt="Four monitors" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2434.jpg"><img class="floatleft size-medium wp-image-84" title="IMG_2434" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2434-225x300.jpg" alt="Five monitors" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2435.jpg"><img class="floatleft size-medium wp-image-85" title="IMG_2435" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2435-225x300.jpg" alt="Six monitors for the google lequid galaxy" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2436.jpg"><img class="floatleft size-medium wp-image-86" title="IMG_2436" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2436-225x300.jpg" alt="Seven monitors and stand is still holding out" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2437.jpg"><img class="floatleft size-medium wp-image-87" title="IMG_2437" src="http://www.jamsalx.com/wp-content/uploads/2011/09/IMG_2437-225x300.jpg" alt="Eight and the first stand is compleat" width="225" height="300" /></a></p>
<div class="clear-both"></div>
<p>Now I have the first stand complete, I noticed some small issues that will need addressing in the 1.2 update. First off, the support struts are working well at supporting the main trunk in terms of keeping it upright, but now the main trunk is loaded up with monitors I&#8217;m noticing a lot of torsion twist in the wood. As the monitors and hanging either side of the truck if there get knocked they are causing the truck to rotate back and forth. Below is an image to try and demonstrate what I&#8217;m badly describing. To solve this I will add a large rear support from the base to as far up as I can reach with a stock length piece of timber, which is 2.1 meters.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo2.jpg"><img class="alignnone size-medium wp-image-99" title="photo(2)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo2-300x220.jpg" alt="Torsion twist on the truck makes the monitors wobble back and forth" width="300" height="220" /></a></p>
<p>Also another twist issue with the branches. There is no problem with the top monitor but as each monitor adds a little bit of weight to the new one and so on down to the bottom, the combined weight is making the branch of the bottom monitor twist, so the top of the monitor hangs forward of the monitor above. This is a reason not to use wood, although it is cheaper and easier to work with then metal it does twist and flex, useful in some project but not in this one. So to fix this I&#8217;m going to make some wedges to to the trunk behind each monitor to hold it forward.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-31.jpg"><img class="size-medium wp-image-96" title="photo (3)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-31-225x300.jpg" alt="Torsion Twist on the branches from the additive wait of all the monitors" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-4.jpg"><img class="floatleft size-medium wp-image-97" title="photo (4)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-4-225x300.jpg" alt="Before spacer is put in to stop the monitor droop" width="225" height="300" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-2.jpg"><img class="floatleft size-medium wp-image-98" title="photo (2)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-2-225x300.jpg" alt="Monitor with spacer in place push the bottom of the screen forward" width="225" height="300" /></a></p>
<div class="clear-both"></div>
<p>Neither of these are big problems but definitely something to fix. I set up another stand, and wired it all up. In fact we brought all of the power strips in a 1 mile radius of Wapping. This is what it looks like, it&#8217;s not pretty, but there is not a lot I can do about it, unless I make custom sized wires and fix them to the frame, not something we have time or budget to do. Here is what 16, 19&#8243; screens look like running Google Earth.</p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-5.jpg"><img class="floatleft size-medium wp-image-100" title="photo (5)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-5-300x225.jpg" alt="Google Liquid Galaxy on 16 Monitors" width="300" height="225" /></a></p>
<p><a href="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-6.jpg"><img class="floatleft size-medium wp-image-101" title="photo (6)" src="http://www.jamsalx.com/wp-content/uploads/2011/09/photo-6-300x225.jpg" alt="Google Earth on a massive monitor array" width="300" height="225" /></a></p>
<div class="clear-both"></div>
<p><strong>Whats next?</strong></p>
<p>I need to make up the 1.2 update fixes for the stands and bring them in. Get the other two stands made and link them all together.</p>
<p>I&#8217;m planning two more posts, one to cover the software side of things that has been expertly done by David Somers (@jalada). The second will cover the Twitter integration I have been working. At the moment it pulls in the location and latest tweet of all the Times foreign correspondents, and converts it in to a Google Earth Tour to play on the massive monitor array&#8230;</p>
<p>Got a question or want to know more details, just ask in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/twittergalaxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook launches new developers area</title>
		<link>http://www.jamsalx.com/facebook-launches-new-developers-area/</link>
		<comments>http://www.jamsalx.com/facebook-launches-new-developers-area/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 15:58:31 +0000</pubDate>
		<dc:creator>JamsAlx</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.jamsalx.com/?p=65</guid>
		<description><![CDATA[Facebook have recently implemented a new design to there developers area. The new design is a great improvement on the old app manager where I have spent many an hour. So what&#8217;s new: Roles Now you can add users to the app with four different roles, giving you better control over access to your apps settings: Administrator; complete access to all the app Developer; access to run, edit and test Tester; access to test the&#8230; <a href="http://www.jamsalx.com/facebook-launches-new-developers-area/" class="more-link">Read On &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Facebook have recently implemented a new design to there developers area. The new design is a great improvement on the old app manager where I have spent many an hour.</p>
<p><span id="more-65"></span></p>
<p>So what&#8217;s new:<br />
<strong>Roles</strong><br />
Now you can add users to the app with four different roles, giving you better control over access to your apps settings:</p>
<ol>
<li>Administrator; complete access to all the app</li>
<li>Developer; access to run, edit and test</li>
<li>Tester; access to test the app in sandbox mode</li>
<li>Insights User; access to just the Insights for the app</li>
</ol>
<p>You can add people from your friends list or via there registered email address. This makes the use of Sandbox mode much more appealing as you don&#8217;t have to give testers and the business access to the app settings, in order for them to use the app.</p>
<p><strong>Insights</strong><br />
Insights it&#8217;s self has had a refresh, but now on the app overview page you get a quick highlight on your apps usage. Which is handy, when you user want to keep an eye on things.</p>
<p>What&#8217;s improved:<br />
Overview<br />
As mentioned above the app overview page is now easier to read and has more information on it, which means there is a lot less clicking around to get the info you need.</p>
<p>The use of tabs for everything and then sub tabs on them is a bit clunky but it is a great improvement on the old system.</p>
<p>Let me know what you think of it and if you feel there is anything missing, in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamsalx.com/facebook-launches-new-developers-area/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

