Skip to main content

indiflight_log_tools

Decode Indiflight blackbox logs (.BFL) quickly into pandas dataframes, in raw or SI units. Includes the bfl2csv and bfl2rerun command line tools.

A C decoder (based on Betaflight's blackbox_decode) does the parsing, and Python then applies the unit conversions for Indiflight.

Installation

Supported: Linux (x86_64, aarch64) and macOS (Intel, Apple Silicon) with Python 3.10 or newer. PyPI has prebuilt wheels for these, so you don't need a compiler.

Windows: use WSL. The decoder doesn't build natively on Windows yet. Install WSL with Ubuntu (wsl --install in PowerShell, see the Microsoft guide), then follow the Linux instructions inside the Ubuntu terminal. Plot windows open on the Windows desktop (WSLg, Windows 10 21H2+ or Windows 11).

A virtual environment is recommended, so the package doesn't conflict with your system Python:

python3 -m venv ~/indiflight-venv
source ~/indiflight-venv/bin/activate     # run this again in every new terminal

On Ubuntu/Debian/WSL you may first need sudo apt install python3-venv python3-tk (python3-tk provides the matplotlib plot window backend).

From PyPI:

pip install indiflight_log_tools
pip install "indiflight_log_tools[rerun]"   # optional, needed for bfl2rerun / addToRerun()

From the git repo (compiles the C decoder, so needs gcc or clang):

pip install "git+https://github.com/tudelft/indiflight#subdirectory=support/LogAnalysis/indiflight_log_tools"

From a local checkout of the indiflight repo (-e for development):

pip install -e support/LogAnalysis/indiflight_log_tools

Upgrading from a version installed before 0.3.0? Run pip uninstall indiflight_log_tools first, so that the old bfl2csv and bfl2rerun scripts are removed.

Check the installation:

cd ~/    # or anywhere else, but not the source folder
python -c "from indiflight_log_tools import IndiflightLog; print(IndiflightLog.LIBRARY_SO)"

Usage

from indiflight_log_tools import IndiflightLog

log = IndiflightLog("/path/to/log.bfl", logId=3)                                  # if multiple logs in the same logfile, use this to select the one you want. default 1
log = IndiflightLog("/path/to/log.bfl", resetTime=False)                          # resetTime maintains the flight controller time as the time basis in the dataframe (default True)
log = IndiflightLog("/path/to/log.bfl", resetTime=False, timeRange=(1000, 3000))  # crop the data to timeRange (given in ms)

log.raw                                                                           # pandas dataframe in raw units
log.data                                                                          # pandas dataframe in SI units
log.parameters                                                                    # dict of the settings in the log header
log.events                                                                        # list of logged events
log.modeToText(log.data["flightModeFlags"])                                       # convert flight mode flag(s) into human-readable format
log.flags                                                                         # flight mode changes with timestamp
[(t, log.modeToText(x), log.modeToText(y)) for t, x, y in zip(log.flags["timeUs"], log.flags["enable"], log.flags["disable"])] # flight mode changes in human readable format

log.outputCsv("raw")                                                              # output raw data as csv, comparable to outputting from BB log explorer
log.outputCsv("si")                                                               # output SI data as csv
log.outputCsv("si", path="my/path/for/logOutput/")                                # output SI data into a specific path

log.addToRerun(name="BFL", clockOffsetSeconds=0.)                                 # send data to Rerun (does not do init, connect, etc. just adding data)

Installing the package also installs two command line tools:

bfl2csv /path/to/LOG00001.BFL              # writes CSVs next to the log (shorthand for log.outputCsv())
bfl2csv /path/to/LOG00001.BFL -u si        # SI units instead of raw
bfl2csv --help
bfl2rerun --help                           # shorthand for log.addToRerun()

Errors and temporary files

  • If a log is corrupt or logId doesn't exist, IndiflightLog(...) raises RuntimeError, and the decoder's message is printed to stderr. Your Python session keeps running, so you can catch the error and continue, e.g. when you loop over a folder of logs.
  • Each IndiflightLog instance decodes into its own folder in the user cache directory (~/.cache/indiflight_logs/ on Linux, ~/Library/Caches/indiflight_logs/ on macOS), so several processes can parse logs at the same time. The folder is deleted when the object is garbage collected. Folders left behind by killed processes are deleted after 7 days.
  • Threads can create IndiflightLog objects too, but the C decoder handles one log at a time. Use processes if you want to decode in parallel.

Releasing

Bump version in pyproject.toml, then push a tag log-tools-v<version>. The GitHub workflow .github/workflows/log-tools-wheels.yml in the indiflight repo builds the wheels and uploads them to PyPI.

License

GPL-3.0-or-later, see LICENSE.

Metadata

Release files for indiflight-log-tools 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for indiflight-log-tools 0.4.0
File Size Uploaded Provenance Actions
indiflight_log_tools-0.4.0.tar.gz 93.3 kB With provenance Details for indiflight_log_tools-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for indiflight-log-tools 0.4.0
File Actions
indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl
indiflight_log_tools-0.4.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for indiflight_log_tools-0.4.0-py3-none-macosx_11_0_arm64.whl
indiflight_log_tools-0.4.0-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for indiflight_log_tools-0.4.0-py3-none-macosx_10_13_x86_64.whl

Total release size: 526.7 kB

Release files / indiflight_log_tools-0.4.0.tar.gz

Download URL indiflight_log_tools-0.4.0.tar.gz
Size 93.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dbb99ff9448a5dbcdc07fef5a2bf6002d52f3d51754fa04b99cc47684fd1881e
BLAKE2b-256 checksum
How to use checksums
99f8374ea334f4a6685431c2f762dfd02ba5b8f0f50a148ac61fd75c71e4e9ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl

Download URL indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Size 141.9 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
93b96d804a0c9da3dfb75820da04b69eda6c1a6ceec9b5e794dcd3eda1d629ba
BLAKE2b-256 checksum
How to use checksums
9f5edad74347b7118b06f63ce83f2f67a5ec2100ddfe0d669864c90ff33435d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl

Download URL indiflight_log_tools-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl
Size 144.7 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
661f012b9c71a9f8eb6876cb600cf9439727916d2f38fb42a7054b38b250a9f8
BLAKE2b-256 checksum
How to use checksums
196c7ef3477dc888da712e051f39b6b452a193ac4506024f380ec73b2dba884f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / indiflight_log_tools-0.4.0-py3-none-macosx_11_0_arm64.whl

Download URL indiflight_log_tools-0.4.0-py3-none-macosx_11_0_arm64.whl
Size 73.5 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
03d9e02f98e397156c012bc746b9a6a0efcdfa85091a5971a3222e88f47a8262
BLAKE2b-256 checksum
How to use checksums
b59046ed9da9970ff29ef1fc81347ea8cd907ace8c585c38f0cb9302cfba1127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / indiflight_log_tools-0.4.0-py3-none-macosx_10_13_x86_64.whl

Download URL indiflight_log_tools-0.4.0-py3-none-macosx_10_13_x86_64.whl
Size 73.3 kB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
946e908766b1a56f13165202875b2dc248393f638a7ea065f4200f4f405d2425
BLAKE2b-256 checksum
How to use checksums
fdbaa98fd50d8af8a3c24c3a0a52138dfad06ef917ac22bb68f8cdb9b81f9370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for indiflight-log-tools 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for indiflight_log_tools-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page