Reading real flight logs
The scripts exist to check one guessed number in Lothal: the frequency a frame’s arms ring at, which every frame’s vibration figure is scaled from. Each one says in its own header what it does, why, and what it found. Read the header before running one.
| Script | What it reads | What it is for |
|---|---|---|
resonance_analysis.py |
A Lothal flight-log CSV, or a Betaflight blackbox log already decoded to CSV with blackbox_decode |
Look for a frame’s first bending mode in a gyro trace and compare it with Lothal’s model. |
impact_analysis.py |
A tap-test recording: a WAV from a phone microphone, a Betaflight log, or a Lothal log | Measure an arm’s ringing frequency and its damping from a tap on the arm, with nothing flown. |
inav_log.py |
INAV blackbox logs | Read INAV’s log dialect, which records the unfiltered gyro directly. Used by the other scripts. |
campbell_analysis.py |
A set of logs from one aircraft | Look for a frame mode across many flights at different hover throttles, when no single flight sweeps the throttle. |
Running them
Section titled “Running them”resonance_analysis.py and impact_analysis.py have command-line options; run either with
--help from the tools/ folder. Both need the arm length (hub to motor centre) and the mass
at the arm tip, measured on the real aircraft. inav_log.py and campbell_analysis.py are
modules used by the others and by their self-tests, not stand-alone commands.
For the tap test, follow
impact_test_protocol.md
exactly. It lists what to measure and weigh before you start, because some of it cannot be done
once the drone is reassembled.
What to expect
Section titled “What to expect”Normal flying rarely produces a log in which a frame’s resonance can be measured: the motor speed moves too much within each moment of the log. The scripts are written to say so rather than report a number they cannot support. A null result is a real result.
Documentation licensed underCC BY 4.0. Lothal itself is GPL-3.0-or-later.Report a problem.Roadmap.