Skip to content
Arthur Benemann edited this page Mar 15, 2013 · 1 revision

There are two ways to datalog your flights with APM: using the onboard 16Mb dataflash memory, which you can download on the ground, and/or recording your Xbee telemetry stream with a Ground Station in flight.

Recording telemetry

All major Ground Stations allow you to record your wireless MAVLink telemetry stream during the flight.

Mission Planner:

MAVLink telemetry is automatically recorded when MAVlink is connected. Files are in your "logs" subfolder in your Mission Planner folder and given data/time filenames (you can rename them). You can load and replay any one and convert any log to a KMZ file that can be displayed in Google Earth by clicking on the KMZ button.

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/mavlogs.png

HK GCS:

Press the record button and give a filename if you want to record any telemetry stream. You can load and replay any saved mission.

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/HKGCS_record.PNG

Onboard datalogging

APM's on-board 16MB datalogging memory will also automatically record information about your flight and the APM’s performance.

When you are connected to APM via the USB cable and the slider switch is in CLI mode, you can download these logs using the buttons in the Mission Planner's Terminal tab. They will be saved in your Logs folder. If you click "Recreate KML", a file will be created in that folder that will allow you to view your mission in Google Earth.

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/dataflashlogs.png

It is a good idea to clear all the logs in memory (saving what you want) before a day of flying. Once the dataflash is full, older logs will be overwritten.

Here are the data types that can be logged in the onboard dataflash memory. You can turn them on or off by typing {{{enable name}}} in the CLI Logs menu, as described below:

**Log name** **Default** **Function**
ATTITUDE_FAST DISABLED Logs basic attitude info to the dataflash at 50Hz (uses more space)
ATTITUDE_MED ENABLED 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 DISABLED Logs control loop tuning info at 10 Hz. This information is useful for tuning servo control loop gain values.
NTUN DISABLED Logs navigation tuning info at 10 Hz. This information is useful for tuning navigation control loop gain values.
||MODE||ENABLED||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.||

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. Full instructions for doing that are here.

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.
  • "erase": Erase all logs.
  • "enable name": Enable logging name. Use "all" to enable everything.
  • "disable name": Disable logging name. Use "all" to disable everything.

Note that at present when the APM is powered on with the slide switch pushed away from the edge of the board the log always begins being written at the beginning of the Flash memory, overwriting previous log contents.

Clone this wiki locally