Freesteel Blog » Hang-glide

Friday, March 3rd, 2017 at 11:04 am -

Abolishing the differential barometer 200ms autocorrelation

To be clear, I haven’t got mathematical proofs here (I don’t have the time), but the experimental evidence is quick to get.

Take the differential barometer sensor (used to measure airspeed) of the hang-glider flight logger. The Arduino code which updates the reading every 200ms looks like this:

```long lastpx4timestamp;
void Flylogger::FetchPX4pitot()
{
long mstamp = millis();
if (mstamp >= lastpx4timestamp + 200) {
sdlogger->logpitot(px4timestampset, px4pitot-rawpressure, px4pitot->rawtemp);
lastpx4timestamp = mstamp;
}
}
```

Why did I choose 200 milliseconds? It sounded like a good number to read it at. This is a quick way to program it to be a regular reading.

A better way is to actually synchronize it with the clock divided rather than simply add 200ms to the next time, like so:

```int mstampdivider = 20;
int prevmstampdivided = 0;
void loop()
{
long mstampdivided = millis()/mstampdivider;
if (mstampdivided != prevmstampdivided) {
prevmstampdivided = mstampdivided;
}
}
```

Now that code reads at 20ms rather than 200ms, but it prints a load of output which I can cut and paste into a file and read into pandas, like so:

```rows = [ (int(s[0]), int(s[1]))  for s in (ln.split()  for ln in open("../logfiles/dmprapidtest.txt").readlines())  if len(s) == 2]
k = pandas.DataFrame.from_records(rows, columns=["t", "d"])
```

And then we can plot the autocorrelation (the covariance) with itself shifted in time, like so:

```d = k.d   # just the measurement Series
dm = d.mean()
ss = [((d - dm)*(d.shift(i) - dm)).mean()  for i in range(400)]
```

Let’s zoom in on the first 50 covariances:
(more…)

Saturday, October 15th, 2016 at 2:20 pm -

Hat-trick and a wrecked living room

Maybe I’ve got writer’s block. I’ve not even filled these into my logbook. I call it a hat-trick if I do a cave trip, a hang-glider flight and a dive in the same week. This is the fourth time I’ve done it. Generally speaking, the individual events are not all the greatest: the dive was pretty murky, the cave was gritty, and the flight was ridgy. Can’t complain.

The wreck of the Azmund is in Holyhead harbour about a mile of paddling out from the beach.

It was dark and murky and we didn’t find the way back to the boilers after starting on it. The wreck is huge though. Part of the metal juts out of water at low tide.

On the way back we discovered why the beach we launched from is not popular with kayakers — it dries out to about 500m. We couldn’t see our boats after the first time we walked back with a load to the car.

That was Saturday. There was a pleasant day out at Moelfre, with some people being terrified of the currents, but it was the wash from the joy-riding lifeboats that nearly sunk us. The image of the almost breaking 4 metre high wall of water that came upon us while we were anchored in the shallows of Rat Island a few minutes after they zoomed through the channel is going to live long in my memory. The second dive worked out well when we found the remains of the Royal Charter in the sand after groveling in the shallows among the kelp where it was supposed to be until giving up.

Then there was a cave trip to the far end of Ingleborough Show Cave (the only photo of which I have is a line of cavers getting changed on the footpath), followed by a quick escape home ostensibly to start clearing out the house, but which was in fact an excuse to be in North Wales for a flight off Penmaenbach.

I landed on the dwindling beach at high tide after an hour of very smooth sailing in the sea air.

A concrete breaker was hired to smash up and take down the floor. We filled a skip with the crap a day later with some help from friends.

Now we live in a building site. Again. And it’s mid-way through October.

Sunday, September 4th, 2016 at 8:52 pm -

Pyreneean notes

A bit of a bonus holiday slotted in here, with not much time or care to waste on the internet.

With three of us in the car, first we went down to a campsite near Perpignan and picked a 3.6/4 grade canyon of Llech, which was an absolute hit with all of us. There were jumps and toboggans galore, including one called the pistol that shot you up in the air 5m over a deep pool. We need to go back to that area and do the others.

Then I snuck in three days of hang-gliding off Ager with the bonus help of a retrieve driver. On day2 I tried to go behind the ridge, and it didn’t go well. I don’t know how I pulled it down into the field not of my choice without busting something more than the skin of my knee, but I got away with it.

It should have scared me more than it did. Instead my worst moments of terror were on the K5 rated via ferrata Cast Urquiza Olmo to the west of Ager by the lake.

On the third day up the hill I got an amazingly detailed briefing from some visiting British hang-glider named Al about where to go and what to expect (a huge zone of downwash behind the ridge which you can confidently get through if you start with 7000feet of altitude). It worked wonderfully on my third attempt.

Then I let myself down by nearly parking my glider on a rebar fence by curving round too wide and falling short of the field I was aiming for.

But before that happened, the feeling came over me again where my wings became part of me for those few hours up in the sky. The joy was existential. A lot of the time I was circling with vultures. There are a lot of them about.

In the evening we picked up Becka from Lleida and then went to Torla-Ordesa to see the scenery. Unfortunately the morning buses were all full, and you’re not allowed to cycle up the tarmac road which carries the diesel buses because it’s a Spanish national park, so everything is banned even if it doesn’t make any sense. So we walked in until my foot-soles wore out on the way back and I had to catch the bus.

Then, on the way back to France, we dropped in on the 3.2/4 rated Neste de Saux canyon, which wasn’t that great, but we were pleased because we proved we were still up to it.

Now we’re in a gite in Aspet with a bunch of cavers. Everyone is going out to run around the maze known as Felix Trombe, while I have carried on working on the ground window software, where I have implemented a real hack to create flat shading within a the GLSL GPU shading framework:

The trick is to note that the passage tube structures are made from quads which you can colour with 8 colours {-1,1,-2,2,-3,3,-4,4} such that no quad shares a colour with any of its neighbours (edge or corner otherwise). Choose the brightness factor on each quad (say it’s 0which goes:

```float flatfac = max(0.0, max(max(abs(vflat4.x), abs(vflat4.y)),
max(abs(vflat4.z), abs(vflat4.w))) - 510.0);
gl_FragColor = mix(gl_FragColor, vec4(0.0, 0.0, 0.0, 1.0), flatfac);
```

(I’m now fed up with fighting with this crappy internet connection. It’s probably why I’m getting so much work done.)

Wednesday, August 24th, 2016 at 9:16 am - Hang-glide

Time Lapse vids from the hill

I spent the last three days at the washout known as the British Open Series 3 where one day out of five was flyable. This was yesterday from a hill called Camlo which is a “little flown hill, especially for hang gliders, as there is not a suitable bottom landing field”

Numpty here took off first with everyone watching and waiting because there were no clouds, and I got thrown about a bit. Luckily there were no other gliders in the air to dodge.

Then I came in and landed when things got full up like a zoo (orange glider on the 39th second of the vid).

Then I un-redeemed myself by sitting on takeoff for most of the next video until the launch window was about to close.

Most of the big boys got away during that time until I was one of just two gliders left in the air. I went in and landed just as the other one got away to a big cloud. Grumble.

Once you’ve tasted XC flying, nothing is ever good enough again.

Thursday, July 28th, 2016 at 11:25 am - 1 Comment »

Home now with the blues

I don’t know which direction to go now, so I did a quick bit of video editing of a flight in Italy. I got plans to write this story up in more detail if I can get over the writers block that’s making it difficult even to complete my logbook.

I am losing control over direction. I should be running the machine tool on something, to keep it oiled. But then there is the GroundWindow app that I’m converting to work in Yorkshire with the cave data we have there. And also analyzing my flight logger data, which I seem to put hundreds of lines of code into a week, but continues to get nowhere. It’s strange.

The WebGL situation with GroundWindow is diving into a real rabbit hole. I have long known I needed to learn how to code GPUs, but could never find a way in. GPU technology, as I have observed, makes much of the software engineering I have done over the years entirely redundant.

Last week I spotted that the genius who made the early webgl water demo I’ve been hawking around to prove my point finally written a blogpost about one small aspect of the demo.

In it he referred to another blog about the GPU graphics pipeline (written in 13 parts), that I am trying to work through. I’m getting about 50% of it at most.

The question then comes down to whether there are any meaningful new machining algorithms that can be built based on this technology, using OpenCL or whatever, because that’s one of the few things I am uniquely qualified to research better than most — even if I can’t persuade someone with a budget to pay for it.

That’s just normal stupidity and mis-allocation of capital by those in control of developmental budgets.

For example, let’s take the massive public engineering program called Trident just authorized by Parliament this month to build four nuclear powered submarines to provide that essential round-the-clock service of threatening indiscriminate annihilation to targets unknown at a few minutes notice.

Now some MPs believe that investing in high technology is good merely for the sake of it, like Toby Perkins, who said in the debate:

The most depressing exchange was with representatives of the GMB union in Barrow [where the submarines are built], when… [the MP] for Islington South and Finsbury suggested that they might like to make wind turbines instead. They politely but firmly informed her that they were involved in designing and producing one of the most complex pieces of technology on the face of the earth, and that wind turbines had already been invented.

Setting aside the fact that nuclear submarines have already been invented too, the difference is that wind turbines produce electricity, which has value. Military nuclear submarines, on the other hand, have no return on investment. They are not put for up sale as part of the international arms market to foreign dictators (and you won’t get away with selling used ones to Canada again). The subs are not applicable to a modern resource war, like the invasion of Iraq where the plan was to win the wealth back by stealing their oil, because the victims don’t have navies. And there is no program for technology transfer, given that the nuclear power industry has been entirely outsourced to France on a strategic level

In fact all the engineering being budgeted for this program is wasted and will be subtracted from the engineering brains available nationally, just when we need them most and the availability of immigrant engineers is going to be choked off.

Nuclear war, in terms of the way the politicians handle it, is worse than low-grade Science Fiction. So at this time I picked up the 1964 Heinlein post-apocalyptic novel Farnham’s Freehold, where an all-out nuclear war blasted the Goldwater republican right-wing Americans (with the same mind-set as the author) two thousand years into the future from their private fall-out shelter. Here’s one of the characters in the future civilization looking back at the recorded history trying to interpret the events:

The war itself he didn’t find hard to believe. He had experienced only a worm’s-eye view of the first hours, but what the scrolls related matched the possibilities: a missile-and-bomb holocaust that escalated in its first minutes into ‘brilliant first strike’ and ‘massive retaliation’ and smeared cities from Peking to Chicago, Toronto to Smolensk; fire storms that had done ten times the damage the bombs did; nerve gas and other poisons that had picked up where the fire left off; plagues that were incubating when the shocked survivors where picking themselves up and beginning to hope–plagues that were going strong when the fallout was no longer deadly.

Yes, he could believe that. The bright boys had made it possible, and the dull boys they worked for had not only never managed to make the possibility unlikely but had never really believed it when the bright boys delivered what the dull boys ordered.

Not, he reminded himself, that he had believed in ‘Better red than dead’–or believe in it now. The aggression had been one-sided as hell–and he did not regret a megaton of the ‘massive retaliation’. [Chapter 14 p190]

Two things: Being ‘red’ is actually a temporary phenomenon (unlike radioactive and dead). Just ask the East Germans.

Secondly, the Cold War was stoked and prolonged by the dull boys in America, from their endless lies about the missile gap, to their intrusive U2 surveillance flights across Soviet airspace that utterly wrecked the four powers peace summit that had been scheduled to de-escalate the Cold War in 1960.

Ironically, those U2 flights were collecting intelligence that proved there was no missile gap whatsoever, yet the President and Presidential candidates continued to lie about Soviet capabilities to paint their political opponents as “weak on defense” in the forthcoming election.

It’s the old game of elites clinging to power by scaring the bejeezus out of the public, and then offering dangerous answers that don’t work, and successfully displacing consideration of the real problems at hand that require solutions they don’t want anything to do with.

The problem with our thinking is that future exists only in the human mind, and we are not carefully discriminating between the challenges ahead that are entirely within the various states of mind, such as the threat of war and the causes and consequences of property distribution and financial debt– and challenges out there in the physical world that are not going respond to any of our puny beliefs, like climate change and the polluting energy systems in the modern world.

In a sane world the Committee on Climate Change would get the £200billion engineering budget to start building the stuff we need now, like tidal barrages and CCS, and the nuclear warriors would instead sit in smoky committee rooms writing strategic reports on paper and getting sent off to international conferences to sign treaties– in other words do the sorts of things that would solve those problems completely.

That’s the way round it should be. But it’s like we think we’re looking through a window on the future, and instead it’s just a mirror reflecting the past behind us. And this would be fine, if it weren’t for the point of reality that time does not in fact run backwards.

Saturday, June 25th, 2016 at 8:38 am - Hang-glide 2 Comments »

Schlommerdreieck!

I did it! I f***ing did! The mission to fly from the Loser to the Dachstein and back as mentioned in my Skywings article last year.

It was third day lucky. First day was a practice day, which somehow got me to Grimming and back in a four hour flight.

Second day I went for it because of a very good alptherm prediction, and fell out of the sky from 3000m to ground level in Bad Mitterndorf in a matter of minutes by attempting to punch through huge valleys of sink on my Sport2 due to stupidity, ignorance and nothing else. I misjudged the winds and there were no clouds to remind me where the thermals were — ie not in the valley.

On the third day alptherm gave an even crazier thermal forecast, the like of which I’ve never seen for this place.

I wonder what that german writing at the bottom says. Probably nothing important.*

I held back as two topless gliders took off at 12:30 and one of them went down. I knew 1:30pm was my magic time. The alptherm values are in UTC (add 2 hours for local time), so it really only starts cooking on at hour 1pm, before which it feels like there is a pause in activity.

And I went straight up to 3000m where the valleys and mountains are just minor details and threaded my way from cloud to cloud.

The sky gods sent the cunimbs onto massifs beyond all four corners of the flight and while the Dachstein gruppe remained miraculously clear.

Then it was off the the Grimming, arrived from the thermal hotspot to the east but unfortunately below its peak and was too intimidated to do any circling near this blasted mountain.

Luckily there were paragliders flying here and there to guide me and stop me from wussing out whenever it was feeling too extreme.

Was it a bad idea to go higher? There was a speck of a floppy paraglider up there in front of the cloud. Is it okay to fly over the 3000m peak of the Dachstein? There were two paragliders right down low over it.

How is it possible for something this amazing to continue? Just a set of simple wings on my back in this crazy place. This is an enactment Niven’s third law including commentary, which may predate the invention of hang-gliding:

3) Mother Nature doesn’t care if you’re having fun.
You will not be stopped! There are things you can’t do because you burn sugar with oxygen, or your bones aren’t strong enough, or you’re a mammal, or human. Funny chemicals may kill you slow or quick, or ruin your brain … or prolong your life. You can’t fly like an eagle, nor yet like Daedalus, but you can fly. You’re the only earthly life-form that can even begin to deal with jet lag. You can cheat. Nature doesn’t care, but don’t get caught.

I got there. There were big anvil clouds to the south darkening the whole horizon. This is the way I am going, across this sea of rock and snow back to Altaussee.

It was like a solid glide for 20 minutes, then a thermal off a corner buttress so I didn’t have to squeak through the Obertraun valley, then another 20 minute straight glide to the Trisslewand that had a huge cloud hat on that worked. There was nothing else between.

I decided to come down before anything went wrong and was actually able to phone the cavers sitting in base camp to tell them to look to the sky. They couldn’t hear me, so I texted them instead. Texting while flying is about as dumb as texting while driving, but the air was quite open at 2200m.

Becka cycled up and helped me carry down from my favourite landing field behind the campsite. I celebrated with a beer. It still gave me a headache. Back to earth. This is now the state of the campsite. The noise is awful.

* Translation: At the moment thunderstorm and precipitation symbols can’t be shown due to technical reasons.

Wednesday, May 25th, 2016 at 12:58 pm - Hang-glide

Against the Ceiling at Tailbridge and Mallerstang

This was Sunday (yesterday) on Tailbridge Hill while Becka and friends were attempting some 80 mile massive cycle ride including a race up Great Dun Fell (844m), somewhere square in the middle of that dark grey wall of rain and hail to the north of me.

They didn’t make it. I suspected that something bad could happen in that area on an otherwise sunny day because of the RASP forecasts:

They were to the NE of Kirkby Stephen in the blue, and I was to the SW in the place with the nice thermal updrafts. I already knew no one was interested in my weather observations if it could lead to a change of plans, because they’d all been on a futile journey walking up a hill to a flood-prone cave on Saturday when I knew two strong cold fronts were predicted to pass overhead and make everything miserable.

I got into my own spot of hail up at the clouds at 1300m over Mallerstang Edge late in the day, and it was nice witnessing this three-dimensional field of white pixels streaming past.

I don’t have time to edit any video, so here is a video with a bit of hail in a flight last month from Builth Wells.

I had to do a better landing yesterday, because in Yorkshire the field boundaries are made of rocks.

Thursday, April 28th, 2016 at 12:04 am -

Sensors in the sky

Well, the hang-gliding has been quite lovely. But the logger appears shot to pieces.

I still don’t know what I am doing when I get to cloud-base, which is probably why I plummeted out of the sky shortly after this picture was taken.

As soon as I took off, the barometer stopped communicating most of its data.

This is the device I lavished so much time on isolating it from the rest of the electrical circuit and arranging for it to bitbash the information back through an interrupt pin.

It could be some timing issue, or whatnot. No way to debug it. Luckily I got myself a Bluefly vario which does the same thing of reading a MS5611 barometer on a tight 50Hz loop and transmitting it back to the main board. In the Bluefly’s case it’s for the purpose of running a Kobo/XCsoar system. I’ve just given up on the one I built as it’s too inferior to simply running XCSoar on the phone where I’ve got colour and more or less know how to use it.

Luckily the Bluefly also sports a GPS and works through a serial port, so I’ve yanked off the Adafruit GPS breakout board and bodged the wires to insert the Bluefly in its place.

Then there was a small matter coding it up using a complex state machine to program the GPS module through the Bluefly pic processor to get it to read at 10 times a second.

But then the BNO055 orientation sensor played up and decides to shutdown at unexplained moments for unexplained periods of time.

The white vertical lines are 10 minute intervals, and there is a green dot for every successful orientation reading, with y-value proportional to the time since the previous reading, so I’m getting gaps in the data of half an hour in flight.

I’ve produced a reset timer to try and start it off again if no data comes through for 20 seconds.

Anyways, here is one of those nerve-wracking close encounters with the ground during the flight.
(more…)

Tuesday, April 19th, 2016 at 11:29 am - Hang-glide

Long Mynd Over The Back

If you look closely you can see the grin behind the helmet.

There was nothing especially epic about this XC flight from the Long Mynd to Clee Hill, except a masterful get-away from the slope in nil-wind with just one thermal during which I miraculously stayed on top of all the paragliders. Also there was a very low-save.

I took off at about 1:30 during the period when the wind was less than 5mph and sometimes coming from the SW. This trace is off the Long Mynd Gliding Club weather station:

No one could explain why there was so little breeze to make reliable ridge soaring possible. Meanwhile, there were champion pilots flying 100s of miles on seven hour flights on that day, which one must try not to feel bad about, when I “only” managed to stay up for an hour and a half.

One thing I did learn for sure is that I utterly depend on the thermal assist of the XCSoar running on my android phone. (That Kobo kit you see in the video is going in the bin.) The magic went away when the phone ran out of batteries; my thermal tracking abilities went out the window from that moment on. So this flight (and hopefully many more, when I sort out an extra power supply brick for the phone) is dedicated to Lines 145 to 202 of XCSoar/src/Renderer/TrailRenderer.cpp which was able to direct my search for lift whenever I lost it. This is the section of the manual describing the critical feature:

A couple more regrets. I didn’t make cloudbase by at least 300m, according to the dew point measurements. And the barometric reader, based on bit-bashing and interrupts, is completely shot to pieces by the overload on the microcontroller from acquiring so many other inputs of data. Only about 1% of the readings are getting through. I’ve got to come up with some other answer, and I don’t have a lot of time in a week when we’ve got some help doing something about the state of the kitchen floor.

Wednesday, April 13th, 2016 at 12:39 pm - Hang-glide