Main Content

Using the Flight Control Interface to Obtain the Log Files

Obtaining the Flight Log and MAT File

The Flight Control Interface displays the option to retrieve the flight log and MAT file after the you click STOP.

  • Flight log: Click Flight Log. The file droneFlight.txt is downloaded to the Current Folder in MATLAB®.

  • MAT file: Click MAT File. The file RSdata.mat is downloaded to the Current Folder in MATLAB.

Note

  • The existing flight log and MAT file in the Current Folder are replaced every time you download the files.

  • To obtain the MAT file, Simulink® Coder™ must be installed on the host computer. Additionally, you must enable the options Use Simulink Coder features and MAT-file logging in the Configuration Parameters dialog box in Simulink model (see Simulink documentation).

Flight Log

The flight log (droneFlight.txt) is retrieved from the Parrot® minidrone after the flight. This log file contains details and data captured from three threads — rsedu_control (the main control thread running at 200 Hz), rsedu_of (optical flow thread running at 60 Hz), and rsedu_vis (image processing thread running at 60 Hz). The events are logged every second, and they include information about:

  • Threads that are executing on the drone and initialization checks

  • Creation of a successful TCP/IP connection between the drone and the host computer. (After initialization, the drone is the TCP/IP server, and it waits for connection from the host computer, which is the TCP/IP client.)

  • All the sensor values captured and logged. These values are captured at every second until the end of the flight, and they include:

    • Altitude values measured from the sonar

    • Pressure measured from the pressure sensors

    • x, y, and z angular velocity values measured from the gyroscope

    • x, y, and z acceleration values measured from the accelerometer

    • Battery output voltage

    • Motor values

  • Initialization of data calibration

  • Optical flow values

  • Execution of commands based on the controller logic or based on any user actions while the drone is flying (like initiating a stop)

  • Errors, if any, that led to the stopping of motors. For details, see Analyze Flight Log Errors.

MAT File

The MAT file (RSdata.mat) contains data that is captured every 5 milliseconds from the time the start command is executed on the drone until the motors on the drone stop. The data is captured in various workspace variables which you can analyze with MATLAB.

Note

Before deploying the Simulink model to the drone, you need to connect the required variables to the To Workspace block in Simulink so that they are captured in the MAT file.

See Also

|