Quatos Airframe Geometry
Mass Distribution
Quatos requires knowledge of the aircraft mass distribution and motor placement. Once you have all your masses, and their placement measured from the center of the body, QuatosTool will generate all the parameters you need.
Start by weighing all of the major airframe components. Motors, mounts, arms, body, landing gears, gimbals, flight controllers and similar. Basically you need to know mass of every major component. For bigger components such as gimbals, body, batteries and other peripherals, you also need measure their size. Make notes.
Download the Ladybird XML file. The file describes the mass distribution for the LadyBird reference build as shown below:
Open the file in a text editor.
The first commented part of the XML file tells you that distances are in meters and mass is in grams.
Section: Config
The first lines begins the quatos configuration by defining the name of the config and telling the Quatos tool that the frame geometry is a Quadrocopter in X-orientation. Craft id can be anything it is just for your reference.
<quatos_configuration>
<craft id="M4LadyBirdQuad_X" config="quad_x">
Possible frame configurations are:
quad_plus
quad_x
hex_plus
hex_x
octo_plus
octo_x
custom
Section: Motor Ports and Rotation
Then motor ports and rotations are defined as follows: +1 implies CW motor. -1 implies CCW motor
<ports>
<port rotation="+1">1</port>
<port rotation="-1">2</port>
<port rotation="+1">3</port>
<port rotation="-1">4</port>
</ports>
This defines the motor order and direction of motors. It starts from motor A (forward left, clockwise) and then follows the clock just like in the normal mixer table:
Section: Distance and Mass for Motors, Arms and ESCs
Distance:
The next lines defines the distances for motors and other items mounted on the arms. This is expressed in meters from center of body. Since the motor layout is already defined in the setup line (quad_x), we only have to state the distance from body center to the part.
<distance>
<motor>0.061</motor> - 61mm from center <esc>0.061</esc> - ESC is under the arm. For M4 it would be 0 as Esc is part of the controller
</distance>
Mass:
Then we come to arm, motor and ESC mass (weight in grams):
<mass>
<motor>5.0</motor> - Combined Mass of motor + mount + prop
<arm>0.2</arm> - Mass of arm and wiring
<esc>0.0</esc> - ESC is included in the main body mass, so the ESC mass is set at 0
Cube and Point Masses for Major Components
For single components (such as batteries, cameras, gimbals, control stacks and similar) we can define cubes or point mass. These cubes are defined by dimension, offset and mass coordinates. A point mass is a cube with zero volume (dimX/Y/Z is 0)
The following rules apply:
- Distances are in meters, masses are in grams
- All size and position coordinates consists of X (along roll axis), Y (along pitch axis) and Z (along yaw axis) coordinates.
- Forward, Right and Down coordinates are positive. Backwards, left and up coordinates are negative.
- Position coordinates are measured from center of the body to the center of the cube or point mass
Each of these cube/point masses is expressed on a single line as a dimension (dim) and Position (offset) and mass (in grams), using the following syntax:
<cube name="Body" dimx="0" dimy="0" dimz="0" offsetx="0" offsety="0" offsetz="0">Mass in grams</cube>
Remember that dimension and offset is in meters and mass is in grams. Point of origin is the frame center.
Body:
So for the Ladybird body, we have a cube with dimensions 30*30*15mm that sits in the exact geometrical center of the frame (0,0,0) and has a mass of 4 grams. That is written like this:
<cube name="Body" dimx="0.030" dimy="0.030" dimz="0.010" offsetx="0" offsety="0" offsetz="0">4.0</cube>
M4 main controller:
Then we have the M4 – dimension of 36*36*1.6mm. The M4 is mounted 10mm above the center and has a mass of 6 grams. So that is expressed like this:
<cube name="M4" dimx="0.036" dimy="0.036" dimz="0.0016" offsetx="0" offsety="0" offsetz="-0.01">6.0</cube>
Lipo
And the Lipo battery, 36*20*10 mm. This is mounted 15 mm down from center and has a mass of 10 grams:
<cube name="LIPO" dimx="0.036" dimy="0.020" dimz="0.01" offsetx="0" offsety="0" offsetz="0.015">10.0</cube>
Camera (optional)
For the camera, we have a size of 25*10*10mm. It is mounted 18mm forward and 8 mm down from the center of the craft. Mass of 2.6 grams:
<cube name="FPV cam" dimx="0.025" dimy="0.01" dimz="0.01" offsetx="0.018" offsety="0" offsetz="0.008">2.6</cube>
To end the XML properly we add
</mass>
</craft>
</quatos_configuration>
In case you need to add more stuff like cams, gimbals and other payloads, these can be broken down into cubes by duplicating the cube lines and editing the dimension, distance and mass coordinates.
When you are done editing, save the XML file under a new name.
Using QuatosTool to generate parameters
We now have a file that defines the masses and distances for the Ladybird frame in X configuration. Next step is using this file to generate moment of inertia and motor thrust distribution parameters using the Quatos tool. You could use either the online quatosTool found on the drone-controls site or use the offline one. We recommend the online version of quatosTool for those uncomfortable with a command line interface.
As of QGroundControl AQ v1.6, you can import your xml file directly into the Motor Mixing Configuration. This runs the included quatosTool in the background, shows you the output, and loads it into the displayed mixing table. Be sure to select the “Quatos” checkbox first.
Instructions for using command-line quatosTool are given below
- Start by downloading the Quatos tool from the utilities section of the Autoquad FTP.
- Extract the folder on your desktop. Copy the XML file generated in the previous step into to the same folder
- The Quatos tool is run off a command line – below example is shown under windows:
- Press windows start button and type “run”, this will bring up a run command prompt
- Type “CMD”, this will bring up a windows command prompt.
- Maximize the command prompt window.
- Type cd desktop/quatostool to get to the quatostool directory
- Now type quatostool input.xml > output.txt (Where input.xml is the file you created after measuring masses and lengths and output.txt will contain most of the Quatos parameters that you need to upload
.
A great tool for visualization of the copter geometry and masses is the XML-to_WRML tool by Fred:
Get more info and the download in this forum thread.