I should disclaim all of this by saying that I am very much a beginner at multirotors, flight controllers, and MultiWii specifically. But I have a strong background in programming, computers, electronics hobby-ing, and so forth. So I think I may be qualified to take the somewhat-inscrutable instructions found on the Internet and translate them into a form that others can use.

Everything in this thread is based on this post. http://polakiumengineering.org/custom-multiwii-motor-mixes/

To make a motor mix, the first thing you do is map out the X/Y coordinates of your motors on a Cartesian plane, with the copter's CG at the origin (0,0) point. The simplest way to do this is to measure the distance between your front motors and divide it by two. Do the same for your back motors. You now have the X coordinates for the motors.

One way to find the Y coordinate is to measure the distance from the CG and the motor, treat that as the hypotenuse of a triangle, and use that combined with the previously-measured X coordinate to solve for the remaining side via the Pythagorean Theorem. This involves square roots and math, which many don't like. Another way is to set the craft face-first on a table and measure from the table, straight up the center-line to the CG. This wouldn't work with all motor configurations, but it will work with any X-quad configuration, including a spider quad.

Now that you have the X/Y coordinates of each of the motors, assign positive and negative signs as appropriate. Front-left motor is -X/+Y. Front-right motor is +X/+Y. Back-left motor is -X/-Y. Back-right motor is +X/-Y. This is just high school geometry. Finally, you need to scale the measurements down to a zero-to-one scale so that the largest measurement is 1 and the other measurements are proportional to that. The easiest way to do this is to divide each measurement by the largest measurement. Incidentally, an implication of this is that it doesn't matter at all what units you have measured the distances in, since the units will cancel out in this step.

Now that you have your scaled coordinates, you are 2/3 of the way there. Next, you need your yaw coordinates. For the yaw coordinates, the first thing to know is that the sign will determine which direction the FC believes the motor is spinning. CW motors get a negative sign. CCW motors get a positive sign. The magnitude of the yaw parameter should be equal to the (scaled) X parameter. I don't know the details of why this is, but this causes the quad to yaw around its CG instead of some other point in front of or behind the CG.

Now that you have all three parameters for all four motors, you put that all together in the correct syntax for MultiWii, which is:

Code:

`motor[n] = PIDMIX(-X,-Y,YAW_PARAMETER);`

0 = rear right

1 = front right

2 = rear left

3 = front left

Note that the X and Y parameters each have a negative sign in front of them, which means you invert the sign of the coordinates. For the yaw paramter, the sign is determined by the direction of the motor, and the magnitude is equal to the absolute value of the X parameter.

Now that I have explained it all, here is a spreadsheet I made that does all the work for you.

... and here is a link to the spreadsheet itself.

**PLEASE NOTE: I have not tested these parameters yet, so use them at your own risk. Your quad's measurements and CG are probably different from mine, so take the time to measure and plug them into the spreadsheet. Also, I don't promise that I haven't made a mistake in the spreadsheet's syntax that produces incorrect results.**