Using the Command Line Interface to Configure Copter¶
Warning
The CLI is being phased out on all platforms. The features were massively cut down with AC3.1.5 and then it was removed for the APM2 completely anyway with AC3.2. All CLI functions are now available via regular MAVLink commands in the GCSs. This article has been moved to the dev wiki and may be considered deprecated.
You don’t need to use the Mission Planner to set up Copter (and there are some advanced configuration options not covered by the Mission Planner). You can also use APM’s built-in Command Line Interpreter (CLI) over a serial terminal, which will work on any computer and operating system. It is only available via the USB cable; it cannot be used via a Xbee/3DR wireless connection.
You will also need to use the CLI for such functions as assigning your preferred flight modes to your RC transmitter’s toggle switches. See the menu descriptions below for instructions.
You can enter the CLI by hitting “Enter” three times in the Mission Planner Terminal screen.
When you open it, it will look like this (with a more recent version number of the software displayed):
If you’re not using Windows, you can also use the Serial Monitor built into Arduino (remember to select the right baud rate and enable CRs as shown here):
Once you are in the CLI, you can type “help” at any menu and get a full list of available commands.
There are three top-level menus: Setup, Test and Logs.
Each has sub-menus, whose command can also be seen by typing “help” when you are in that section.
Reading and analyzing logs with the Mission Planner¶
The easiest way to download and analyze your log files is with the Mission Planner, which will allow you to graph data, generate KML files for Google Earth and otherwise manage the data flexibly.
Reading logs through the CLI¶
You can also download data files with the CLI. Enter it by
typing logs
in the CLI and hitting the enter key. Here are the
available commands:
“dump *n*”: Dump log number n.
“dump 0”: Dump and erase all logs.
“erase”: Erase all logs.
“enable *name*”: Enable logging name. Use “all” to enable everything.
“disable *name*”: Disable logging name. Use “all” to disable everything.
Here are the field names that can be logged, with the default state shown:
Log name |
Default |
Function |
ATTITUDE_FAST |
DISABLED |
Logs basic attitude info to the dataflash at 50Hz (uses more space) |
ATTITUDE_MED |
DISABLED |
Logs basic attitude info to the dataflash at 10Hz (uses less space than LOG_ATTITUDE_FAST) |
GPS |
ENABLED |
Logs GPS info to the dataflash at 10Hz. |
PM |
DISABLED |
Logs IMU performance monitoring info every 20 seconds. |
CTUN |
ENABLED |
Logs control loop tuning info at 10 Hz. This information is useful for tuning servo control loop gain values. |
NTUN |
ENABLED |
Logs navigation tuning info at 10 Hz. This information is useful for tuning navigation control loop gain values. |
MODE |
DISABLED |
Logs changes to the flight mode upon occurrence. |
RAW |
DISABLED |
Logs raw accelerometer and gyro data at 50 Hz (uses more space). |
CMD |
ENABLED |
Logs new commands when they process. |
CURRENT |
DISABLED |
Logs current sensor if connected and enabled |
MOTORS |
DISABLED |
Logs motor commands |