Supertrim
Supertrim provides an easier way of adjusting crow compensation. While not as flexible as my Crow aware adaptive trim, it does not require a Lua script.
Background
Crow brakes generate a nose-up pitching moment which affects the model's trim. A common way to counteract this is via a crow-to-elevator mix, commonly called crow compensation. The strength of the mix is normally adjusted using a second trim.
However using two different trims to adjust pitch is confusing, and in any case not all radios have spare trims. Wouldn't it be nice if both the base trim and compensation mix could be adjusted with just one trim - the standard elevator trim!
For this to work, the trimmer would need to be repurposed dynamically. Enter 'Supertrim' ...
Supertrim
Supertrim is a bit of code which allows the elevator trim to be repurposed dynamically.
- Brakes off: elevator trim adjusts base trim
- Brakes deployed: elevator trim adjusts compensation
This simplifies the trimming procedure:
- Brakes off, adjust trim.
- Brakes on, adjust trim.
- Done!
How it's done
The magic of AdjustGV
Supertrim uses a feature of OpenTX whereby a trim can be repurposed dynamically to update a GVAR. This is accomplished via a special function with Action= AdjustGV and Source= Ele trim.
Now here's the neat thing: while the special function is active, the native trim is held at its last value. By assigning a switch to the special function, OpenTX can alternate between updating the GV and the native trim.
Special Functions
SF1: Switch=??, Action=adjust GV1, Source=TrmE -- trim updates GV1
The full solution
Here's the full code for Supertrim:
Logical Switches
L1: Thr < 100 -- true when brakes deployed
GVARS
GV1: min=0%, max=40% -- supplies compensation value
Special Functions
SF1 switch=L1, Adjust GV1, Source=TrmE -- trim updates GV1
CH2:elevator
Src=I2:Ele, Weight=−100% -- elevator input + base trim
Src=Thr, wt=+GV1 Offset=−GV1 -- compensation
How it works :
- L1 detects if crow is active
- GV1 stores the compensation value. The range is defined by Min and Max (set in the GVARs menu). Suggested range 0% to 40%.
- SF1 controls the adjustment target
- When crow deployed (L1=True), SF1 is enabled: trim updates GV1. Native trim is held at its last value.
- When crow idle (L1=False), SF1 is disabled: trim updates native trim. GV1 (compensation) is held at its last value.
- CH2 is the elevator channel. It has two mixes:
- 1st line: elevator input with base trim
- 2nd line: crow compensation. The range is twice that of GV1, that is 0 - 80%
During flight tests, the brakes should be fully deployed before adjusting the compensation.
Adding a compensation curve
The amount of compensation is normally non-linear with respect to crow, so a curve will usually be included in the compensation mix. Nothing special here.
Use with flight modes
The code above assumes a single flight mode. However, the technique can also be used with multiple flight modes. The base trim in crow mode will be shared from another flight mode, normally 'cruise'. Sharing of trim settings between flight modes is configured in the Flight Modes menu. For more info see Advanced trims.
Integration in RC-Soar templates
At the time of writing, Supertrim is integrated in the latest DLG, DLG6S and F3F templates. The plan is to include it future versions of the remaining templates, where applicable.
Download
Demo model file
Requirements
- OpenTx 2.3 or above
- EdgeTX
Files
If using the Companion sim, note that dragging the trim handle doesn't work when adjusting compensation. Instead, click on the arrowheads at each end of the trim sliders.
Links
For more info, see Advanced trims, in particular the section "Using a trim to update a GVAR".