In my last post I showed that Blackbox’s logging behaviour when writing to an onboard flash chip ends up adding a lot of variance to the looptime. This was because 3/4 of the time, Blackbox would just write its log entry to a write buffer in memory, which was very fast, but the remaining 1/4 of the time it would have to flush that buffer through to the flash chip itself, which was very slow. The difference in speed between these iterations causes a variance in the looptime which is undesirable for stable flight. This caused the distribution of overhead due to Blackbox logging to have a twin-peaked shape like this:
One way of solving this problem is to use the CPU’s DMA controller to send the write buffer out to the flash in the background. This way the buffer can be slowly written to the flash chip all the time while other tasks are executing, instead of the whole CPU pausing to make one big slow write every now and then. That’s still something I want to implement in the future, but in the meantime I looked into other ways to reduce the variance.
Continue reading Improving variance in Blackbox flash logging overhead
If you want the absolute fastest looptime possible on Cleanflight, you need to be aware of the additional execution time cost that various features add on.
One great feature for tuning your craft’s performance is the Blackbox flight log. However, the choice between logging to an OpenLog device or to an onboard flash chip brings with it quite different performance impacts, and you may need to factor this in when you’re choosing your logging device.
Continue reading Measuring Blackbox logging overhead and looptime variation
Ever since I received my Libelle, I’ve only been flying discus-launch on flat land in calm wind, but last night I saw the forecast for today was for a nice 10km/hr westerly wind and clear sunny skies. I had a hunt around on Google maps and finally found a west-facing slope. It’s a big hillside with a series of switchbacks and jumps carved into it as part of a downhill BMX race course, in Dunedin, New Zealand.
And indeed, when I got there a 10-20km/hr wind was blowing almost directly up the slope to me. I gave the Libelle a lazy javelin toss and wow! It zoomed straight up into the air. Suddenly, compared to flat-land, I had almost infinite power available. I even managed an aileron roll, although it seemed to hesitate forever at the halfway point. I quickly learned the importance of always making your turn into the wind instead of back towards the slope, as it wipes off a ton of airspeed/altitude if you do it the wrong way. Luckily not enough to make me crash.
Eventually I managed to lose enough altitude that I had to land it, about halfway down the slope. Unfortunately the slope is lined with 2 metre tall toetoe bushes, so visibility was extremely limited and I couldn’t see the landing spot. I had to hunt through gorse bushes in order to find it again. Once I got within 10 metres of it I was able to waggle the ailerons and immediately hear the servos whirring further down the bank. Nice gentle landing in grass:
I gave the control surfaces a quick check and then it was back in the air!
Unfortunately, 15 minutes after that first sunny photo was taken, a dark raincloud started rolling up the valley and it started to rain on me. I was going to brave it out, but my lift started dropping. I couldn’t manage to land it somewhere nice where I could guarantee I wasn’t going to get gouged by gorse again, so I decided to land it on that playing field you can see way the heck at the bottom of the hillside. (maybe 125m vertical).
Wow, depth perception is difficult at that distance! I set flaperons for landing, and I was like “Okayyyy…. touchdown! No? Tttt…….ouchdown! No?? What?”. Finally I made a perfect landing (pretty much by chance). It’s the tiny white speck you can see on the field through the rain:
Unfortunately the field turned out to be composed of 95% moss, it was basically a sodden swamp. My shoes have seen better days. Can’t wait to go back!
So, I previously wrecked my Libelle pretty hard, tearing both the wings and the nose cone in half. I’ve now repaired both of those using Gorilla Glue, which worked excellently. The glue foams up, so there is still some excess here and there that I haven’t sanded off yet.
I’m happy to say that it’s now back in the air!
I’ve been flying it until the battery runs flat for the past three days, and having a blast. My discus technique is slowly improving, though I’m still doing poorly compared to those I see on YouTube. I might take a video one day and get your guys’ suggestions. I haven’t found a thermal at my flying field yet, I might start hunting further abroad.
I’m now running proper flaperon mixes on my Taranis to give me Thermal and Landing modes according to the deflections specified in the excellent included manual, so my landings can now be much more gentle.
I noticed that since I re-glued the wings, their angle is offset compared to the tailplane, which obviously is not a good thing. One of the plastic mounts snapped in half when the wing did, so there’s not as much holding them in alignment any more. For the moment, I’m just going with the flow and flying counter-clockwise circuits to match the craft’s bias.
I managed to lose the carbon fibre launch peg, so I replaced it with a section of cheap paintbrush handle, which happened to be tapered so I could find a precise fit from halfway down the brush :).