Door Card

image

Just a quick photo of the new door card I made for The Duke. Made of ply wood covered in some vinyl fabric I managed to find at Dunelm Mill with some lift insulation (the sort made out of recycled plastic bottles) in the cavity. Hopefully this will help lower nose levels in the cab and to insulate against the cold. Just got to make one for the other side now!

New Year Hobjectives

Last year I decided to set myself some hobjectives.  These are like resolutions but specific to the domain of hobbies: character building, life enriching sort of things rather than the usual “cut down on the booze, swear less, get a new job” sort of stuff.

How Did I Do in 2012?

  • Sleep in the back of The Duke – Pass
  • Learn to fly my tricopter – Pass
  • Smelt aluminium at home – Fail

The first one was a resounding success.  Though it may annoy the ex-military purists, the back of The Duke is now kitted out for sleeping rather than helicopter maintenance. There’s a comfy mattress, some dust-sheet-curtains, boxes of outdoor equipment and emergency rations. There’s even a flat-screen TV in there for FPV flying, though I haven’t managed to get it to work to my satisfaction yet.20121202_080457

I ordered my first shipment of multi-rotor parts in November of 2011 and had my first DIY tricopter up and running just before Christmas.  Unsurprisingly I was a pretty crappy pilot to start with so getting better seemed to be an obvious hobjective for me.  The original tricopter is hanging on a nail in the garage (victim of yet another broken servo) and I am now a quadcopter convert.  I’m much better at flying, though still have a long way to go.  I’ve done FPV too, which is a bit of an added bonus.IMG_7057

Smelting was a total fail.  Partly due to the weather and partly due to the lack of a big metal cylinder I just never got the stuff together to try it.  Dr Johnson is signed up as an official project partner to get this one licked in 2013!

2013 Hobjectives

  • Smelt aluminium at home – with Dr J’s help this should be easy enough.  We just need to buy some protective clothes and a few bags of charcoal and we’ll be good to go!  Success will be measured on a small pile of ingots on the bench above an empty scrap bin.
  • Finish the Duke’s Raspberry Pi brain – pull all the bits together to start The Duke tweeting about his adventures.  Some niggles to work out around the power supply and the enclosure and some software to write then it should be good to go.
  • Do some impressive FPV flights – get some long range flights done, preferably somewhere with a suitably high natural beauty rating.  Capture some top-notch video footage of the sort that will make viewers raise their eyebrows and nod in mild appreciation.
  • Make tasty bread in a Dutch Oven – I got a black pot for Christmas.  Being able to make fresh bread from scratch anywhere in the world is frankly a vital skill.  It’s a wonder I’ve managed to reach my 35th year without it!

I think those four should make for an entertaining year.  Of course there are a thousand other jobs I need to get done this year in addition – The Duke’s gearbox needs looking at and I’d like to make a second ‘copter so I can crash twice before going home.  There’s an FPV ground station to build and all sorts of tweaks to be made to the quad.  Before I cook bread I’m going to have to do a chilli and maybe some southern-style barbecue chicken and ribs.  I should really add some insulation to the back of The Duke and there’s no doubt I need to sort out the alignment of the tailstock on the lathe… you get the idea.

A Winter’s Tale

This weekend we headed off into the frozen wastes of Wiltshire to set up a rough shelter amongst the converted barns, Range Rovers and tweed-clad organic hemp farmers.  It was cold!  Apparently it got down to -4C during the night, though I slept like a warm, cosy and pleasantly drunk log in the back of The Duke.

On the way there we took in a few choice green lanes.  This included one of the most challenging we’ve been on to date.  After taking us through some woods – the map lead us to believe – the lane would join a track which would in turn take us back to society.  As we entered the woods we hit a very muddy incline which tested the ‘drovers mud plugging abilities and gave Dr J and I a chance to try and remember anything we may have known about off-road driving.  Clearly somebody had been up the slippy hill on a quad bike recently, but as we trundled further into the woods we started to get the impression that this was not a well-worn lane in any way.  The woods were clearly used for hunting, with a multitude of grouse feeders, shooting hides and even a pair of snapped-off deer shins to prove it.  These sorts of places don’t like green laners, they have guns and they are apparently willing to rip the forelegs off a woodland creature.  So by unspoken agreement we got a wiggle on and made for the exit.  Of course the track-to-freedom was little more than a narrow, impassable footpath.  We made our way out of the woods by retracing our steps like city-slickers out of deliverance-country; beating a hasty retreat to the Kennet and Avon for a bowl of chilli, over which we vowed never to return.

We arrived at the camp site just before dark, pitching tents and erecting what can only be described as a “rude shelter” by stringing a giant oil stained tarp between the Land Rovers.  We broke out the camping chairs and began the complex procedure of lighting my portable barbecue and emptying a few cans of ale.

I suspect Dr Johnson snorted a wrap of organic speed before we went to the pub.  Either that or the warmth made him loose his mind a little bit.  The beer was nice, the food overcooked, the other patrons were probably offended by our avant garde humour and the logs were plastic – or at least that’s what Dr Johnson thought.  An antique spanking paddle found on the shelf helped to keep the conversation flowing.

On arrival back at the gypsy encampment I set about boiling bottle after bottle of water in my Kelly kettle and poking them between the duvets in my drover-bed.  I slept very warmly and very well, awakening to an icy ceiling and the pleasing sight of a frost covered field glistening beneath the tentative caress of a December dawn.  It would have been more pleasing if I didn’t have a headache.

After a traditional breakfast we went for a nice walk and then headed home.  On the way back home something nasty happened in The Duke’s gearbox.  I haven’t had time to work out the cause, but he’s having some issues with gear selection which make me very nervous indeed.  Expect a detailed report on my findings soon!

Saturday Morning Lanes and FPV

This weekend Dr J, My Assistant and I were allowed out to play in the Land Rovers for a few hours.  We made it up to some of the Lanes north of Newbury and had fun with axes, sand ladders and ‘copters.

Dr J takes a swing at a pesky tree that had fallen on the track

We’re being followed!

The Patriot

Through a water hazard

Stopped for FPV and coffee

A ‘drover within a ‘drover

Whoops!  Maybe we should have done this somewhere more open?

When Blogs Collide

Today, logicalgenetics.com and danandtheduke.co.uk merged to make one Super-Blog!  It seemed daft having two websites and two blogs, so I’ve pulled all the Land Rover posts into the Logical Genetics blog and pointed both addresses right here.  You don’t need to change your bookmarks or format your brain – both logicalgenetics.com and danandtheduke.co.uk still work fine.

The old Land Rover blog won’t see any more action – I’ll be posting everything here.  You’ll still get all the mission reports and photos of mechanicals.  You’ll also get weird posts about Software, Machine Tools, Multi-Rotors and model flight and, well, just about anything else I can dream up.

If you just want to read about Land Rovers or Adventures, use the “Blog Posts” menu at the top to choose your poison.

Enjoy!

A Trip To Work

I don’t drive The Duke that often because it’d cost a fortune and make me deaf. So to test his new GPS powered brain I have been collecting test data in Vinny the Vectra. I can then use this data to write some unit tests and develop cool stuff while stationary.

In a slack moment at work today I knocked up a couple of functions to detect traffic jams and visualise my speed on my way to work. Here’s a typical trip. Click on the pic or here to explore the interactive “report”.

speedmap.png

I quite like these static pages for output. They are very simple to create with some code and can be pushed up onto the web easily. No faffing about with databases, just some HTML and Javascript. On the map above the placemarks show places where I stopped for more than 30 seconds (there was traffic at junction 12 that morning!) and the colour of the line shows my speed. In the end I’d like to detect more events – when we go off road, when I brake suddenly or go round a corner too fast, when we get stuck in a traffic jam and when we visit places we know. I also got the webcam working on the raspberry pi, along with a wireless internet dongle so I can embed photos and videos then upload live and post on twitter.

Here’s some code snippets. I’m just playing, so please don’t think of me as somebody who’d ever return an “Enumerable Of Enumerables” in production code!  First is the function which splits the list of speed measurements based on bands of 10MPH…

        private IEnumerable<IEnumerable<GpsMeasurement>> SplitRouteBySpeed(IEnumerable route)
        {
            var bandedMeasurements = (from measurement in route
                                      select new { Band = (int) (measurement.GroundSpeedMph/10), Measurement = measurement }).ToList();

            int currentBand = int.MaxValue;
            List currentSection = new List();

            foreach (var bm in bandedMeasurements)
            {
                if(bm.Band != currentBand)
                {
                    currentBand = bm.Band;
                    if (currentSection.Count > 0)
                    {
                        currentSection.Add(bm.Measurement);
                        yield return currentSection;
                    }

                    currentSection = new List();
                }

                currentSection.Add(bm.Measurement);
            }
        }

Second is based on somebody else’s hard work really, but I changed it enough to make it worth posting here. I’m basically using speed as a percentage, squishing to a value between -1 and 1 then using four colour “axis” as beautifully described in the comment-linked blog.

        private string SpeedToColour(double groundSpeedMph)
        {
            // Based on this post - which has a very cool image to show what we're doing.
            // http://slged.blogspot.co.uk/2007/03/heat-map-code-snippet.html

            double fraction = (groundSpeedMph             
            double red, green, blue;

            if ( fraction < -0.5 )
            {
                red = 0.0;
                green = 2*(fraction + 1);
                blue = 1.0;
            }
            else if ( fraction < 0 )
            {
                red = 0.0;
                green = 1.0;
                blue = 1.0 - 2.0*(fraction + 0.5);
            }
            else if ( fraction < 0.5 )
            {
                red = 2.0*fraction;
                green = 1.0;
                blue = 0.0;
            }
            else
            {
                red = 1.0;
                green = 1.0 - 2.0*(fraction - 0.5);
                blue = 0.0;
            }

            byte redByte = (byte) (255 * red);
            byte greenByte = (byte) (255 * green);
            byte blueByte = (byte) (255 * blue);

            return string.Format("#{0}{1}{2}", redByte.ToString("x2"), greenByte.ToString("x2"), blueByte.ToString("x2"));
        }

Beacon Hill Tricopter

Dr Johnson, Dr Kelly, my trusty assistant and I went for an early morning walk to the top of Beacon Hill this morning. We began our climb at 7am sharp, leaving the noise of the Newbury Bypass behind as we clambered through the scrub. The newborn sun cast a golden light upon the dew-soaked turf of the earthworks and a strong wind from the West made it almost impossible to fly a Tricopter. Luckily, we had tea, coffee and cookies as well as the soothing tones of Dr K’s Saxophone to keep us entertained.

Managed to record a couple of minutes of footage, but the wind made for a very bumpy ride and a nasty smudge on the camera lens puts a damper on the quality too.

The tricopter is still very down on power, especially with the newly-fixed GoPro and force 10 gale. Maybe now is the time to convert it to a hexacopter… watch this space!