Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



17 Commits

Repository files navigation


This python script provides data transformation from raw sensors (GPS and IMU) to FDR formation used in X-Plane. During the transformation process, it can generate several files from log file exported in CSV format. It can create the following type of files to analyse or view your flight information: KML, FDR, CSV, PNG.

To record the raw data, I use a smartphone with the FlightRecorder24 application (but it can be recorded from any kind of device or application):

This script is inspired by fdr_tools and enable more features (like avoiding GUI to use command line parameters, generation of figures, more functions to clean source code).

Install Python and needed packages


sudo apt-get install python python-numpy python-scipy python-matplotlib


Python is easy to install on Windows, but NumPy and especially SciPy are more difficult to install because of dependencies. The easiest way is to install a Python distribution including all the packages for the SciPy stack. I chose the WinPython one:

Install Flight2FDR && cd tofdr
chmod a+x


cd tofdr
./ --input flight_recorder.csv --output flight1


The input file must at least contain the following information in the CSV format in the following order (input parameters can be definied in the script): Time, Longitude, Latitude, Altitude (from GPS sensor), Roll, Pitch and Yaw (from IMU sensor)

The generated files depend on the command line activated parameters. You can find below the command's help.

    -i, --input=FILE
        Specify the input filename in csv format
    -o, --output=DIR
        Specify a directory name to generate kml, fdr files in
    -d, --debug
        Activate debug flag to create more data files for debugging
    -h, --help
        Print this message
        Print information about flight collected from input file
    -p, --plot
        Generate different figures representing principal parameters
    -s, --smooth=VAL, --sigma=VAL
        Specify the sigma value used for the gaussian filter to smooth
        Specify the start time of the flight (truncated data before this time).
         Time is specified as day/month/year_hour:minute:second
        Specify the stop time of the flight (truncated data after this time).
	       Time is specified as day/month/year_hour:minute:second
        Specify the window size to determine the mobile average applied to data.

Options for fixing incorrect values:

    All these options enable to apply a default correction on all values.
    This append when the collecting device was not in the right position
    when recording data. So translate logged data by specified value.

        Set the default elevation of the airport to be sure that no data are (feet)
        under this limit
        Fix the elevation values adding VAL (feet)
        Fix the pitch values adding VAL angle (degre)
        Fix the roll values adding VAL angle (degre)
        Fix the yaw values adding VAL angle (degre)


Script to provide data transformation to the XPlane FDR format






No releases published


No packages published