Main Content

Flight Log Analyzer

Analyze UAV autopilot flight logs

Description

The Flight Log Analyzer app enables you to load and analyze UAV autopilot flight log data, as well as create a customized series of plots.

To use the app:

Click New Session to create a new session.

You can open saved app sessions by clicking Open Session.

You can save your progress to a MAT-file (.mat) by clicking Save Session.

To load a ULOG file (.ulg) or MAT-file containing a ulogreader object, select Import > From ULOG.

To load a TLOG file (.tlog) or MAT-file containing a mavlinktlog object, select Import > From TLOG.

Select Import > From Workspace to load a ulogreader object, mavlinktlog object, or custom log data and a flightLogSignalMapping object from the workspace.

Click Add Figure to add a new figure for plotting.

You can add one or more predefined or custom plots to a figure from the plot gallery. To see all available plots in the plot gallery, click the down arrow on the right side of the gallery.

Predefined Plots

  • Attitude — Adds plots for roll, pitch, yaw angles, as well as body rotation rates

  • IMU — Adds plots for an accelerometer and gyroscope

  • Trajectory — Adds a 3-D plot for the UAV trajectory and reference trajectory

  • Velocity — Adds plots for velocity in the x-, y-, and z-directions, as well as groundspeed and airspeed

  • Compass — Adds plots for a magnetometer, estimated yaw, and course angle

  • Height — Adds a plot for GPS, a barometer, and estimated altitude

Custom Plots

  • Timeseries — Adds a blank plot for timeseries data

  • XY — Adds a blank plot for 2-D data

  • XYZ — Adds a blank plot for 3-D data

You can delete the selected figure or plot by clicking Delete.

Click Map View to view or hide the satellite image map with logged GPS data.

Note

The app requires internet access to retrieve satellite imagery.

Click Export Figure to export the currently selected figure as a .fig file.

Flight Log Analyzer app

Open the Flight Log Analyzer App

  • MATLAB® Toolstrip: On the Apps tab, under Control System Design and Analysis, click Flight Log Analyzer.

  • MATLAB command prompt: Enter flightLogAnalyzer.

Examples

expand all

Use the Flight Log Analyzer app to load and analyze UAV autopilot flight log data from a ULOG file.

Open the Flight Log Analyzer App

In the Apps tab, under Control System Design and Analysis, click Flight Log Analyzer.

Alternatively, you can use the flightLogAnalyzer function from the MATLAB command prompt:

flightLogAnalyzer

Import a ULOG File

Select Import > From ULOG to load the UAV flight log data from a ULOG (.ulg) file.

Import ULOG file

By default, the app displays a satellite map with logged GPS data and the flight modes as a table. The flight modes, along with their corresponding start and end times, are tabulated in the Flight Modes pane.

Satellite map with logged GPS data and flight modes table

Create Figures and Plots

  1. To create a new figure for plotting, click Add Figure. The app adds an empty figure to the plotting pane.

    Create figure

    You can continue adding additional figures using this process.

  2. The app adds a figure item corresponding to the new figure to the list in the Figures pane. Select the check box to the left of the listed figure item to show all plots in the figure. Clear the check box to hide them.

  3. To rename a figure, select the associated figure item in the Figures pane, click the Name box in the Details pane, and type a new name.

  4. To delete a figure, select the figure item in the Figures pane and click Delete on the app toolstrip. Deleting a figure deletes all plots in the figure.

Creating a figure enables the plot gallery. You can add one or more predefined plots or custom plots to a figure from the plot gallery.

Add a Predefined Plot

  1. To add a predefined plot to a figure, select one of the six predefined plots from the plot gallery.

    Predefined plot gallery

  2. For example, click Attitude to add plots for rotation angles and rotation rates to the figure.

    Attitude plot

    You can continue adding additional plots to a figure using this process.

  3. The app adds a plot item corresponding to the new plot under the associated figure item in the Figures pane. Select the check box to the left of the listed plot item to show the plot in the figure. Clear the check box to hide the plot.

  4. To rename a plot, select the associated plot item in the Figures pane, click the Name box in the Details pane, and type a new name.

  5. Select the Show Legend check box in the Details pane to show the legend on the plot. Clear the check box to hide the legend.

  6. To delete a plot, select the plot item in the Figures pane and click Delete on the app toolstrip.

Edit Plot Signals

  1. The Signals pane displays the signals in the selected plot as a table. The Signal Name column contains the names of the signals. The subsequent columns each contain the data associated with that signal for a specific axis.

  2. Select the check box in front of a signal item to show that signal in the plot, and clear the check box to hide the signal. The color around the check box is the color of the signal in the plot.

  3. To add a new signal to the selected plot, click Add Signal.

    Signal pane

    To rename the signal, double-click signal in the Signal Name column and type a new name.

  4. To add or update the signal data, double-click the data field for the desired signal in the corresponding column to enable the Signal Browser pane. Choose from available signals.

  5. Select one of the signals from the Signal Browser pane and click Update.

    Signal Browser pane

  6. To delete a signal, select a signal from the Signals pane and click Delete Signal.

Change the Plot Focus Using the Panner

  1. For timeseries plots, use the Panner to focus on data segments in the x-axis range. The Panner is a strip plot beneath the main plot. To focus on a section of the main plot, drag the red and blue handles to the start and end positions, respectively, of the desired data segment.

    Panner pane

  2. You can also move the handles by typing new values in the Left and Right boxes, beneath the strip plot. To reset the handles to their default values, click Reset Limits.

  3. The color next to each flight mode in the Flight Modes pane represents that flight mode in the color bar under the strip plot in the Panner pane.

Add a Custom Plot

  1. To add a custom plot to a figure, select one of the three custom plots from the plot gallery. You can add the new plot to the previously created figure or to a new figure.

    Custom plot gallery

  2. For example, click XYZ to add a blank plot for 3-D data.

    Custom XYZ plot

  3. To add a signal to the plot, click Add Signal in the Signals pane.

  4. To rename the signal, double-click signal in the Signal Name column and type a new name.

  5. To add signal data to the X-Axis, Y-Axis, and Z-Axis columns, double-click the data field for the desired signal in the corresponding column to enable the Signal Browser pane. Choose from the available signals.

  6. For example, to create a trajectory plot in local east-north-up (ENU) Cartesian coordinates:

    1. Double-click the X-Axis data field for the desired signal and find the LocalENU signal group in the Signal Browser pane.

    2. Expand the group and select the signal X.

    3. Click Update to update the signal with X-Axis data.

    4. Repeat these steps to update the Y-Axis and Z-Axis fields with Y and Z data, respectively, to create a 3-D trajectory plot.

    Custom 3-D trajectory plot

Click Export Figure to export the current figure as a .fig file.

You can save the Flight Log Analyzer app session by clicking Save Session. The app writes the current state of the app to a .mat file that you can load by clicking Open Session.

Programmatic Use

expand all

flightLogAnalyzer opens the Flight Log Analyzer app, which enables you to analyze UAV autopilot flight logs.

More About

expand all

Introduced in R2020b