# Can we change mixing rate in flight by manual input?

We have a plane with poor pitch control in low speed ,so we want to mix roll and pitch control to our aileron when landing and just use aileron for roll control in flight. we want to change the mix rate just by a switch on my transmitter .
But I notice that the mixer file is static and may can’t change during flight after initiate.We don’t know how to do it know.

Hi, instead of a hard switch approach, you could benefit from using “Daisy chain control allocation”:

From https://apps.dtic.mil/dtic/tr/fulltext/u2/a461485.pdf (chapter III D, page 4)
The daisy chain assumes a hierarchy of control effectors.In this method, when one control or a group of controls saturates, there is an error between the commanded moments or accelerations and those produced by the control effectors.
The daisy chain method would then utilize another control to produce the required moments or accelerations that are lacking due to the saturation of a control effector. Figure 2shows an example of daisy chain allocation. In this example,the goal is to produce a desired pitch acceleration, given by ̇qdes. There are three controls that can produce pitching moment, an elevator (δe), a body flap (δbf), and a canard (δc). The daisy chain procedure works as follows: the primary control effector,δein this case, is commanded to produce the desired acceleration. If the elevator can produce this acceleration, then nothing else happens and the body flap and canard are not utilized.
However, if there is a moment deficiency between the acceleration that the elevator produces and the desired acceleration, the control effector, which is second in line, namely the body flap, is commanded to produce an acceleration equivalent to the acceleration deficiency. If the body flap can produce the required acceleration, then the canard does nothing.
However, if the body flap cannot produce the required acceleration, then the canard is commanded to produce the difference between the commanded acceleration and the accelerations produced by the elevator and body flap.This method is valid for any number of control effectors.

In you case, you can say that (for example) 90% of the pitch actuation should deflect 100% of the elevator and that the 10 remaining % should go to the ailerons. This means that during normal flight, the ailerons will not be used for pitch because you have enough authority and the controller should not need more than 90% of the total range. During slow flights, the controller will need more that 90% and this will automatically actuate the ailerons for pitch.

Translated to a PX4 simple mixer, this could look like that:
Elevator output :

``````M: 1
S: 0 2  11111  11111      0 -10000  10000   # (90%*1.1111 =~ 100%)
``````

Aileron output:

``````M: 3
S: 0 0  10000  10000  0    -10000  10000 # rolll
S: 0 1  0      10000 -9000  0      10000 # pitch * 1.0 - 0.9 (constrained between 0 and 1, the output is 0 when pitch is < 90%)
S: 0 1  10000  0      9000  0      10000 # same as above but for negative pitch
``````