Freesteel Blog » Flightlogger

Sunday, September 16th, 2018 at 2:33 pm - - Flightlogger

Don’t know why, but I’ve got lazy with the blog. Probably due to use of twitter/goatchurch for quickly reporting things, which then lets me get on with what I’m doing.

Also, code gets done at github/goatchurchprime and github/Future-Hangglider.

Then I was in France and, after a couple of crashes on takeoff which took out my higher performance glider during a training week, I won the sports class on my old Sport2 that someone had driven out from Liverpool at short notice.

There continues to be a good deal of wholly ineffective data-logging from hang-gliders and stuff like that. I’ve been trying to learn to do something with FreeCAD, Blender, and Dales. It seems impossible to catch up, even if you don’t do anything new. And you’ve got to catch up or you can’t do anything new.

I still feel good watching this video Becka took in France during the competition being talked off the hill by the lovely JB on what became my best flight of the year. The eventual destination was beyond the hills on the horizon to my left. You can see my mind focussing.

Tuesday, July 3rd, 2018 at 7:50 pm - - Flightlogger, Hang-glide

We had a go, where I rigged my U2 hang-glider in the front garden with the VG full on to make it rigid, and then standing it on its nose so that JR could take lots of nice high definition photos of it from a variety of angles with a proper camera with a big lens.

The Agisoft Photoscan thing initially got it right, with a good looking 3D image:

But then I started doing things with the point scan — in particular finding its symmetry so as to compare the left wing with the right wing.

The code is here.

Basically, I loaded the 9653216 points from the csv file with this one Python command:

k = pandas.read_csv("hg1a1b.txt", sep=" ", names=["x","y","z","r","g","b","nx","ny","nz"])

And then worked out that I could perform vector calculations on the columns of coordinates, like this

# Reflect about the plane through x=2 parallel to the YZ plane
mv = pandas.Series({"x":2, "y":0, "z":0})
mvsq = sum(mv**2) # (scalar)
mvfac = (k.x*mv.x + k.y*mv.y + k.z*mv.z)*2/mvsq - 2  # 9million value column
kmirr = pandas.DataFrame({"x":k.x-mv.x*mvfac, "y":k.y-mv.y*mvfac, "z":k.z-mv.z*mvfac})

The alternative more memory efficient calculation method, performed row by row runs many, many times slower:

kmirr = k.apply(lambda R:R[["x","y","z"]] - mv*((R.x*mv.x+R.y*mv.y+R.z*mv.z)*2/mvsq - 2), axis=1)

There’s something curious about this column mathematics and how it applies to computational geometry.

In any case, have produced an animation melting through from one wing tip to the other, like so:

It seems that one wing is much fatter in depth than the other.

I think this is a photogrammetry error in its understanding of how far apart to put both sides of the wing. The gap at the leading edge on the fatter wing gives it away.

As is my observation in freeform CAD/CAM: you can get away with a lot of deviation from the required surface because no one can tell when it’s wrong. They can measure the flatness of the square edges, but errors in the middle of the freeform surface (so long as they are smooth) pass without notice. I suspect a lot of photogrammetry works on that principle. It’s only when we scanned something with two sides that was supposed to be symmetrical could I tell there was a big a problem.

(To be fair, the Agisoft failed when we reran it to get a better fit. It is better to

Well, so much for that. I had hoped I’d have something good enough to trace up and enter into XFLR5 as a series of contours, but it’s not quite.

However, I should just make up a series of contours based on this anyway (since it has things like the washout/twist approaching the wingtips) so that when we get good data (eg from a laser scanner) we are all ready for it.

Thursday, April 12th, 2018 at 4:29 pm - - Flightlogger, Hang-glide

Okay, so that last flying day at Meduno wasn’t very adventurous on the scale of the top pilots, but I was extremely pleased with it; I did just as well as anyone else in our xtc-paragliding (hang-gliding week) group and felt perfectly up with it.

Often you come down disappointed, and can watch everyone else from the landing field going higher and further and having more fun, and you’re down wholly because of your lack the skill and competence. But this wasn’t one of those days.


Here is the page of everyone’s tracklogs.

I was particularly happy with the part of the flight where I maintained my altitude over the flat lands at about 700m for 11 minutes before finally the air currents strengthened enough to carry me up. I had a sense of calm and flow rather than panic and disappointment this time.


It doesn’t look particularly low in the picture, but it felt like it.

I thought it was rising air from a pig farm I could see below and towards the dry river bed (because it smelled as such) but it couldn’t be as this as it was about 700m cross wind. I had consistently the wrong idea of the wind direction. It shows that even with totally mistaken ideas, I was still able to stay with the weakly rising air.

At one point I was passed high over a rifle range. The pops of the guns were like tap-taps on my breastbone.

I overflew the takeoff at the end of the day and took a photo of this cute pink training glider on the ramp beside the wood pile in the car park.

Then I tried to narrate part of my glide down to landing to the camera, which doesn’t work at all with my full face helmet.

One of the folks on the hill was SashaZ whose long blogpost about surfskis is what caused me to book my Tarifa trip with Becka.

Here are some other pics from previous days.

We had some long drives there and back in someone else’s car. Becka spent the whole time at SpeleoCamp caving, and so this shouldn’t count as a hang-gliding holiday.

Oh, I might as well put down my notion of the physics of flight here, while I have it worked out. It goes like this:

A heavier than air object with a mass of 100kg wishes to avoid accelerating downwards to the ground under a gravitational force amounting to 10 metres per second per second.

As each second that passes there is 100×10 = 1000 kg m/s of momentum that must be accounted for by blowing a volume air downwards at a speed k m/s.

Suppose the craft encloses a horizontal area a square metres within which it blows the air downwards at k m/s. In one second this would be ak cubic metres, which, with a density of about 1 kg per cubic metres, is ak kilograms, sent downwards with a momentum of ak2 kg m/s.

If the area a was circular, then you could cover it with a circular propellor like a helicopter, and maintain your altitude by blowing the air at sqrt(1000/a) metres per second downwards to counteract the gravity.

But imagine the shape of a is rectangular, and instead of a rotating blade, the blade moves horizontally on rails of length v and has a width w. This is somewhat like a wing with a span w flying at a velocity v.

My glider has a wingspan of the order of 10m, and an airspeed of 16 m/s, so the air needs to be blown downwards at a speed of sqrt(1000/(10*16)) = 10/4 = 2.5 m/s.

The kinetic energy embodied in this is 1/2 * mv2 = 0.5*160*2.5*2.5*2.5 = 1250 Joules/second.

If I weigh 100kg I can generate 1250 Joules from potential energy if I sink at 1.2 m/s — which is about the rate that my glider sinks on a steady glide.

This is a story of what needs to happen to the air to keep you up, not how it is done with aerofoils, vortices, induced drag or any stuff like that. And it also suggests that our lovely gliders have already hit certain limits of what they could physically achieve for their size and speed.

One way to get them to go up will be to add an electric motor to give you that extra to get off the ground, or to find a thermal when you’re going down.

That ad says they have 24 Ah in their 57.8V battery, which equates to 24*57.8*60*60=5Megajoules. This can maintain a horizontal flight for 27 minutes, which means it’s at the rate of 3000 Watts. That’s about a 50% conversion rate from the battery to powered energy, which is plausible.

It also gives a “max summit height” of 750m, which is a budget of 6660 Joules per metre. I need to give it 1000 Joules per metre in potential energy, so suppose my climb rate is k m/s then it will take me 750/k seconds to get up there, consuming 3000*750/k + 750*1000 = 5Megajoules which computes to a climb rate of 0.53 m/s over 23 minutes.

I can’t afford this stuff. I should be happy with the massive amount that I’ve already got.

Thursday, April 5th, 2018 at 10:02 pm - - Flightlogger, Hang-glide

I’ve been deeply not keeping up with blogging on this Slovenia hang-gliding trip. Telegram and Twitter seem to take the wind out of such activities. So maybe this thing is for mainly technical reports. There are a lot of dead blogs out there that only have such things. This blog was started for technical content, and then I began putting all my own activities into it.

I’ve been working on this technical thing to do with gliding and tracklogs for so long without any breakthrough that I finally decided I had to start reporting negative results.

My latest failure was attempting to use a Hough transform to derive wind speed and direction from the 2second interval GPS sample point of a glider flying around in the air mass.

There are many made up algorithms for doing this, but I wanted something mathematical. This time I based it on the assumption that the glider is mostly flying at a constant speed, so that changes in its GPS/ground speed were entirely due to flying with or against the wind. In particular, given three consecutive positions p0, p1, p2 with td seconds between them, then the correct wind velocity w would satisfy the following equation:

|p1 - p0 - wtd| = |p2 - p1 - wtd|

There is no unique solution for w in this equation; the solutions all lie along a line. So if we add some spread and combine the probability fields of solutions for every sequence of three points in the track, then the peak probability will be the best guess at the wind direction.

It’s all explained here in this jupyter notebook.

After so many failures, I’m much pleased with this result. The actual wind was blowing towards the northeast, and the bad guesses are when the glider was on glide and not doing any circles.

That was from a four hour mega flight all round the three ridges near Gorzia where at one point I got lifted smoothly one thousand metres into the blue sky at the rate of 5m/s. I could see from the capital city inland to the container ships on the Adriatic.

Here’s a picture after landing from a lesser flight today where the clouds were pretty low on the ridge.

I need to grab some self-portraits from the other folks some point real soon of me taking off, and me landing quite properly on my feet. I’m starting to hanker after a new glider, one that’s sleeker and goes faster. This one’s beginning to feel sluggish all of a sudden. I can’t afford anything else now, and it would be quite naughty. And after my spectacular failure of an XC last week on Bradwell, I don’t deserve an upgrade.

Wednesday, June 7th, 2017 at 3:28 pm - - Flightlogger

I don’t know why I refrained from looking into hacking the XCSoar flight software that I have on the phone that’s bolted to the stick to which I’ve hot-glued my temperature and orientation sensor technology.

It is now the ugliest piece of electronic junk in flight today.

sensorset

But the fact that the Air-Where project seemed to have done something amazing in the last year with Lora networks and an ESP8266 to display all your flying buddies onto the same flight map as the airspace without my noticing indicated that I had some catching up to do.

Even working full time on this I can’t remotely keep up with the tech.

Here’s some of the stuff I learned in the last couple of days.

It’s hard to believe, but there’s enough vol libre hacker capacity in Europe to squander it on two completely independent open source flight computer projects, XCSoar and LK8000 which got forked acrimoniously from one another back in 2009.

And merrily they have been implementing the same things as each other over and again (see below).

I’ve downloaded and built both systems from source, following the Make instructions. (I’m terrible at OS stuff like Make; the code is in C++ and if I do anything it’ll have to be blind and without a debugger.)

The XCSoar code seems marginally more hackable at the moment, but I should check I can deploy the Android version. (Getting all this C++ stuff to run on a Java phone environment with a bunch of different sensors is an amazing achievement.) Most people go with Kobos, but I can’t cope with the lack of colour and it looks like it’s got even more difficult Operating System problems I don’t have time to learn about.

The architecture of XCSoar is given as follows:

xcsoardataflow

The key therefore is the NMEA data stream, which the XCSoar program can point to as one of its inputs.

So, in the case of Air-Where, they’ve used an ESP8266 to connect to a Kobo or Notepad computer as a standard wifi hotspot (like I’ve been doing with my other ESP8266 projects) and somehow obtaining a stream of data composed of NMEA statements through a port called /dev/ttymxc0.

The most common source of NMEA is the GPS unit, like so:

$GPRMC,164742.682,A,5324.1915,N,00257.8000,W,10.96,098.82,190115,,,A*4e

I did not know this was part of an extended language, but it turns out there’s an air collision avoidance FLARM protocol in NMEA form as well.

According to the manual:

$PFLAA,0,-1234,1234,220,2,DD8F12,180,-4.5,30,-1.4,1*

is read as:

There is a glider in the south-east direction, 1.7km away (1.2km south, 1.2km east), 220m higher flying on south track with a ground speed of 30m/s in a slight left turn with 4.5°/s turning rate, sinking with 1.4m/s. Its ID is a static FLARM-ID “DD8F12”. There is no danger.

The final number before the * is <AcftType> and it is chosen from the following real list:

0=unknown; 1=glider/motor-glider; 2=tow/tug plane; 3=helicopter/rotorcraft; 4=parachute; 5=drop plane for parachutes; 6=hang-glider (hard); 7=para-glider (soft); 8=powered aircraft; 9=jet aircraft; 10=flying saucer (UFO); 11=balloon; 12=airship; 13=unmanned aerial vehicle (UAV); 15=static object

Well, it’s good to know that if you want a softer bump you should go for the paraglider rather than the crunchier hang-glider.

(more…)

Thursday, June 1st, 2017 at 4:06 pm - - Flightlogger, Hang-glide

I’ve been flying around my data logger on my hang-glider and doing my own data processing with mixed results for two years now.

During this time I’ve been on the lookout for someone else’s work that I can copy.

Just yesterday I discovered the existence of Dropsondes and then Radiosondes (devices that get lifted by a weather balloon with a radio link; nothing to do with sound-waves).

The fact of their existence has been staring me in the face for years.

raspsoundings

Those little red *S* symbols in the rasp forecast are not weather symbols for sunshine, but in fact the locations of half a dozen atmospheric “sounding” stations.

Until now I’d believed they were something involving a fancy radar beams shining up through the clouds, but it turns out it’s a freaking weather balloon with a humidity, temperature and gps sensors (they don’t bother with the barometer anymore and just use the gps altitude) that radio back data for an hour and a half till the latex balloon bursts at 25,000m and the device falls under a biodegradable parachute with a 95% of never being seen again.

The US government has a complete tour of the procedure, but the MetOffice has some automated stations which assemble and let off a new balloon every 12 hours from a robot building.
(more…)

Tuesday, May 30th, 2017 at 6:11 pm - - Flightlogger, Hang-glide

First, here’s a picture of me and my cheezy grin high up in wave over Wether Fell with about a dozen other gliders last Sunday

wavegrin

I was able to generate my incomplete Tephigram as before to illustrate the warm dry air encountered way up there.

tephi

Unfortunately, the fancy Python tephigram software released by the MetOffice doesn’t work for me as it’s designed to plot graphs that go ten times higher in the atmosphere.

Tephigram is short for “Temperature” and “Entropy/phi” plot and was invented in 1915. I don’t understand all of it yet. But this science goes back a long way.

(more…)

Thursday, May 18th, 2017 at 4:25 pm - - Flightlogger

We’ve had fun in the past updating the software on the Sonoff S20 mains adapter plug which has a relay switch and an ESP8266 with enough power to run MicroPython and connect to your WiFi, but I realized that we had to go further.

Not only is the software on these mains plugs inevitably out of date for your latest networked IOT needs, requiring you to immediately replace itin order to make it do clever things, but the microcontroller itself won’t be any good. What if you want to use a Raspberrypi, an Arduino or an ESP32?

iotcurrentcircuit

So I got Tom to design a cheap componentwise mains switch with four wires: Ground, 5V power (good for most microcontrollers), Switch-Pin (to throw the relay, which works with 3V), and Current Flow (an analog pin).

Don’t worry about the voltage, I said. We know what the voltage is, on a cycle between 0 and 240V which we can sample and add up.

Turns out it’s not quite so simple.

iotccomputer

The ACS712 current sensor reads 2.5V with zero current and goes towards 0V and 5V depending on the direction and magnitude of flow.

I tried it with the fan and the desk lamp.

iotfan

Fortunately we have an oscilloscope in the hackspace.

iotfanscope
At first I didn’t think it was working, but then it turned out that these devices don’t draw much current. You can see the shallow A/C signal.

You get a proper big sine wave when you plug in the kettle.

And then you get lots of spare hot water and brew yourself a cup of tea.

I found an electric drill on the proxxon mini mill

iotcdrill

And its trace involved these little humps in either direction.

iotdrillscope

It’s almost as if it’s only bothering to draw current when the mains power goes above 150V.

Here is the trace from the computer power supply and the LCD monitor.

iotccomputer

This seems to pick up current only when it goes below 20V on the return to zero part of the cycle, like it trims off just the tail of the A/C cycle and blocks the rest of the flow. I guess if it was in a 110V power supply it would take a bigger chunk of it.

So that shows I was completely wrong. We need to know the voltage, or at least have an interrupt pin the fires when it crosses the zero threshold, wherein we can recreate the cycle using a sine wave.

Annoyingly an ESP8266 has only one analog input pin, so we’d need an additional analog to digital converter, but the interrupt pin idea, or one that is up or down above a certain voltage would do the job at the minimum.

It does mean we can form an interesting signature of each of your devices.

Most electronic devices with switch mode transformers are going to have a fairly consistent pattern of chopping out the waveforms (I wonder what the consequences of this are on the grid), but something more complex like the washing machine will have heating, pumps and spin cycles which ought to be distinguishable.

We can put the whole thing into a single package with a modern ESP8266 microcontroller with its 4Mbs of flash memory to keep records in order to find out what’s going on. Smart meters should mean you don’t need to write anything down.

Just plug it in, say what it is, and it will build up a table of what it is. Even saying what things are is a pain, so put a disposable RFID onto your appliances and wave the smart socket at it before you plug it in. This product does all the thinking for you and builds up a dashboard of your energy consumption portfolio rather like your pension investment plan — except in this case the numbers are real and you can do something about them. It’s not some fictional investments that are going to be stripped from you at the next engineered crisis in order to cover up for the fact that the whole system is bankrupt.

I mean, goddamnit, why is it easier to find out the stock trading price of General Motors Series Z shares in Chicago than the total electricity use of my washing machine on a full cycle? What kind of a misplaced set of priorities do we have here. Let’s get this thing working.

Wednesday, May 10th, 2017 at 2:40 pm - - Flightlogger

My theory is that airspeed is related to kinetic energy. Like a person walking up and down a train, the airmass provides the reservoir of momentum and energy so that it all adds up.

The balance of kinetic energy when walking in a train has always bothered me. If the train is moving at a velocity v then your body’s kinetic energy is m*v^2/2 while seated in the train. If you walk in the towards the front of the train at walking speed w your kinetic energy will be m*(v+w)^2/2 and if you walk towards the back of the train your energy will be m*(v-w)^2/2. That means the difference in kinetic energy going forwards is m*v*w + m*w^2/2 and going back is -m*v*w + m*w^2/2.

The m*w^2/2 is your kinetic energy from walking on a stationary ground. But how do we account for the +-m*v*w?

Well, it turns out that if the train has mass M then, by the conservation of momentum, when you start walking up the train at velocity w the train must slow down by a factor of w*m/M where M is the mass of the train. This tiny tiny decrease in the train’s velocity releases kinetic energy of about w*m/M*M*v, which accounts for that factor. (I’m ignoring lower order terms that take account of the fact that your forward velocity is not actually v+w because you need to subtract off for the slightly slower train.)

Air is not the same as a train — an enormous solid object to which one can directly transmit kinetic energy and momentum — but we’ll treat it as such until I can think of it in a better way to handle it.

To illustrate the difference, here’s my top landing at Camlo Hill which transmitted a good deal of momentum via a dent in the ground.

dentcamlo

(more…)

Monday, May 8th, 2017 at 6:49 pm - - Flightlogger, Hang-glide

I’m getting tired of having “learning experiences” when I really want more “fun experiences”. But in the meantime, here goes.

On 2017-04-29 I was at the hang-gliding competition on Camlo hill in Wales, where I didn’t take any thermals over the back — like the folks who knew what they were doing — and I landed back on the top with nil points and little satisfaction.

For this learning experience, I downloaded the tracklog of one of the guys who did make it and snipped out the first 12kms of flight, like so:

darrentrack12

Direction of flight north is to the right (start of flight bottom left near (0,0)), the coordinates are in metres.

Having convinced myself I can extract the SRTM3 terrain, this is the graph of the flight altitude from the hill for those 12km against the terrain altitude:

darrentrackalt

Or you can plot the actual height above ground by subtracting the two:

darrentrackaltg

This looks like he was circling with a pretty consistent height of 350m as the air mass was carried up and down over the terrain, in a “bubble” of rising air.

Except there is no way this could be a bubble, because even if the bubble extended all the way to the ground 350m below, it would have certainly been been expended in less than 6 minutes at a rate of 1 metre per second to support an efficiently flying glider.

After 25 minutes of existence, we can rule out that it has anything to do with any packets of warmed air which may have risen from the ground 12kms to the south.

“Ah,” the usual response goes, “the glider was flying in a chain of thermic bubbles along the track of the flight, each one rising up just in time to pick up from where the last left off.”

This explanation is bogus. I don’t seem to pick up thermic bubbles that easily along my track, while the pilot that stayed with the thermal reported a continuously existing atmospheric formation which strengthened and subsided, but was always there.

I also don’t buy the idea that this structure is somehow kicking off thermic bubbles on the ground 350m below at least five minutes downwind of its track in time to reach his altitude.

No, this must be a self-contained, self-sustaining convection structure that may have been initiated by a thermic bubble, but which has clearly morphed into something altogether different.

(more…)