File logger

From PaparazziUAV
Revision as of 11:42, 23 August 2016 by Ewoud (talk | contribs) (Created page with "=When you can use the file logger module= The file logger module can be used if you have internal storage space on you autopilot. This is for instance the case with most dro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When you can use the file logger module

The file logger module can be used if you have internal storage space on you autopilot. This is for instance the case with most drones from Parrot, such as the Bebop. Therefore, in the rest of this page, the Bebop will be taken as an example.

Logging Data on the Parrot Bebop

Logging data onboard on the Bebop is pretty straight forward. The Bebop drone is equipped with onboard storage, which we use to store the logs.

Step 1: First, open your airframe.xml file (for example in paparazzi/conf/airframes/TUDELFT/ ). Make sure that under modules, the following lines are uncommented or included:

  <modules main_freq="512">
    <module name="logger_file">
      <define name="FILE_LOGGER_PATH" value="/data/ftp/internal_000"/>
    </module>
  </modules>

Step 2: In your logger file include the headers within paparazzi which contain the variables which you would like to log. This is done in the logger c file in paparazzi/sw/airborne/modules/loggers/file_logger.c . In this case I want to log data from stabilization_indi.c , so the following header should be included:

#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"

In the file file_logger.c you can specify which variables you want to have logged in the same fashion as normal "printf's" would work. The variable names and the variable types (float, int etc.) have to be specified.

Step 3: Start and stop the file logger by going to the paparazzi ground control station. Then go to > Settings > Modules. Here you can start and stop a log. This is displayed in the picture below:

Enable data logging in the GCS.

Step 4: First, make sure that your Parrot Bebop is on, and connected. Now the logged .csv files can be retrieved from the Bebop. This is done by opening a browser, and typing ftp://196.168.42.1/ in the navigation line. This will take you to the ftp folder on the Bebop. Browse to /Internal000/ . Here we can find the .csv files, named 00000.csv to 0000X.csv depending on the flights you logged. Copy the files to your computer for analysis.