BFF CL Software - Short User Guide


Previous    Contents     Next

7. Important Notes on Trim

The trim system in flight sims tends to be a bit peculiar to the needs of control with a spring centred joystick. These sticks have only one position in which there is zero net force ie in the middle where their centering springs put them. In order to trim the controls so that the aircraft will fly straight and level with the joystick always in this position it is necessary for the flight sim to, in effect, adjust the flight control surface position (but not the stick position) when the trim is adjusted. So for example adjusting the pitch trim with the joystick stationary at its zero force position will cause the aircraft pitch angle to change.

The BFF CL system uses its own trim potentiometers (or trim buttons) and these in the default settings are entirely separate from the flight sim's trim system. In the BFF CL system adjusting the pitch trim when the elevator control axis is held at a constant position results in a variation of the force level on the elevator control not in a change in pitch attitude of the aircraft (which remains under the control of the elevator position). This allows the flight controls to be trimmed to a force balanced state at any position and to ensure the pitch attitude is controlled solely by the elevator control axis position.

In this scheme the flight sim's trim controls should NOT be used, because doing so effectively adjusts the aerodynamic zero position of the plane's flight control surfaces away from the zero position of the FFB flight controls. Not using the flight sim's trim system should not be a problem as there is usually no need to do so during manual flight when you have external trim pots or buttons connected to the CL system. However a problem does arise in that the sim's Auto Pilot implementation is likely to use the pitch trim when controlling altitude / climb rate and when the AP is disengaged the trim is left at a non-zero position and the control surface / flight control zero positions will be left out of sync.

To overcome this the CL software monitors for AP disengage events and when it detects one it automatically returns the flight sim pitch trim to zero.

NOTE The CL system trim is reflective of trim systems in GA aircraft with reversible controls.

Most settings for the trim input method are made in the Pry_S.cfg file in the CL Software folder. The settings can be adjusted using the BFF_CL_Setup application, or the file can be opened with a text editor (eg NotePad) and parameters changed as required.

Lines 27, 28 & 29 set the axis letter on the pilot's joystick used for elevator, aileron and rudder trim potentiometer inputs in that order (usually R, U and V).

Line 43 allows a different joystick number to be specified for trim potentiometer input if the pilot's joystick is not to be used. In this case axes X, Y, and Z could also be used on this joystick.

Line 41 allows a joystick number to be specified for trim button inputs as an alternative to potentiometer inputs; and lines 42 to 53 specify the trim button numbers on that joystick.

Lines 55, 56 and 57 allow input method overrides to be set independently for each trim axis. This allows a mixture of potentiometer and button inputs to be used for the trim inputs. Eg Elevator can be set to use the button settings, whilst the aileron can be set to use potentiometer inputs.


7.1 Trim Indicator Output Options

A number of options for driving trim indicators have been provided. These are set in the Pry_S.cfg file - use the Setup Application Bck_Grnd_Settings button.

Lines 58 to 61 provide settings for the Pololu Servo Card serial output which can be used to drive trim indicators. RC Servos on channels 1, 2 and 3 of the Pololu card will show the trim positions for elevator, aileron and rudder axes respectively. Line 58 sets the update frequency to the servo card in number of background process loops (1 for each loop, 3 for every 3rd loop etc), line 59 sets the COM port, line 60 sets the baud rate and line 61 sets a scaler which can be used to adjust the servo arm movement (1.0 for full scale, 0.5 for half scale etc, giving a -ve value will invert the servo movement).

To use the more recent Pololu Maestro range of servo cards give the line 58 setting a -ve value (-3, -5 etc). This will output the CL trim positions in Pololu simple 8bit format (V1.07 & V1.15 background) to servo channels 1, 2 & 3 to be read by a single Maestro card on the specified COM port. For Maestro controllers it is the "Command" COM port for card that should be set in line 59.

The 8bit format allows different mid-position and working range settings for a servo to be made using the Pololu Maestro Control Center software - see its Channel Settings tab.


Special Elevator Trim Indicators

Lines 70, 71 & 72 provide an alternative elevator trim indicator servo position range mapping to those provided by the the Maestro card.

Three mapping points A, B and C set in lines 70 to 72 can be used to configure the operating range of the RC servo which drives the elevator trim position indicator (if it is active). Point B adjustment allows an asymmetrical mid point to be defined.

The effect is to alter the apparent indicated trim position to better suit individual trim indicator hardware.

The respective default pulse lengths for the mapping points A, B & C are 1000, 1500 & 2000 uS. These will map the normal full working range on most RC servos to the CL system's internal elevator trim position range. The defaults will show the mid or neutral trim position (ie the elevator trim tab position at which zero elevator hinge moment adjustment is applied) at half way on the servo's movement range.

Please note this mapping adjusts the indicator servo's position only - it has NO effect on the CL system's internal trim position register used to calculate trim related force adjustments. The elevator trim position register is tied to the associated game-controller joystick axis position, or to the trim button activity when button input is active.

Mapping point A is the RC servo pulse length which maps to the CL system's elevator trim MINIMUM position.

Default is 1000us (1.0ms). MUST be a value between 1000 and 2000 us.

Mapping point B is the RC servo pulse length which maps to the CL system's elevator trim NEUTRAL position.

Default is 1500us (1.5ms). MUST be a value between mapping point A and point C.

Mapping point C is the RC servo pulse length which maps to the CL system's elevator trim MAXIMUM position.

Default is 2000us (2.0ms). MUST be a value between 1000 and 2000 us.

Example: Setting mapping points A, B & C to 1400, 1500, 2000 respectively will cause the indicator servo to go to the 1.4ms position at minimum trim, to 1.5ms position at neutral trim and 2.0ms position at maximum trim. This sets a non symmetrical indicator range with neutral showing at about 1/6th full range movement.

The Pololu software is useful here for identifying the servo pulse lengths associated with desired positions on the external indicator hardware. See its Status tab.


Special Elevator Trim FSUIPC Offsets

The CL software can be instructed to write its trim positions to custom FSUIPC offsets. Parameters Use_FSTrim and Cust_TLoc in the [Setup] section of the aircraft .cfg file are relevant.

The trim positions are written in the same format as the standard FS trim positions (see offset 0BC0) - ie 2byte values in the range -16383 to +16383.

To enable the data write set Use_FSTrim=-1

To specify the custom FSUIPC offset at which the 6 byte data write starts set parameter Cust_TLoc(=0x66FA).


Offset 0x66FA is the default and sets the write to the last 6 bytes of the available offsets assigned by Pete Dowson for user applications. If you are already using these custom offsets then you can change the target offset by changing the Cust_TLoc parameter. Note: 6 consecutive free bytes are required to store the 3 x 2byte values for elevator, aileron and rudder trim positions. It is generally NOT a good idea to write to offsets already assigned to other FS parameters....


The values are updated approximately every 5 sim frames.


The values can be used to drive external trim indictor hardware by reading them using the usual FSUIPC API and processing as required.


NOTE: writing the CL trim positions to CUSTOM FSUIPC offsets has NO effect on the FS internal trim settings.


7.2 Other Trim Options

In the CL software's default configuration it is CL trim that is active and the flight simulator internal trim should be disabled. On its startup the CL software automatically sets the FS trims to zero by default, and also on FS AP disengage events.

Parameter APF_Trim_Zero in the [AP_Gains] section of the aircraft .cfg file allows the FSX internal elevator trim to be set and held at a position other than zero when the CL software is active. The value is in the FSUIPC offset 0BC0 data range ie +/- 16383 where 0 is mid. It's default value is zero.

Setting a non zero value can produce a fixed shift to the position of the elevator controls. Some experimentation may be required.


Parameter Use_FSTrim in the [Setup] section of the aircraft config file can be used to disable the CL trim system and return trim control to the FS internal trim system.

Set Use_FSTrim=2 to do this. This will produce a different trim feel response in the controls however. When FS trim is active trim is achieved by applying trim input and moving the control axis position too the zero force position at mid-stroke. When CL trim is active trim is achieved by applying trim input which moves the zero force position too the control axis position. These two behaviours will feel quite different.


Elevator auto-trim direction indicator

In the v1.07 release an elevator auto-trim direction indicator output has been added.

It is activated and controlled using the Line 69: Trim direction indicator dead band setting in the background process settings (Pry_S.cfg file). The setting is the elevator force dead band amplitude above which the auto trim direction indicator outputs signal that a trim adjustment is required.

This feature is used to allow the CL elevator control to be kept closer to correct force balance condition whilst AP following is active so that the AP disconnect procedure is smoother in some circumstances.

For systems using elevator trim POTENTIOMETER input..... The auto trim direction indicator is available on Pololu maestro servo channels 4 & 5 when they are set as digital outputs (use the Pololu software). High output on a pin indicates the direction in which an auto-trim system should move the trim pot in order to keep the ELEVATOR net force calculation at near zero whilst AP following is active. Active when maestro servo output is active and AP following is active.

For systems using elevator trim BUTTON input..... In this case the CL software uses the trim direction indicators internally and automatically adjusts the elevator trim setting whilst AP following is active. When this is active you should see the elevator trim position indicator in the Show_Conts window move automatically whilst AP following.

=0 is default - this disables the feature

>0 makes the feature active, and sets the dead band for the indicator to the set value. The dead band amplitude should be set around 10 or 20 (full force is 255). Some experimentation may be needed.

NOTE this feature requires additional external hardware for systems using potentiometer trim input.



Previous    Contents     Next

Copyright © 2011-12 BFF Design Ltd All Rights Reserved.