# Supertrim

Mike Shellim 23 July 2022
Last updated 09 August 2023

Supertrim provides a smarter, easier way of adjusting crow compensation. While not as flexible as my Crow aware adaptive trim, it does not require a Lua script.

## Background

To understand why Supertrim was conceived, consider the behaviour of pitch trim as crow brakes are applied. We can consider pitch trim as consisting of two components:

• 'Base' trim, that is: the trim with crow off. This is a fixed offset, and is adjusted with the elevator trimmer in the usual way.
• 'Compensation'. This counteracts the trim change caused by the deployment of crow brakes. It's implemented as a crow>elevator mix. The output starts from zero (crow off) increasing to some maximum as crow is applied. Traditionally, the rate of compensation is hard coded, or adjusted using a spare control.

The total trim is the sum of the two components.

## The Problem

Base trim and crow compensations are both about pitch trim, yet each has a different means of adjustment. Needless to say, this is confusing when you're just trying to trim the model!

## The solution: Supertrim

Supertrim allows both the base trim and the compensation to be adjusted using just the elevator trim. So:

• Brakes off: elevator trim adjusts base trim
• Brakes deployed: elevator trim adjusts compensation

This makes the process of trimming really easy. Brakes off, trim, apply brakes, trim. Done!

## How it's done

Supertrim relies on a cool feature of OpenTX: a trim can be repurposed to alternate between updating its native value, or updating a GVAR. This is accomplished via the AdjustGV special function with source={trim}. For Supertrim, we use the elevator trim.

While the special function is active, the native trim is held at its last value.

Special Functions

For Supertrim, the GVAR supplies the weight of the compensation mix. Here is the full code:

GVARS

GV1 - min=0%, max=40% -- supplies compensation value

CH2:elevator

+= Source=I2:Ele Weight=-100% -- elevator input + base trim
+= Source=Thr Weight=+GV1 Offset=−GV1 -- compensation

Logical Switches

L1 Thr < 100 -- true when brakes deployed

Special Functions

The details :

• L1 detects if crow is active (throttle stick below upper end-stop)
• GV1 stores the compensation value. The range is defined by Min and Max (these are set in the GVARs menu). Suggested range is 0% to 40%.
• SF1 controls the target of the trim lever.
• When crow deployed (L1=True), SF1 is enabled: the trim lever acts on GV1, and the base trim is held at its last value.
• When crow idle (L1=False), SF1 is disabled: the trim lever updates the base trim, and 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

When trimming with brakes on, the brakes should be at 75 - 100%, in other words near maximum compensation.

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 is ideal for setups with multiple flight modes, of which one is a dedicated 'crow' mode.

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.

## Demo file

A demo can be dowloaded here (X9D profile). 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.

## Integration in Pro 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.