Thursday, May 21st, 2015 at 10:33 pm - - Hang-glide

The question is: Is it be possible to measure the temperature of the air in a thermal from a hang-glider?

A really good fast responsive thermometer that isn’t degraded by noise is probably going to be useful.

I have been entertaining the unconventional notion that one ought to observe the character of the noise before attempting to filter it out — particularly if it appears that all the errors are on one side due to voltage drops as other sensor circuits take readings on their own independent schedules. (No I do not believe there is any way to synchronize every one of them simultaneously.)

adccircuit
(more…)

Friday, May 15th, 2015 at 12:17 pm - - Hang-glide

Last year I discovered interference issues with the barometric sensor, which I solved by stashing the sensor on a separate board with its own microcontroller and power supply and communicating back via an optocoupler in a way no electrical engineer would find acceptable.

Now I have finally got an understanding of the noise visible on my accurate temperature sensing system based on an analog TMP36 wired to a 16 bit analog-to-digital converter.

Those fridge temperature samples were smoothed by filtering for the maximum value across a sample window, owing to the observation that all the errors occurred downwards.

I had thought that this was an artifact of the ADC device where it would tend to get the final bits of the conversion undervalues.

But it’s clearly due to various other sensor devices switching on briefly many times a second, causing a voltage drop as they draw their power, and my ADC detecting these fluctuations rather than any changes in temperature.

The experiment which isolated this effect was a hack to the main loop to make it switch off or on sets of devices every 30 seconds, like so:

void WholeSdOledBle::LoopWhole()
{
  int mstamp = millis(); 
  int icyc = (mstamp/1000/30+5) % 8; 
  if (adctmp36)       FetchADCtmp36(100, 80); 
  if (icyc>=2)  {
    if (jeenodeserial3) FetchJeenodeserial3(); 
    if (consoleserial)  FetchConsoleSerial(); 
    if (BTLEserial)     FetchBLE(); 
    if (gpsdata)        FetchGPS(); 
    if (wr)             FetchWind(); 
    if (lightsensor)    FetchLight(); 
    if (baroreceiver)   FetchBaro(); 
    if (dst)            FetchDallas(); 
  }
  if (icyc>=3) {
    if (irthermometer)  FetchIRtemp(200, 30);
    if (compassdata)    FetchCompass(); 
  }
  if (icyc>=4) 
    if (gyrodata)       FetchGyro(); 
  if (icyc>=5) 
    if (humiditydata)   FetchHumidity(); 
  if (icyc>=6) 
    if (tbarometer)     FetchTBarometer(); 
}

Here is the graph of my temperature readings over part of this window. See how my yellow line of accurate readings (at the precision of 0.003degC) gains a 0.5degC of noise when I switch all the sensors on.

adcnoise

This is going to be of no use if I’m trying to detect the subtle temperature change due to flying through a thermal.

(more…)

Monday, May 11th, 2015 at 11:44 am - - Hang-glide

I picked up on the Chicago Array of Things by this clip at the BBC.

Here’s a screen grab of the circuit as the guy is showing off his hardware kit.

click1

I was struck by the similarity with the kit I’ve been working with and taking on my (frustratingly infrequent) hang-gliding flights.
palvario1

It shouldn’t be a surprise that they look the same. All we’ve done is bought all the cheap mini sensors we can buy and soldered them together onto one board.

The Chicago group make a big thing about the beauty of their hardware box design, which it is. But what do you DOOOO with the data? This is the question I posed to the Barcelona SmartCitizen Sensor Kit whom I saw at the MakerFaire in Newcastle a couple of weeks ago.

The answer was the usual: we put the data on the internet so that anyone can download and do whatever they want with it.

Like WHAT?

And so on.

I have to harangue because I am on constantly on the lookout for techniques and people who are where I’m at with this type of sensor data. There are no adequate tools. I am constantly hacking different trials and plots of the data using bare Python and discovering all sorts of things that are important.

For example, I don’t think these sensors are quite right. The digital compass needs calibration every time you plug it in, and the accelerometer was biased in one of its planes.

And here is the graph of the humidity in RED, windspeed is the horizontal green squiggly line, and barometric pressure is the white line.
humidbarow
The humidity only got to 90%, having started at 70%, which means I only got 2/3rds of the way to cloudbase. Note how as the barometric readings go down (with altitude), humidity is going up, because the air temperature (not displayed) is getting colder and approaching the dewpoint.

The humidity value is waving about all over the place, and then it settles down as soon as I take off (at the vertical yellow line). Then it begins waving around everywhere before I come in to land 50minutes later (the vertical lines are at 5minute intervals).

I don’t know the reason for this. Is it the windspeed? Is it the proximity to the ground?

My experiments on a bicycle have been inconclusive, not least because the vibration of the road tends to shake many of the components loose. And I can’t peddle fast enough.

You can tell immediately that there’s a lot more to getting something useful from these devices than simply taking the digital readings and assuming it’s the truth.

We had this problem in cave surveying when digital compasses and clinos came about, and people made totally buggered up mistakes and wildly out of calibration cockups that they never would have done with a mechanical instrument. Just because it’s an electronic number you tend to want to write it down to two decimal places in degrees. But if you were using the analog compass you might have actually noticed the way it swings when you hold your helmet light or steel karabiner too close enough to it to affect the magnetic field.

We like these digital devices because we don’t need to think. Just put the uncalibrated values on the internet and hope that someone else can do the thinking for you.

I will only know that these sensor folks are on the same page as me when they get desperate and one day nail every single sensor node they own onto the same lamp-post in order to see to what extent they agree at all. And then I’d like to see the existence of some software that is actually able to correlate the measurements between the different devices to account for their variability.

That’s my demand. It’s what I call “Test Driven Development”, except the Tests are lavished on actual real things that matter which you don’t know about (such as the repeatability of these measurements), not on pointlessly obvious-when-they-fail bits of self-contained code. That’s the kind of TDD I won’t truck with when I am lost in a sea of uncertainty as to what is to be done. For months I am having to do the equivalent of programming doodling and sketching of ideas. Not possible to produce any finished artwork design.

Thursday, May 7th, 2015 at 7:31 pm - - Hang-glide

Well, aside from losing the extra day at the beginning by being directed to the wrong hill while everyone flew in the Malverns, then two days of fog and drizzle in the camp site with a leaky groundsheet, and the day after the good one with its 40mph winds that exploded my UV-damaged tent that was then rolled up and shoved dripping into the back of the car minus several items that blew away without my noticing, my single 51 minute flight 7km downwind of Bache Hill as part of the British Open Series competition was not an unmitigated failure.
tentblown

I suffer for my sport.

Becka says I should do more caving, because that’s a sensible sport. You can schedule 7 hours of caving any day of the week you like, go down the hole, and that’s exactly at least as much as you will experience. Hardly ever a disappointment.

Call me picky, but I won’t be satisfied by 7 hours down the same old muddy wormholes every weekend, just as I can’t be satisfied by a bale of grass for breakfast. I’m not a horse. It’s not a digestible substance except as part of a balanced diet with many other things.

Here’s a picture from the hill on the day.
bachhill

The gopro SD card lost its read-only tag and didn’t work, so I don’t have any pictures from the sky. My head is still spinning.

Back in the old days when hang-gliding was actually popular (and I was a student with a crap glider that I flew crappily), these competitions were exclusive affairs, where only the top elite pilots from each club were allowed to darken the skies above the playing field.

Nowadays, they need more newbies, so they’ve established a “club class” with a special easy task, and go to great lengths to make you feel welcome to have a go.

They’ve even arranged special retrieve car for us noobs, knowing that we’re not in the position to organize our own. I mean, we all like to think that we have the potential to do some amazing XC, but it isn’t realistic. But it could happen. And then you’d lean on some friend to be your retrieve driver for the week, and only ever get as far as the bottom landing field, causing immense humiliation in the eyes of the person who’s just wasted their holiday not being required for something that could only have been important if you weren’t so damn big-headed and useless at flying.

A huge part of the game is is mental attitude and negative thoughts, and the organizers are well clued up on this, thank heavens.

Anyway, we drove to the hill. We were advised to take off early. The wind was off the slope blowing from the right. There were 30 gliders on the grass in front of where I’d parked. Suddenly the sky was full of them. Too many. And the wind veered back to parallel along the slope. I knew I had blown it again. Many were struggling to stay up. You could hear certain notes of concern in their voices as they talked over the radio about which end of the slope to go to before they lost it.

I had fitted a helmet radio the day before, and it was like wearing stereo headphones for the first time ever. I was on another planet, leaning on to the front wires of my glider waiting to take off. I left the mic unconnected, or I might have said: “It’s one small step for a man”.

A gust of wind came through. I was so spaced out I didn’t notice I’d left the ground. The funny thing about the flight is I don’t remember any wind during the whole experience, until I landed in a field full of sheep and lambs. Then it was blowing a gale.

It was a joy to fly in the gaggle of gliders. They said you really only had to worry about the two or three gliders at your altitude. These are all top pilots, all doing the same thing (going up and not going down), all turning in the same direction.

Eventually, after wallowing close to the bracken several times, I got up high, 500m above take-off, to an altitude that the earlier pilots had spoken of reaching, and I continued circling over the trees and the back of the hill. Everyone else rose above me and I lost track of where the heck they were.

bachgpsside

Then I lost the thermal, drifted downwind a bit, found another thermal, didn’t cling on to it with all my might, lost that, and came down at the high point of a hill to avoid descending into a one of the many narrow valley where it looked like there would be nowhere to land.

Two gliders passed overhead like flyspecks while I was packing up. They travelled in long straight lines to find their elusive thermals, and one of them circled until it hit the clouds.

The worked calculation of how far short I was out from cloudbase by will be included in the next blogpost after I have completed more analysis of the data.

Thursday, April 30th, 2015 at 10:13 am - - Whipping

I’ve not been doing as much as I should regarding this General Election. A few leaflet rounds, one canvassing session. After attempting (and failing) to contribute code to the Election Leaflet website, I’ve been handed the job of reading through hundreds of election leaflets each morning to look for anything interesting, which I report by entering it into a google excel spreadsheet. Urgh. But it’s my duty. Takes hours, and I’m going crazy with it.

Top issues are: NHS more funds, HS2 abolished, Green belt protected, increasing recycling, cutting carbon use, and opposing those ineffective flickering noisy windfarms that clutter up the countryside when we need more flood defences that aren’t going to work due to rising sea levels, you dumb-dumbs.

Basically, this election should be cancelled for lack of interest. I’ve driven from one end of the country to the other, from Land’s End to Liverpool, then to Newcastle and back to Liverpool, and there are approximately zero election posters of any kind (plus or minus less than 5) in gardens, on walls and billboards. Even the news media is bored to the extent that it barely makes it into the first half of the news hour each day. There is nothing to say.

Now I’m going camping in a field in Southeast Wales to get humiliated and intimidated at a HG competition for the next few days so I’ll miss whatever comes about internetwise. Be back on Wednesday night in time for the 5am leaflet drop on election day and the count (unless I can avoid it). The real fact is that it’s only the votes that count on the day. Nothing else matters.

Monday, April 27th, 2015 at 12:08 pm - - Weekends

Well, that’s partly because I don’t really know where I’m going at the moment. I do something, it half works, I move on to the next thing, and retain the knowledge without recording it properly.

For example, I’m still on the case of getting some sense out of those cheap £2 accelerometers whose capabilities exceed what I can program. Last week I attached one to the end of a 1.5m long spare aluminium upright and spun round on an office chair as someone timed my speed of revolution. The absolute value of centrifugal acceleration in addition and as a proportion of gravity was consistent with the calculations and within the margin of error. But there wasn’t really enough to write down in a post. When I can consistently calibrate the dip angle of the compass to the gravitational field, then I’ll write it up properly.

Over the weekend I was at MakerFaire in Newcastle, where loads of hack-space people filled out their already packed city science museum with even more exhibits and popup stands. Ten thousand screaming children came through the door. Oddly, I recognized the RoboChallenge kit there which I seen in Coventry in the Fusion360 room where it had been lonely and unused like some kit tossed in there to try and make AD look cool.

btvbgone

Becka got taught to solder a TVBGone by Mitch Altam. We first saw this gadget when we went to the 2007 Chaos Computer Congress in Berlin. I’d never knew I’d eventually be able to do electronics.

A bunch of other stuff happened, but at the back of my mind I was grumbling at missing the best day’s flying in Wales this year on Sunday. The week before I was so desperate to fly in Easterlies that I drove up to Yorkshire on my own at 6am, carried my glider half-way up Whernside, decided it was too windy, stomped back down in a huff, and then felt way too beaten up the next few days to do anything except mope around the house and mow the lawn.

Should just stop complaining. Towards the end of the week the Easter diving cheered up as the water cleared.

vinnickjgt

vinnickprop

I stole some clips of myself from someone else with a gopro.

jsedgy1

jseghy2
Becka had nicked the good torch for her caving trip to China, so I was stuck with two crappy torches with dim bulbs. The club did a dive on the Runnel Stone on the last day, driving the boats out of Penzance, before we went home.

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.