Ending Illegal Fishing Using Games Technology

As we’ve just had our big media launch of the project I thought I’d share some information about the project I’ve been working on as part of my job at the Satellite Applications Catapult here in the UK.

For the passed 18 months we have been working on a project with Pew Charitable Trusts with the goal of building a system to use satellite derived data to track and deter illegal fishing at sea. Around one in five fish sold today is illegally caught so it’s a certainly a big problem to tackle.

Our system uses a live feed of vessel positions, currently provided by ExactEarth, using satellite AIS (Automatic Identification System) combined with a few other data sources to create a near real-time and historical view of fishing activity around the world.

We’re using the Unity games engine for data visualisation and as the interface to the system, both on our video wall and desktop machines, and we have a tablet version in the works. The video wall runs at 11536×3252 and Unity runs a treat!

We’ve a lot of vessels tracked at any point in time, all of which are rendered and animated on the screen at an accelerated rate for analysis. We are building the system using MMOs as inspiration as we’ve all seen how it’s possible to organise and work in a large group of people in raids to achieve a common goal. Having analysts working globally with large sets of data, it seemed a good model of interaction to follow.

A few screenshots and a video of the software in action are below, as the son of an engineer and ecologist I’m happy to say I’m proud of the work we’re doing and this is only the beginning!





A full screen, compressed, screenshot from our operations room running the Virtual Watchroom software as part of Project Eyes on the Seas.
A full screen, compressed, screenshot from our operations room running the Virtual Watchroom software as part of Project Eyes on the Seas.

More information on the project, can be found here;

We’re considering doing a live presentation of the system in a few weeks using Twitch or similar, if anyone would be interested in a demo or if you’ve any thoughts or comments please feel free too leave them below.


Dad’s Clock

Work has been mental for a few months so despite doing odds and sods on Hugo and a buttload of work on our illegal fishing project at work (hopefully more on that soon) I’ve not posted anything in a while so thought I’d post about a clock I’m building for my Dad.

My dad’s an engineer, heavy fabrication mostly, designing and building access platforms for the nearby oil refinery for over 40 years and since he drove me school on my first day on his crane he’s been a big influence.

Dad's Crane

As a reference to his engineering heritage and my current work  with satellite data I’m building an Arduino based clock that uses the GPS time signal to set the time and uses a set of voltage panels as the face.  The GPS receiver is the Adafruit Ultimate GPS board and I’m using a DS1307 based board for the real time clock.  The Ultimate GPS board is a bit OTT but it does allow me to receive a time signal indoors, as I only need one signal to get the time rather than the multiple signals needed for a full fix it works quite well.

The code is a work in progress but you’ll find it on my github page.

Project Hugo – The What

In my previous post I covered why I want to modernise my Mini and in this post I want to cover some of the intended mods.  Some are simple, some are sensible and some are downright bonkers and I intend to tackle them in that order!  As I’m still driving my first car, second if you don’t count the POS I had for a few weeks, I’ve never really had mod cons other than in rentals!  A ’96 Vauxhall Corsa Merit by the name of Neville, normally aspirated 1.7D that came with a radio, not even a cassette player!  I intend to make up for this with gusto.

The original vague plan to modernise the car was to add little mod cons here and there that modern cars have like central locking, an alarm and electric windows and for ICE I figured a Bluetooth/DAB head unit would do the trick.  I’ve since decided to build a full digital dashboard, replacing the analogue instrument cluster, and designing a system that wouldn’t look out of place in a car of today.

I started with this idea back when I though implementing CAN was a good idea but I’ve since learned how much of a pain wiring looms are so sod that!  Rather than replacing the loom I’m going to integrate with the existing, replacing the control switches in the dash with solid state relays to enable computer control but maintaining the original wiring loom.  This gives the benefits of modern control but better still keeps the original design in place so I can still ask for help from Mini experts.

The basic architecture of the system will be a microcontroller board monitoring and controlling car systems in real time and a PC based interface to act as the interface.  This gives the benefit of a real time monitoring system that comes online very quickly but can hand that information to a PC which has the power to do something with it.  Speed, tachometer, temperatures and the existing instruments will all be consumed in various manners by the microcontroller, likely an Arduino, then transferred to the PC using serial.  This project will only metaphorically fly but will share learnings from an earlier project.

The Toys


The PC will very likely be one of the Intel NUC machines, with a Core i5 processor, up to 16GB RAM and HD 5000 graphics it’ll be more than fit for purpose.  Another bonus of these machines is that they have very low power requirements for the spec and can run off 12-19V, with a DC-DC PSU they are ideal.


For screens I’ve decided to go big or stay home, to that end two iPAD retina screens will be repurposed and embedded in the dash; one as the instrument cluster and another as a secondary screen in the centre for navigation and entertainment purposes.  The screens in question should be powered by the Oscar adapter, an open source controller board that is ideal for my needs as it is based on Arduino and give full control of screen brightness, with a light sensor this means I can adapt the screen brightness to ambient conditions and not be blinded while driving late at night.  Plus the resolution and pixel density is astonishing for the price and as they are designed for tablet usage the power requirements are tiny too!


For Entertainment I’ve decided not to bother writing an MP3 player interface for it and will instead give it two main sources; Radio and an external player.  For DAB I have purchased a Monkey Board, it’s an open source DAB/FM receiver designed for hobbyists to build their own digital radios and the holy grail for Car PC enthusiasts!  For the external player I’ve a Bluetooth module which supports hands-free calling and A2DP, at a tenner it’s a no brainer.  I’m also going to have a line in socket so that anyone in the car can easily hook up and play their tunes.  A computer controlled input switch should do the trick to get the audio from these devices to the PC and from their to a 4ch car amplifier.


Doing all this and leaving the engine as is would be daft, the car currently has it’s original 998 engine coupled to a four speed box.  On top of the stage 1 kit my friend Chris fitted I’m planning on moving up to stage 2 or 3 and replacing the gearbox with a five speed option, likely from Minispares.  Their five speed boxes have a standard ratio for gears one to four, giving the standard acceleration curve for the car, but the fifth gear is an overdrive gear and takes the stress off the engine while cruising.  They are ideally suited for the smaller engines so should be a good combo and make motorway driving a lot easier.

The Grand(er) Plan

All of the above is pretty mundane and doable, now we get to my aspirations.  Starting with a simple idea that everyone takes for granted; an auto-choke.


Like all old petrol cars, my Mini has a choke.  As I’ve been driving a diesel for 14 years this is a new concept to me and after researching how they work, should be easy to automate.  A choke controls the fuel/air mix into the engine to allow more fuel into the engine when you first start it to allow it to warm up, as it does so you let the choke out and allow more air into the engine.  As my setup will have a temperature sensor in the engine and as I’ve access to 3d printing kit I’m going to make an actuator that hooks into the end of the choke cable and automates this process.

Climate Control

Yup, I’ve set myself the challenge of installing not air-con but a climate control system.  This precedent has kind’ve already been set as the Japanese model Minis had aircon units as an option with a chiller unit mounted under the passenger side of the dash.  Rather than follow this model I’m intending to source a combined cooler/chiller unit, one of these to be precise.  It’ll be a tight fit but by replacing the fan switch with a relay or other driver and using a similar actuator as the autochoke for the heater cable I reckon it’s doable.  Mounting the plumbing may be tricky but as there are already Minis with aircon they have proven it can be done, I just need to figure out how.

Computer Vision

I’ve been interested in robotics since the first time I saw Transformers and computer vision technology has always intrigued me.  To that end I’m going to use Open CV along with a slew of camera to enable lane tracking along with vehicle and obstacle detection.  There are loads of examples of this already working so I’ll not be starting from scratch.  The Core i5 should now make a lot more sense!


I work for the Satellite Applications Catapult and the biggest project I’ve worked on thus far involved making lots of interactive maps.  As such, it would be rude not to integrate satnav into the system really!  Not sure what tech I’ll be using yet but I’ve plenty of ideas and options.

Thermal Imaging/Night Vision

Yeah, why the hell not?  Modern cars have night vision as an option and KITT could see in the dark so why the hell not?  For night vision I have the simple option of a modified webcam with the IR filter removed, coupled with halogen headlights that throw out a lot of IR this should give a longer view of the road at night than my eyes can pick up.  For seeing through fog, I’m thinking a PathfindIR should do the trick.  This will be a hell of an expensive upgrade though so definitely the last item to be added, if ever!


That’s the plan, ambitious as all hell!  I’ll be starting with the microcontroller as knowing how fast your going and how much fuel you have left is key and then building up from there.  More details on each item as I build, and inevitably rebuild, each part!

Project Hugo – The Why

I’ve been planning the restoration of my classic Mini, which goes by the name Hugo, for years now and he is finally road legal!  The only issue is that a few days after this happened the wiring loom burned out…  While waiting for the new loom to be delivered my friend Chris has been doing some work on the shell to replace a few rusty panels and I’ve been researching some of the things needed to get my dream car up and running.  Before getting into the how of the project I’d start with the what and why, to that end I figured a post on the history of the project may be in order.

I’ve wanted a Mini my as long as I can remember and decided to buy myself one for my 30th birthday, a friend of a friend had a Mini 30 for sale for a decent price and that’s that!  The initial plan was to cram a VTEC engine in there, an idea my 15 year old self had after reading of one of the first conversions in the mid 90s in MiniWorld Magazine and as look would have it I knew someone who had a VTEC for sale, which I bought.  For three years the engine and car sat in my garage gathering dust, I’d bitten off far more than I could chew.

Earlier this year I decided it was time to crap or get off the pot;  The complexity of the build was daunting, so much so I didn’t know where to start, so I hadn’t.  To that end I decided to ditch the engine swap, sticking with the original, and concentrate on getting the car on the road then seeing what happens.  The long term plan has always been to modernise the car which was part of the reason to go VTEC, so I figured I’d stick to that idea and attempt to rebuild the car as if it was designed now rather than then.  Same engine but tuned and made as reliable as possible.

There are many purists out there that will balk at what I’m intending to do, taking the Mini and tweaking it here and there, and that by modernising it I’m making something that isn’t a Mini any more.  Here’s the thing;  The Mini has been hacked since day one, it has a long history of modifications, tweaks and rebuilds and without this spirit of tweaking we wouldn’t have the Cooper, the history of rallying and hell, even the Italian Job!  The heart of the Mini would remain but modern conveniences would be introduced.

“Modern conveniences” started with central locking and electric windows; it’s since grown to include a full digital dashboard, an auto-choke of my own design and thermal imaging.  More on this and the mechanical mods planned in an upcoming post.

So, that’s the why of the project.  TLDR; Because I can.

Reverse Tunnels and RaspBMC

I’m once more dabbling in Linux at work so figured I’d give RaspBMC another go with my new knowledge of Linux troubleshooting workarounds…

First of all I thought I’d have a play with SSH so set up a reverse tunnel to access my Pi remotely.  I followed the same steps in this article to no avail;

If I ran the script manually I could create the tunnel no problem, it just wasn’t being created automatically which was a pain.  Turns out that RaspBMC disables cron out of the box so this needed to be re-enabled;

Last of all I found that, as before, my Pi keeps randomly hanging requiring a reboot.  A friend of mine introduced me to the hardware watchdog on the Pi that can be used to reboot if the device goes unresponsive and so far so good;


That’s all for now, the new wiring loom is going in the Mini soon though so expect more automotive posts soon!

Geoserver, Leaflet Angular Directive and viewParams

Catchy title, I know…

In the big GIS project I’m working on we have a large set of data, 100 million rows+, which needs to be rendered as an overlay.  This turned out to be tricky as I’m not really a GIS developer and learning as I go. I figured it out through trial and error so I’m writing this post to help those like me, hopefully I’m using the correct keywords I was looking for so that SEO picks this up!

Our frontend architecture is as follows;

To create the tiles in Geoserver we ended up creating a parametric SQL layer, more info on that here, and we are adding it as a WMS layer.  What I discovered in the end is that to pass the viewParams through to Geoserver you need to add a layerParams option with viewParams within it, for example with start and end as SQL parameters;

layerParams: {
    viewParams: "start:'2014-01-01T00:00:00.000Z';end:'2014-01-31T00:00:00.000Z'"

In a WFS call the equivalent would be to append the following and one thing to note in both cases is to properly escape the characters;

Hope this helps!

Bluetooth Headphone Upgrade

 I’ve a trusty paint of headphones I’ve had for ten years or so and used to use them when playing my electric drum kit, the long cable was particularly useful at the time but now I use them almost exclusively at my desk the cable is proving a pain in the neck.  I have a Bluetooth headphone adapter I use at the gym so figured a simple hack may be in order.

I shortened the cable, added a loop for the adapter to clip to and job done.  The end result is closed back headphones that, with an extension cable, can be used as normal and a headphone adapter I can still use at the gym.

WP_20140204_005 WP_20140204_006

Simple enough but fantastic sound quality and functionality by combining a few things I had lying around, saved my buying a new pair of wireless cans and gets more life out of kit that was underutilised.

OneNote Kanban and Bullet Journal(ish)

Lifehacking!  Until recently I’ve spent more time blogging about it than doing it but in the last few months I’ve found a task/time tracking technique that seems to be working and today had an idea of how to adopt a complimentary method too;  Bullet Journal and Kanban.

Last year I started using Bullet Journal, which the guys at the source can explain far better than I, with a great deal of success.  I used a pocket sized Moleskine which I could take anywhere and it has helped keep track of what I’m meant to be doing long term and when.  The only irritation I found with it was that I tend to plan more than a month ahead so in my 2014 notebook I’ve written out January to December on pages 1 – 24 so my entire year is in one place and after that it follows the same idea as standard.

For my bigger projects I’ve long liked the idea of Kanban but I like to make notes and flesh out ideas in notes so using sticky notes to track the task as well as a separate notebook to track details of the task seemed a pain in the backside.  On the walk back from lunch today an idea, OneNote!

OneNote is a fantastic application, when it was initially pushed out at Microsoft it was a little bit of a pain but once coupled with FolderShare it became brilliant.  This pre-precursor to SkyDrive allowed notebooks to be sync’d across multiple machines via the internet which made the product very useful and with the later versions this is done automatically via SkyDrive.  I’ve been using OneNote for years for keeping track of ideas and research but using it as a Kanban board never occurred to me for long running tasks.  It turned out to be as simple as this;

OneNote Kanban

Create a new notebook called whatever you want, create a section for each state and a page per task.  The three in “In Progress” denotes the WIP (work in progress) limit and as a task changes state simply drag it to the relevant section, job done.  I think the two concepts will work quite well together as I can make a note on the go in my bullet journal notebook and when I get home add it to my backlog if it’s a longer term task or just do it if its a short one.  To handle the context switch between the two I’ve added a market to the bullet journal scheme which is a ‘K’, this denotes the task has been moved to my Kanban backlog and can be ignored from the perspective of the journal.

The journaling technique is working far better for me than the Master Planner or The Chain ever did insofar as I’m still using the journal six months later and as I use OneNote on a daily basis fingers crossed it’ll help too.  Time will tell!  If nothing else it’s a good place to throw all my ideas.

JavaScript IDE, Git and Deployment

So I was working on a set of scripts to automatically commit and deploy HTML, JavaScript and CSS stuff using PowerShell however as I’ve just discovered WebStorm which does all this and allows for live preview and debugging of code I’m not going to bother anymore!

After installing it I quickly managed to configure auto-deployment to a Linux server via SFTP and live previews in Chrome.  Having spent the last few months getting to grips with JavaScript programming I have to say I’ve missed having a good IDE, live preview of code that updates on the fly really is a brilliant touch and should make things far easy moving forward as I rewrite our UI using AngularJS.

Note:- I had an issue testing my SFTP connection when I configuring the deployment location and received the following error;
“Conection to ‘’ failed.  Invalid descendent file name “Accept:”.”

It turns out that I’d managed to somehow create a file called “Accept:” in my home folder in Ubuntu and the WebStorm IDE doesn’t appear to deal well with filenames that contain ‘:’, at least I think that is why.  All I know is I deleted the file and was then able to connect without issue.  Hope this helps someone as it took a while to figure out this morning in my pre-caffeinated fugue.