Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

Flight Review

Build Status

This is a web application for flight log analysis. It allows users to upload ULog flight logs, and analyze them through the browser.

It uses the bokeh library for plotting and the Tornado Web Server.

Flight Review is deployed at

Plot View

3D View

3D View

Installation and Setup



sudo apt-get install sqlite3 fftw3 libfftw3-dev

Note: Under some Ubuntu and Debian environments you might have to install ATLAS

sudo apt-get install libatlas3-base


macOS already provides SQLite3. Use Homebrew to install fftw:

brew install fftw


# After git clone, enter the directory
git clone --recursive
cd flight_review/app
pip install -r requirements.txt
# Note: preferably use a virtualenv


  • By default the app will load config_default.ini configuration file
  • You can override any setting from config_default.ini with a user config file config_user.ini (untracked)
  • Any setting on config_user.ini has priority over config_default.ini
  • Run to initialize the database.

Note: can also be used to upgrade the database tables, for instance when new entries are added (it automatically detects that).


For local usage, the server can be started directly with a log file name, without having to upload it first:

cd app
./ -f <file.ulg>

To start the whole web application:

cd app
./ --show

The plot_app directory contains a bokeh server application for plotting. It can be run stand-alone with bokeh serve --show plot_app (or with cd plot_app; bokeh serve --show, to start without the html template).

The whole web application is run with the script. Run ./ -h for further details.

Interactive Usage

The plotting can also be used interative using a Jupyter Notebook. It requires python knowledge, but provides full control over what and how to plot with immediate feedback.

  • Start the notebook
  • Locate and open the test notebook file testing_notebook.ipynb.
# Launch jupyter notebook
cd app
jupyter notebook testing_notebook.ipynb


The web site is structured around a bokeh application in app/plot_app (app/plot_app/ contains all the configured plots). This application also handles the statistics page, as it contains bokeh plots as well. The other pages (upload, browse, ...) are implemented as tornado handlers in app/tornado_handlers/.

plot_app/ additionally contains a list of log topics that the plot application can subscribe to. A topic must live in this list in order to be plotted.

Tornado uses a single-threaded event loop. This means all operations should be non-blocking (see also (This is currently not the case for sending emails).

Reading ULog files is expensive and thus should be avoided if not really necessary. There are two mechanisms helping with that:

  • Loaded ULog files are kept in RAM using an LRU cache with configurable size (when using the helper method). This works from different requests and sessions and from all source contexts.
  • There's a LogsGenerated DB table, which contains extracted data from ULog for faster access.


In addition to in-memory caching there is also some on-disk caching: KML files are stored on disk. Also the parameters and airframes are cached and downloaded every 24 hours. It is safe to delete these files (but not the cache directory).

Notes about python imports

Bokeh uses dynamic code loading and the plot_app/ gets loaded on each session (page load) to isolate requests. This also means we cannot use relative imports. We have to use sys.path.append to include modules in plot_app from the root directory (Eg Then to make sure the same module is only loaded once, we use import xy instead of import plot_app.xy. It's useful to look at print('\n'.join(sys.modules.keys())) to check this.

Docker usage

This section explains how to work with docker.


Edit the .env file according to your setup:

  • PORT - The number of port, what listen service in docker, default 5006
  • USE_PROXY - The set his, if you use reverse proxy (Nginx, ...)
  • DOMAIN - The address domain name for origin, default = *
  • CERT_PATH - The SSL certificate volume path
  • EMAIL - Email for challenging Let's Encrypt DNS


  • /opt/service/config_user.ini - Path for config
  • /opt/service/data - Folder where stored database
  • .env - Environment variables for nginx and app docker container

Build Docker Image

cd app
docker build -t px4flightreview -f Dockerfile .

Work with docker-compose

Run the following command to start docker container. Please modify the .env and add app/config_user.ini with respective stages.

Uncomment the BOKEH_ALLOW_WS_ORIGIN with your local IP Address when developing, this is for the bokeh application's websocket to work.


docker-compose -f up

Test Locally

Test locally with nginx:

docker-compose up

Remember to Change NGINX_CONF to use default_ssl.conf and add the EMAIL for production.


htpasswd -c ./nginx/.htpasswd username
# here to create a .htpasswd for nginx basic authentication
chmod u+x


Contributions are welcome! Just open a pull request with detailed description why the changes are needed, or open an issue for bugs, feature requests, etc...