Category: Uncategorized

New version of XPDisplay

It’s been a long time in coming, but hopefully worth the wait – a new version of XPDisplay (an information display for the X-Plane flight simulator) is out, with some new features:

  • View your flight on a moving map display (now with airports and runway information)
  • Log your flights (takeoffs and landings)
  • Graph your glideslope descent, vertical speed, and landing gear forces
  • Test your skill at smooth approach and landings, with metrics such as: vertical speed on touchdown, distance from ideal landing point, glideslope score (smoothness of descent), max landing gear force
  • Record and replay your flight data

As always, this is a work in progress, so not everything is perfect yet – but I hope it will still be useful.

For more, go to the XPDisplay page.

Supernova SN 2014J

No photo unfortunately, but last night I successfully observed supernova SN 2014J – a new supernova in the galaxy M82 that was only discovered on January 21st – using my 8-inch Meade LX200 telescope and a 15mm Super Plossl Eyepiece.

I’m only just getting the hang of using the telescope, so finding M82 (the “Cigar Galaxy”) was tricky. The galaxy appeared as an elongated smudge, only just visible, but with a few stars around. I made a rough sketch of what I saw and compared it with a finder chart and Stellarium so that I could be sure I’d found the right place.

It’s pretty cool to see light from a dying star that’s travelled 11.5 million light years. :)

By Jove!

I took this using a normal point-and-click camera held up to the eyepiece of my telescope last night. No red spot on Jupiter, that would have appeared around midnight (Jupiter rotates completely in 10 hours – crazily fast) but you can see bands of cloud quite clearly. It might have been a clearer picture but for the thin cloud (on our planet) and condensation that formed and reformed every few minutes on the telescope.

Aircraft Traces

One of my trusty Raspberry Pis has a SDR (Software Defined Radio) USB stick, which is currently tuned into aircraft ADS-B transponders (which basically means that the Pi receives the position, altitude, speed and heading of every commercial aircraft within 50-100km, sometimes up to 200km, if the conditions are right).

The Pi now logs this data every 10 seconds to a file, which I copied from the Pi this evening and with a bit of Groovy scripting was able to generate the traces of aircraft seen over the last 8 hours or so:

You can clearly see the Lambourne, Biggin and Ockham holding stacks, where the planes circle around for a while, descending until given a landing slot.

The aircraft disappear from my screen below 1500ft or so, which is why you can see lots of planes approaching Heathrow (from the east/right) but they all seem to disappear before they get there. Similarly with Gatwick, many aircraft disappear from the right (east) as they arrive and many appear to the left (west) as they leave.

The data and processing isn’t perfect, but it’s a pretty picture for now. :)

New website

I’ve updated my website. Hopefully it looks cleaner and makes each project page a bit more ‘discoverable’.

Laptop Repair Man

Thank goodness for YouTube and eBay. My wife’s laptop (an Acer Travelmate 3270) started to switch off randomly and unexpectedly last week. An investigation quickly revealed the culprit: as I was wiggling the pin in the middle of the laptop’s circular power socket – it fell out! I did my best to defeat the laptop’s physical security mechanisms (screws) over the next 40 minutes or so, and I’m ashamed to admit that I didn’t use the Queen’s best English all of the time either. Just when I reached the point of giving up, I googled for ‘Travelmate laptop disassembly’ and struck gold thanks to YouTube. A mere ten minutes later (and wishing I’d googled first), I was looking at a kitchen table with a daunting pile of bits that were formerly known as a nearly-working laptop.

Fortunately, the power socket is on a smallish removable daughter board (circled in green) and replacements can be purchased on eBay for around £15. A few days later, I was googling for ‘Travelmate laptop reassembly’ with my fingers crossed – fortunately YouTube complied and an hour later I was sitting at the kitchen table with a fully working laptop once more (and with only five screws mysteriously left over, too).


Raspberry Pi serving HTML5 to the Kindle Touch

The web browser on Amazon’s Kindle Touch is capable of rendering HTML5 content and executing Javascript, which has given me the idea of using it as an external display for the flight simulator that I often play with. Tonight I installed apache on my Raspberry Pi and created a file in /var/www/test.html containing some basic html5 canvas code:

<script type="text/javascript">
function drawShape(){
  // get the canvas element using the DOM
  var canvas = document.getElementById('mycanvas');
  // Make sure we don't execute when canvas isn't supported
  if (canvas.getContext){
    // use getContext to use the canvas for drawing
    var ctx = canvas.getContext('2d');

    // Filled triangle

    // Stroked triangle

    ctx.arc(150,120,42,0,2 * Math.PI);

    // border canvas area

    ctx.font = "3em Arial";
    ctx.strokeText("Hello Kindle", 100,300);
    ctx.strokeText("from the", 120,400);
    ctx.strokeText("Raspberry Pi", 100,500);

    var imageObj = new Image();
    imageObj.onload = function() {
        ctx.drawImage(imageObj, 350, 10);
    imageObj.src = "

  } else {
    alert('You need Safari or Firefox 1.5+ to see this demo.');
<body onload="drawShape();">
   <canvas id="mycanvas" width="560" height="580"></canvas>

I pointed the Kindle’s web browser at the IP address of the RPi & the page loaded nicely in the browser. Here is a screenshot:

Font sizes on the Kindle seem to differ slightly from those rendered by Firefox, but I can probably work around that.

Ubuntu 12.04 on my Eee 900

I’ve just installed Ubuntu 12.04 (desktop version) on my aging Asus Eee 900 laptop, and although it’s taking me a while to adjust to the new Unity interface, my greatest concerns after googling a bit (wifi and sdcard drivers not working, or sdcard only accepting up to 1GB) have been unfounded.

I downloaded the 1GB DVD ISO of Ubuntu to my Windows desktop machine, then used the free unetbootin tool to write the ISO to a SD card. For some reason Ubuntu wouldn’t install from my 16GB SD card on the first try. I just saw the five animated dots; pressing F11 showed a screen with lots of errors like

udevd[100]: timeout: killing '/sbin/blkid -o udev -p /dev/sdc' [252]

Strangely, I rebooted and on the second try everything worked perfectly.

A word of warning, don’t install Ubuntu onto the 4GB drive partition on the Eee, as Ubuntu will rapidly run out of space (doh!). I reinstalled Ubuntu, choosing the 16GB drive partition and all has been well since. (After a few days, the installation plus updates appears to take around 4.5GB.) At one point I had to change the boot order in the Eee’s bios (F2 on startup) to pick the 16GB drive, otherwise I was left with a black screen with flashing white cursor.

After a day or two, I have to admit Unity looks nice and with a few extra packages installed really works well. It even seems faster than the old Eeebuntu (based on Ubuntu 9.04). Java, IntelliJ IDEA and the Arduino IDE need very little help to get working, and it’s great having all the latest package updates available again. Well worth the evening it took me to upgrade.

Fighting the Gumblar worm

I’ve been having trouble recently with a javascript worm (‘Gumblar’) which infected my blog & tried to make browsers download some malware. I’ve finally tracked down the last infected script file (a wordpress blog theme header file), upgraded WordPress, changed passwords and updated my blog them. We’re there. Finally.


I’ve been looking for a decent flight simulator for years & finally have found one that fits the bill: X-plane. I’ve taken some screenshots of a few Sunday online fly-ins for your viewing pleasure.


I have just released TubeWatch on the CodeAlchemists website. TubeWatch is a real-time status timeline of the London Underground network, so you can see both the current situation and the history of any problems on a particular day.

Apache Ant – JUnitReport task – ClassNotFoundException: redirect

While using Ant to generate nice-looking junit reports the other day, I came across a problem which took a while to resolve. Here is the error message:

[junitreport] jar:file:/app/fao/rds/apache-ant-1.6.5/lib/ant-junit.jar
Line 37; Column 53; javax.xml.transform.TransformerException: 
java.lang.ClassNotFoundException: redirect
[junitreport] jar:file:/app/fao/rds/apache-ant-1.6.5/lib/ant-junit.jar
Line 42; Column 57; javax.xml.transform.TransformerException: 
java.lang.ClassNotFoundException: redirect
[junitreport] jar:file:/app/fao/rds/apache-ant-1.6.5/lib/ant-junit.jar
Line 47; Column 64; javax.xml.transform.TransformerException: 
java.lang.ClassNotFoundException: redirect
... etc.

It appears that this is caused by incompatible version of Xalan. If you’re working on a large project (like me), you may not have the luxury of being able to switch versions of libraries very easily.


a) in the part of the ant task, set format=”noframes” – this avoids the problematic stylesheet, but forces all your reports into one page.

b) You can ask junit-report to use a different stylesheet so that this problem doesn’t occur. The stylesheet in question is already distributed with ant.

  1. Make a directory to contain the unit test stylesheets
  2. Copy ${ant.home}/etc/junit-frames-xalan1.xsl to your-stylesheets-dir
  3. Rename junit-frames-xalan1.xsl to junit-frames.xsl
  4. In the part of your ant task, add

  5. That’s it.

There’s also a bugzilla issue on this subject:

JDarkRoom – version 5

I’ve just released version 5 of JDarkRoom to fix a couple of things on the Mac and to improve the look for users with a 1024×768 screen resolution.

The download can be found on the JDarkRoom website.

JDarkRoom – version 4

I’ve just released version 4 of JDarkRoom. This version contains a couple of small tweaks, and a major fix to the fullscreen problems experienced by our Mac OS X users. Sorry about that, guys and gals.

Version 4 of JDarkRoom is available on the JDarkRoom website.

JDarkRoom – Version 3

The third version of JDarkRoom is now available for download. In this version:

  • Fixes for Mac OS X full-screen mode
  • Removal of annoying ‘file exists, do you want to overwrite?’ message
  • Less confusing text in the help screen
  • Addition of a proper version number, so we all know which version we’re on

.. plus numerous other tweaks. Version 3 is compatible with previous versions, so to upgrade just save the new JDarkRoom.jar file over your old one.