|
|
@ -62,29 +62,67 @@ followed by a colon are significant. All other lines are ignored, meaning that |
|
|
|
explanatory text can be freely mixed with the definitions. |
|
|
|
explanatory text can be freely mixed with the definitions. |
|
|
|
|
|
|
|
|
|
|
|
Each file may define more than one mixer; the allocation of mixers to actuators |
|
|
|
Each file may define more than one mixer; the allocation of mixers to actuators |
|
|
|
is specific to the device reading the mixer definition. |
|
|
|
is specific to the device reading the mixer definition, and the number of |
|
|
|
|
|
|
|
actuator outputs generated by a mixer is specific to the mixer. |
|
|
|
|
|
|
|
|
|
|
|
A mixer begins with a line of the form |
|
|
|
A mixer begins with a line of the form |
|
|
|
|
|
|
|
|
|
|
|
M: <scaler count> |
|
|
|
<tag>: <mixer arguments> |
|
|
|
|
|
|
|
|
|
|
|
If the scaler count is zero, the mixer is a placeholder and the device will not |
|
|
|
The tag selects the mixer type; 'M' for a simple summing mixer, 'R' for a |
|
|
|
allocate a mixer for this position. Otherwise, this line is followed by scaler |
|
|
|
multirotor mixer, etc. |
|
|
|
definitions matching the given count. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A scaler definition is a line of the form: |
|
|
|
Null Mixer |
|
|
|
|
|
|
|
.......... |
|
|
|
|
|
|
|
|
|
|
|
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit> |
|
|
|
A null mixer consumes no controls and generates a single actuator output whose |
|
|
|
|
|
|
|
value is always zero. Typically a null mixer is used as a placeholder in a |
|
|
|
|
|
|
|
collection of mixers in order to achieve a specific pattern of actuator outputs. |
|
|
|
|
|
|
|
|
|
|
|
The first scaler definition following the M: line configures the output scaler. |
|
|
|
The null mixer definition has the form: |
|
|
|
The <group> and <index> fields are ignored in this case. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For the remaining scalers, the <group> value identifies the control group from |
|
|
|
Z: |
|
|
|
which the scaler will read. Control group 0 is the vehicle attitude control |
|
|
|
|
|
|
|
group; other group numbers may be assigned for other purposes. The <index> value |
|
|
|
|
|
|
|
selects the control within the group that will be scaled. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The remaining fields on the line represent the scaler parameters as discussed |
|
|
|
Simple Mixer |
|
|
|
|
|
|
|
............ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A simple mixer combines zero or more control inputs into a single actuator |
|
|
|
|
|
|
|
output. Inputs are scaled, and the mixing function sums the result before |
|
|
|
|
|
|
|
applying an output scaler. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A simple mixer definition begins with: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
M: <control count> |
|
|
|
|
|
|
|
O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If <control count> is zero, the sum is effectively zero and the mixer will |
|
|
|
|
|
|
|
output a fixed value that is <offset> constrained by <lower limit> and <upper |
|
|
|
|
|
|
|
limit>. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The second line defines the output scaler with scaler parameters as discussed |
|
|
|
above. Whilst the calculations are performed as floating-point operations, the |
|
|
|
above. Whilst the calculations are performed as floating-point operations, the |
|
|
|
values stored in the definition file are scaled by a factor of 10000; i.e. an |
|
|
|
values stored in the definition file are scaled by a factor of 10000; i.e. an |
|
|
|
offset of -0.5 is encoded as -5000. |
|
|
|
offset of -0.5 is encoded as -5000. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The definition continues with <control count> entries describing the control |
|
|
|
|
|
|
|
inputs and their scaling, in the form: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The <group> value identifies the control group from which the scaler will read, |
|
|
|
|
|
|
|
and the <index> value an offset within that group. These values are specific to |
|
|
|
|
|
|
|
the device reading the mixer definition. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When used to mix vehicle controls, mixer group zero is the vehicle attitude |
|
|
|
|
|
|
|
control group, and index values zero through three are normally roll, pitch, |
|
|
|
|
|
|
|
yaw and thrust respectively. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The remaining fields on the line configure the control scaler with parameters as |
|
|
|
|
|
|
|
discussed above. Whilst the calculations are performed as floating-point |
|
|
|
|
|
|
|
operations, the values stored in the definition file are scaled by a factor of |
|
|
|
|
|
|
|
10000; i.e. an offset of -0.5 is encoded as -5000. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Multirotor Mixer |
|
|
|
|
|
|
|
................ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The multirotor mixer is not yet defined. |
|
|
|