Monday, 25 February 2019

Crow-aware adaptive elevator trim

If you fly F3X sailplanes, you'll know that crow brakes are an essential feature. They allow you to control rate of descent independently of the pitch control. Crow brakes are used primarily (a) to control the landing approach, or (b) to lose height quickly, without tearing the wings off!

Crow brakes do however need careful setting up, as they generate an upward pitching effect. The standard method of combating this is to mix in some down-elevator as crow is deployed - also known as 'crow compensation'. With a decent radio, it should be possible to adjust the maximum compensation while flying the model.

Full crow!

That's not the whole story, though, because the pitching effect is non-linear. To correct for this, it's also necessary to specify a mixer curve. But therein lies a problem: in order to make adjustments to a curve, you need to land the model each time.

Compensation curve on author's Stribog (manually adjusted)

Wouldn't it be nice if we could optimise both the compensation rate and curve whilst flying the model? Even better, what if it could all be adjusted automatically? Well, thanks to OpenTx and Lua, it can! The secret is to think of compensation as just another trim adjustment...

A better mousetrap

With the crow-aware adaptive trim, there's no need to worry about the compensations rate or curve. Instead, you trim out any pitch deviations in the normal way, using the elevator trimmer. By adjusting the trim at 4 or 5 crow settings, the curve can be optimised in a single flight. Behind the scenes the trim lever completely is repurposed. Instead of applying an offset, it bends the compensation curve.

The heart of the system is a Lua script. It runs in the background, doing little except wait for an up/down trim click. When a click is detected, it reads the crow value, identifies the nearest point(s) on the curve, and adjusts the compensation curve up or down. The Curves menu reflects these changes in real time. In addition the script generates a custom view which shows the curve, the crow value, and the active curve points:

Telemetry screen (X9D, X9D+, X9E). Vertical bar is crow value.

OpenTx Widget (X10, X12S)


First tests took place at Ivinghoe Beacon in a 40 mph wind. I used my Stribog and a modified version of my F3F template running on my X9D Plus.

Before the flight I initialised all points on the trim curve to zero. During the flight, I adjusted the pitch trim at various crow settings. The trimming process was completed successfully, and I was able to land the model normally despite the high wind.

Below is a video showing (a) a bench demo on my X9D+ and (b) the results from the test flight.

Download the script

The Lua script and a demo .OTX file can be downloaded here. At the time of writing, the script supports the X9D, X9D+, X9E, X10 and X12S. The demo template is a minimal setup with just crow and elevator controls.

The script contains notes for integrating the system into existing setups. The only critical requirement is a spare GVAR (to store the trim lever state). Please note that you'll need a good working knowledge of OpenTx in order to modify your setups.


My thanks to Lothar Thole for porting the original script to the X10 and X12S. Also to MiamiMike, L Shems, and hisroyaldudeness on RC Groups for their invaluable input. 

No comments: