Thursday, April 16th, 2015 at 12:54 pm - - Weekends

A once in a lifetime experience required me to celebrate with a full-on McDonald’s burger.
bigmac
It was horrible.

Time to go home.

Sunday, April 5th, 2015 at 7:26 pm - - Kayak Dive, Whipping

I’ve washed up on the annual Easter university diving trip, though my heart’s not in it. There’s a long period of stable weather forecasted, which should mean the silt will have time to settle out of the water ready for when the novices to get good enough to come out to more exciting locations.

sennendive
snakelocks anemone encrusted wreckage in Sennen Cove

It’s a bit of a rehash: I’ve done them all before in previous years in better conditions, with Becka by kayak back in 2010. I’m too tired at the end of the day to do any of the hacking I’d hoped for, so I’m marking time. Maybe I should go to the pub more often and not try to make best use of my time all the time.

Curiously, that last time in Cornwall (but one) also coincided with a General Election campaign, and I remember a big Conservative Party poster in a farmer’s field at the end of the lane. There isn’t one there this year. Either the land-owner is not so keen on Cameron this time, or he can’t be bothered, or he’s sold up to a new owner, or who knows? It’s another metric that could have been noted and cross-correlated over the years if we really had the data. For the life of me, I don’t know why these posters never became a substrate for some time-limited concentrated geocaching game. Geocaching happens on a lot sillier things, and this could have been like tracking down sightings of rare wild animals.

fishinweeds
Fish approach between the boulders and kelp

Meanwhile, the serious programmers are making hay with the ElectionLeaflets.org site and Parliamentary candidates CVs.

Watching them discuss stuff I realize I’m totally lost in the last century in terms of the technology. It’s a full time job just keeping up. (And in the large software company I briefly worked for, nobody seemed to be employed to keep up, so they didn’t.) Nowadays I don’t know much more than the difference between JPEGs and PNGs.

Other projects are pinging up around the net, such as VoteForPolicies.org where they blogged their technical case study like so:

We are using the RabbitMQ messaging system, our queue server is run by CloudAMPQ (Big Bunny instance, dedicated server)…

Our worker servers also live behind an ELB but don’t have auto-scaling enabled; we manually manage the amount of instances based on the size of our queues, we can check using the RabbitMQ management console…

All of our MySQL queries are handled by the Doctrine ORM and written using the Doctrine QueryBuilder. These doctrine queries are also cached in Redis as SQL…

Our application is based on Symfony 2.6.* standard edition.

For Redis we use the SncRedisBundle. For RabbitMQ interactions we are using the RabbitMqBundle.

We’re using the DoctrineMigrationsBundle for database migrations and the data-fixtures and AliceBundle for database fixtures.

Our CI tool Jenkins runs all of our tests and triggers a new capistrano deployment if they pass.

Is it me, or does it feel like I’m in the world of The Hitchhiker’s Guide to the Galaxy reading about how to build a Globular Cluster Information Hyperdrive?

And this, all in the name of electing Members of Parliament, an institution whose daily procedures were already antiquated back in the Victorian era.

Once the process of governance starts getting anywhere near state of the art web technology, it’s going to be awesome.

Or it will be a whole lot worse. You never know.

As the human debacle around the science of climate change has proved, this tech is equally good at spreading knowledge and intelligence or ignorance and stupidity. It’s our choice as to what we want from it.

Monday, March 23rd, 2015 at 6:08 pm - - Whipping

I’m doing a lot of politics stuff running up to the general election, but I don’t feel like blogging about it much.

Actually, I’m not doing that much. What’s happening is that all the work I did ten years ago is finally being put into use today by other people, resulting in an event such as this fine rant from the LibDem MP in Bristol West:

To claim, as the website Public Whip does, that I ‘voted very strongly for selling England’s state owned forests’ is misleading in the extreme. I have never voted in favour of selling forest land – I voted against two poorly worded and hyperbolic motions submitted by the Labour Party.

I never believed I’d see the day where MPs would have to answer for the things they voted for in Parliament. Anyway, there’s that and electionleaflets.org and Francis’s Candidate CVs project gathering steam. What a difference five years of internet technology advancement and greater generational awareness can make.

Meanwhile, I was in Bristol for a few days helping a friend with some DIY, because I want to put this kind of laminate floor down in our kitchen on top of some real insulation:
aaflooring

Then I did some painting before getting relieved of my duties for spreading paint all up the paint brush handle.
aaskirts

I spent the night on the Blorenge, then flew at lunch time completely alone for two hours until I suddenly got dumped down in the bottom landing field in Abergaveny. Nobody took any notice of my death spiral down to the ground; just kept walking their dogs. I am still working hard to process the data into something meaningful — if this is possible.
hgbloreng

An invite went out for a surf on the Dee Bore on Saturday morning. I thought it might be special, being the day after a partial solar eclipse, but it was a damp squib and most of us lost the wave within a few hundred metres.
deebore

On Sunday I tried to fly on The Gyrne, but there was no wind and few thermals, so I went off on a long cycle round Lake Vyrnwy with my friend.
aacrinkly
The land-scape round these parts is ever so crinkly.

Tuesday, March 17th, 2015 at 8:39 am - - Hang-glide

Here I am at a climbing wall in Bristol, having balked at the price and instead sat in the cafe. They ought to have a discount rate for people don’t actually like climbing. Here’s what I enjoy instead. (I am so predictable):

pontwales

Brrr, it was cold in grimmest South Wales on a grim Saturday when all the colours are grey and the light makes everything flat. I enjoyed a sublime hour long flight above Pontlottyn, even though I didn’t go anywhere except soar up and down the ridge alone and then top land in a howling gale.

My box of tricks is in the 3D printed purple box on my left next to the airspeed indicator. I’ve not had the chance to do anything with the data except plot it and go: “that’s pretty noisy” at the accelerometer data. I have plans to extract consistent correlations, barometer vs altitude vs temperature, bar position vs wind speed, roll angle vs turning rate registered on the compass, and whether I keep diving out of turns because I don’t have enough speed and control.

Unlike my so far doomed attempts at manipulating house and fridge temperature data, this flight dynamical system is memory-free. The same temperature, pressure, windspeed, and wing angle at any time of the flight should result in exactly the same response. Deformations of the wing are brief and temporary. This is not the case for the fridge where every cycle begins with a different temperature distribution within the dense cabbagy foodstuffs and chemical pumping machinery.

Subject to instrumental noise and turbulence, all the data should be with me, and I can only hope this isn’t going to end up as just another one of my expensive failed software projects that looked plausible when I began, but then crash landed in the trees.

Wednesday, March 11th, 2015 at 3:35 pm - - Hang-glide

In spite of being up to lots of things, I’ve not been very interested in blogging of late.

I got my first flight of the year — a 3 minute top-to-bottom that began with a nil-wind terror swoop on take-off, followed by my almost forgetting to unzip the harness on landing due to being distracted by the sight of ducks paddling around in one corner of the water-logged field.

landingshadow

Here’s the data stream from the landing.
landingdata
Vertical lines at 5 second intervals. Yellow for barometer (air pressure rises as I descend), red for airspeed, cyan for GPS ground speed (seeming to correspond), white accelerometer pitch measurement, showing the pathetic flare coming into landing when all the speed drops off. The previous hump may correspond to the final approach turn (you have to push out to tighten the turn to a turning circle of about 35metres).

takeoffdata
Here’s the take-off sequence, with a slight push-out which was not held long enough, so I dropped very fast. The yellow for the barometer briefly goes below the starting value showing that at one time I got a bit of lift and could have been almost half a metre above take-off.

All in all, quite disappointing, but I’m glad to have some data to work with from my electronics device. I’m going to really appreciate the next flight when I stay up for a bit.

hgelectronics
Oh yeah, here’s a close-up of the one corner of my dog’s breakfast electronics project.

boxprinting
Luckily, 3D printers can print anything — including the abominable box I’ve “designed” in OpenSCAD to cram that electronics stuff into.

machtooldoes
Meanwhile, all this will probably be shelved due to this widget showing up in the hack-space this lunchtime. More later.

Tuesday, February 17th, 2015 at 11:15 am - - Machining

The green is the raw plot of the accelerometer vector which was aligned with the crossbar of my bike on the ride. The red is the altitude, the yellow is my speed — clearly slower going up hill than going down as time advances from left to right. We stopped for a bit at the top of the hill.
gyro1

This is smoothed with an exponential decay factor of 50/51 on a time sample rate of 0.1seconds, so a sort of 5 second time window.
gyro2
This is applying the exponential smoothing filter backwards as well, which is a trick I heard about a few days ago. I haven’t worked out of the maths of it yet, but it looks good.
gyro3
Here are some vertical lines showing periods of ascent and descent with the second white horizontal line denoting the overall average accelerometer reading that you can think of is approximating how much the bike cross bar is pointing up or pointing down from the horizontal. I can convince myself that it is negative on the uphills and positive on the downhills where it is tending to point more in the direction of gravity.
gyro4
Here’s a zoomed-in section of where we peddled down the hill and then heaved our way back up the other side. Because the rates of descent and ascent are about the same it means the slope down must have been shallower as I don’t peddle up hills very fast.
gyro5
Unfortunately I’m not competent enough to overlay this on a map to see these places on the contour lines, and I don’t have a bike wheel trip magnet to measure distance travelled properly.

Anyway, it’s not really for my bike; it’s for putting on my hang-glider. The bike is just a good way to test things till I can get out flying again.

Monday, February 16th, 2015 at 8:49 pm - - Machining

Quick report on the misery of trying to get any good data out of these fancy good-for-nothing data sensors.

I did a bike ride on Sunday around Yorkshire, from Barbon to Dent, up the valley, down to the very fine Cafe Nova in Sedburg and then back to Kirby Lonsdale via a bridge over the river Lune where Becka and I went kayaking in January and got scared (it looked a bit tame in these water levels). This was the day after the day before where I broke my caving famine and did a nine hour Easegill traverse from Pippikin to Top Sink while the hard people (incl Becka) did the reverse route and went out Bye George to celebrate Tom’s birthday. (This was the same Tom who drove out to Austria with me last May so I could go hang-gliding when Becka stood me up to go on a caving holiday.) Hint: for my birthday I will not be going caving.

So, anyway, you’d think something as simple as the GPS-altitude and barometric readings would be somewhat related.

This is what the plot looks like of barometric pressure along the X-axis (zeroed at 990Mb) vs altitude, which ranges from 102m to 305m. Yellow is the first hour, where we went over the hill, and blue is the second hour peddling up the valley from Dent.
baroalt1

Not a great correlation. Here’s the same picture zoomed in. The squiggles are predominantly left and right accounting for the noise of the barometer readings.
baroalt2

Suppose I take a rolling average of sequences of 7m and plot the same here without all the noise, getting the yellow line.
baroalt3
Still pretty wobbly. The cyan is the plot of the barometric forumla which is:

101325*(1 – 2.25577e-5 * altitude)5.25588

This is near as damnit a straight line of slope -0.08488715682448557. Applying simple linear regression to the slope gives -0.08992119168062143, which is not a great match.

Maybe I ought to work out a way to do this calculation in run-time on the device itself to give a measure of how rubbish the altitude-barometer agreement is during operation so I don’t have to bring it back here and run these complicated python programs on the data.

Then I could see if it’s responsive to the mode of travel, eg bike vs walking up and down the hill.

The next correlation to look at from this data is tilt of the bike frame registered from the accelerometer vs the slope climb according to the GPS. I’ve got very little hope this will work, so have put it off. I’m already sure that the temperature vs altitude signal is completely lost in the noise, probably due to the proximity to the ground on which the sun was shining.

I hope to see something better if I ever get this thing in the air. Right now I’m 3D printing enclosures to grip on to the base bar and am gathering a desk full of lots of bits of useless bits of plastic. Got to push on and not be distracted.

Wednesday, February 4th, 2015 at 11:14 pm - - Machining

So I had to bodge the wind sensor interrupt readings and filter out the glitches. Beyond that, there’s a heck of a lot of variation in the readings when in front of the fan (getting 12mph wind, according to the proper device), and even at the nozzle of the vacuum cleaner (where the wind speed was 42mph). Either there’s still turbulance or the sensor is wobbly. Not impressed.

fandrier
Next up, there’s the sudden-air-temperature-from-flying-into-a-thermal detector based on the analog TMP36 connected to a large capacitor to bring the voltage changes down to zero, and so they can be put through two op-amps (one for positive and one for negative changes).

I turned on and off the hair drier behind the fan that points at the dangling circuitry and got this trace.
fandrierplot
(more…)

Wednesday, January 28th, 2015 at 11:52 am - - Machining

As I suspected, this is where all my grand designs go completely wrong. Recall that I proudly got the wind speed probe to convert each passing of the fan blade into a square wave voltage spike earlier this month.

Well, the reading of this signal was to be done with the following code:
(more…)

Friday, January 23rd, 2015 at 11:25 pm - - Machining 1 Comment »

After spending a few days with all my bits and break-out boards in a bowl and stirring them around aimlessly, I got all the major SPI components lined up on a breadboard, like so:
breadversion

That’s an SD card writer, an OLED screen display, a bluetooth low energy and a GPS module.

The additional devices are on short 4-wire phone leads in plastic printed boxes of dubious design.

After a great deal of unplanned soldering and the use of header sockets so that none of the bits are permanently stuck in the wrong place, I’ve got a thing that looks like this:

breadversion2

There are issues. The barometer has a separate power supply and now doesn’t communicate, the wind-meter has a degree of noise in its signal, the I2C accelerometer is too complicated, the dallas temperature sensors can only be read one at a time, and all three SPI devices are incompatible with one another.
(more…)