GSoC 2026: Making ArduPilot Log Analysis Smarter

Project: GSoC | Mentors: Amilcar Lucas & Jaime Machuca | Duration: May to August

1. Introduction

Hello ArduPilot community,
I’m Omkar Sarkar, a 2nd year undergraduate studying Computer Science and Engineering at the Institute of Technical Education and Research (SOA), India.

I’ve been exploring robotics and autonomous systems for a while now, and recently I’ve been doing some research on UAVs, control systems, and flight behaviour. I’ve also been contributing to ArduPilot, especially working on AMC, over the past few months.

I’m really excited to be working on this project as part of GSoC.

2. Problem Statement

Analyzing flight logs in ArduPilot is still a largely manual process. Often when a user shares a crash log, the expectation is a clear answer. In practice, identifying the root cause requires going through multiple signals, correlating them, and validating against configuration.

Tools like Mission Planner and existing log viewers provide access to raw data, but understanding what went wrong and why is difficult for many newer users. This often leads to a guess approach when tuning parameters or diagnosing issues.

At the same time, ArduPilot Methodic Configurator (AMC) provides a structured way to configure parameters using metadata and predefined workflows, but it does not currently take into account actual flight behaviour captured in logs.

There is a gap, as there is no reliable integrated system that takes a flight log, analyses it in context, and provides actionable feedback on configuration or system behaviour.

Users do not need an existing AMC project to use the tool. AMC can import a .bin log and automatically create a vehicle project from the information stored in the log. This allows the diagnostic system to work with both the flight log and the generated AMC project, enabling configuration aware analysis even for first time AMC users.

2.1 Solution Workflow


Fig. 1: Workflow

A detailed flow is in my Github

3. Solution Overview

3.1 Step 1: Flight Log Validation & Feature Extraction

Responsible for translating raw flight data into physical understanding and checks the quality of the log.

  1. The system ingests a .bin log using pymavlink and loads firmware metadata from apm.pdef.xml. Since different messages are logged at different rates, the data is synchronized before analysis.

    The log quality check module determines which analyses can be performed reliably. It checks for missing messages, insufficient logging rates, processor load indicators(when available) etc. and reports which diagnostic modules can run reliably and which require additional logging.

    For Example. if a user requests vibration analysis but the log does not contain sufficiently IMU data, the report will say, vibration analysis cannot be performed reliably and recommend recording a short validation flight with the appropriate logging settings enabled.

  2. After validation, physical features such as battery behaviour, vibration metrics, and IMU frequency content are extracted.

    Feature extraction will use techniques like variance measurements to identify unstable signals and increasing vibration levels, derivative (delta) calculations to detect sudden events such as voltage drops, etc.

    Fast Fourier Transform (FFT) analysis, similar to the ArduPilot Filter Review Tool, will be used to identify vibration peaks, motor harmonics, and possible resonance sources automatically.

Fig. 2: IMU Spectrum Visualization

  1. These extracted features are then evaluated using two parallel approaches. Physics based checks and, later in the project, a Hidden Markov Model (HMM) trained using real flight logs.

I would like to thank Patrick Hinchey for providing access to a large collection of ArduPilot Copter logs. (These logs will be used for developing and validating, and later for training and evaluating the HMM model.)

3.2 Step 2: Root Cause Detection

Root Cause Detection links detected events using their temporal relationships to identify the most likely root cause.

For Example. A voltage drop followed by motor saturation and frame vibration is treated as a single chain of events, not three isolated warnings.

Hardware and operational issues are reported together with supporting evidence and corrective actions.
For Example. persistent vibration peaks at motor harmonics may indicate propeller imbalance, motor damage, or frame resonance.*

If the issue is configuration based, it will validate the current parameters against firmware definitions, checking for range limits and conflicting settings. It then maps the root cause to the appropriate AMC tuning step and generates the required parameter adjustments.

Fig. 3: AMC Configuration Steps

3.3 Step 3: Execution

If a configuration issue is detected, parameter changes are suggested. It presents the analysis, explains the recommended AMC step, and asks the user for approval. If approved, the parameter updates are sent directly to the flight controller through the AMC interface.

After the changes are applied, we will recommend a short validation flight (for required and updated steps). The user uploads the new .bin log, and compares it against the previous log to verify that the cause was successfully fixed.

3.4 LLM Layer

A local LLM sits above this analysis pipeline and acts as the user interface with the system and does not perform the analysis itself, only interprets diagnostic outputs, explains detected issues, highlights supporting evidence, and presents recommendations.

4. Expected Midterm Milestones

  • Implement log quality checks.
  • Extract an initial set of physical features including battery behaviour, vibration metrics etc.
  • Develop initial physics based diagnostic modules for a set of common issues.
  • Build the first version of the AMC integration and validation workflow.

5. Closing

The goal of this project is to develop a log analysis and diagnostic system that works alongside AMC.
By the end of GSoC, I am aiming to deliver a working foundation consisting of log quality analysis, feature extraction, initial physics based diagnostics, AMC workflow integration, and a validation workflow.

Since reliable flight log diagnosis requires testing against real world logs and hardware, development and validation will continue beyond GSoC.

I would appreciate any feedback from the community, especially from those who regularly work with flight logs. Any suggestions or real world cases would be super helpful.

Thank You!

GSoC Developement Repo

And Here are some of my works on AMC:

6 Likes

Midterm Update

Over the past weeks I have been working on the foundation of the log analysis system. In my
proposal I described the overall architecture and end goal of the project. But the focus has shifted a bit towards first determining the quality of the log, to know if any certain analysis is possible and to know how much the log is capable of describing the vehicle.

A reusable model based framework has been designed that supports different analyses while remaining easy to extend. This work includes the log extractor, metadata extraction, log quality validation, and the first subsystem quality models. Together these components produce a single structured summary of a flight log that will later be shown using the AMC frontend.

The Log Extractor

Designing the extractor was one of the first and most time consuming parts.

It performs a two pass parse of the log, it rebuilds the message schemas from the FMT records,
and stores every logged message as structured NumPy arrays. This gives fast access to fields
and a clean structure that future modules, and later the ML and LLM layers, can read from.

In future modules like vibration, EKF, compass will be added, therefore the extractor has been designed to remain independent of future analysis modules, allowing new analysis to be added without modifying the extractor.

This works because the .bin format describes itself, the FMT records at the start of the log define
every message type, including field names, types, units and multipliers etc. The parser reads this
schema directly, making it independent of firmware versions and vehicle types. As new messages
are added in future firmware releases, the parser continues to work without requiring changes.

Storage went through a few iterations. The first version stored each message as a dictionary in a
list. It worked, but on a real 73 MB log with apprx. 1.8 million records that will use too much
memory, since every record repeats its field names. The second ver. parser now stores the data
one NumPy array per field(column wise), and performs two passes over the log.

The first counts how many messages of each type exist, while the second allocates arrays of the
exact size before filling them. Reading the log twice costs some time (about 25 seconds for that
73 MB log), but the memory saving matters far more on the large logs people actually want
analysed.

Not every log is perfect. Logs can get truncated due to several reasons, which can leave the
parser reading a header that is not really there(or other reasons).

For now the extractor handles the well formed case, and better handling of corrupt logs will be
done shortly, as pymavlink itself doesnt handle errors internally it just crashes on bad logs.

Metadata and Flight Duration

I then added metadata that includes file size, message counts, and flight duration, system info,
signal quality.

Flight duration seems simple, first timestamp to last. But on a log (provided by Patrick Hinchley)
that gave 12,967 seconds, about three and a half hours, which was clearly not the flight time, that
was probably everything from power on, to off.

My first attempt used first arm to last disarm, but that still looked too high. Inspecting the raw
ARM records showed several arm and disarm cycles, several short flights with long blank time
between them.

First arm to last disarm counts all of that. Summing each armed interval separately gave about
eight minutes instead. The final version walks the arm and disarm events and sums each armed
interval, so it handles any number of flights, and also handles a log that ends while still armed
along with other fallbacks to check the fight time.

Log Quality Validation

Before running any analysis, the system checks whether the log supports it. If a log does not
contain enough IMU data, the correct answer is that vibration analysis cannot be performed
reliably.

This layer checks each message against its FMT schema and against AMC’s configuration steps.
Each step declares the messages it needs, so the tool can say, for example, that the ESC
telemetry step has no ESC data in this log instead of producing nothing.

There is also a performance summary reading CPU load, long loops, max loop time and free
memory from the PM message.

Subsystem Quality Models

The first two models are battery and GPS. They share a base class, so adding another subsystem
later is small.

The useful part is the absence diagnosis. Rather than simply reporting that battery data is
missing, the model attempts to explain why. It checks whether battery logging is disabled through
LOG_BITMASK, whether BATT_MONITOR is disabled, or whether logging appears correctly
configured but no data was recorded, suggesting a configuration or hardware issue. On a real log
this correctly flagged a vehicle with BATT_MONITOR set to 0 and named the parameter to
change. GPS follows the same pattern (present, 3D fix, type configured) with the same bitmask
aware diagnosis.

Summary

All of these components come together in a single analysis manager, which returns one structured
summary containing metadata, performance information, quality results and configuration step
validation. This summary will become the interface between the backend and the Methodic
Configurator frontend, and can later be consumed by higher level diagnostic modules.

With all this, the next stage will be towards diagnostics, implementing the vibration and FFT
analysis, and the root cause detection layer that maps directly to the appropriate AMC
configuration steps.

I would like to thank @amilcarlucas for his guidance throughout the first half of the project.
Several important design decisions, particularly around the extractor architecture and memory
handling, came directly from discussions with him and significantly improved the implementation.

Flight duration: 7.8 min
File size: 14.6 MB
Messages: 353,216 across 175 types
Parameters: 1054

CPU load: avg 27.7%, peak 30.3%
Free memory: 499,408 bytes

Battery: info - Battery data present and good for analysis
GPS: info - GPS data present and good for analysis

The above output is an example of how roughly the final quality report will look.

Development repo: GitHub - OmkarSarkar204/Ardupilot_Log_Analysis · GitHub

AMC Contributions

Alongside the GSoC project, I also contributed to AMC. This includes implementing a new
Compass Calibration data model, including the business logic, configuration handling, and
automated tests. This work extends the component based configuration system and serves as the
foundation for the new compass calibration workflow.

I also contributed to a few maintenance improvements, like some macOS test stability fix that
resolved segmentation faults in the GUI test suite.

Next Steps

The next stage of the project will introduce an LLM layer. Each analysis module (Battery, GNSS, Vibration, EKF, etc.) will produce a structured JSON containing its findings, metrics. These outputs will be combined into a single diagnostic context that the LLM can reason over, it will use this context to explain issues, guide users through the appropriate Methodic Configurator configuration steps, recommend parameter changes when applicable, and interactively ask follow-up questions about the vehicle, flight conditions or hardware to better identify potential configuration or hardware related problems.

2 Likes

Final Update

This is my final GSoC 2026 update for the ArduPilot Log Analysis project.

My midterm update covered the log extractor, flight duration handling, data availability validation, and the first subsystem data availability models. Since then, the project moved from that foundation into real analysis modules, integrated fully into ArduPilot Methodic Configurator, using the vehicle configuration and configuration step information that already exists there.

Data availability checks with Analysis

The data availability layer determines whether a subsystem has enough usable data for analysis. Four subsystems now go beyond the data availability check into analysis:

  1. Battery: capacity usage, voltage extremes, power efficiency, failsafe threshold ordering, and validation of battery parameters against vehicle_components, including the distinction between manually set values and values later replaced by actual measurements.
    Voltage is flagged if it spikes to 20% above MOT_BAT_VOLT_MAX or sags to 20% below MOT_BAT_VOLT_MIN, and capacity retention is flagged if consumption exceeds 100% of BATT_CAPACITY, since either points at a misconfigured value rather than the battery itself. For example, MOT_BAT_VOLT_MAX is initially set as a first approximation based on the battery manufacturer’s specifications. Later, in step 24, it is replaced by an actual measurement taken from the vehicle after a flight. The analysis therefore does not treat the difference as a configuration error or recommend reverting to the earlier theoretical value.

  2. ESC: MOT_SPIN_MIN and MOT_SPIN_ARM margin, effective DShot rate, zero RPM detection during armed periods, and per output current imbalance. MOT_SPIN_MIN is required to be at least 0.03 above MOT_SPIN_ARM, and the effective DShot output rate, SCHED_LOOP_RATE times the SERVO_DSHOT_RATE multiplier, is flagged at or below 1000Hz.
    The current imbalance check sorts the per output average currents and checks whether the largest gap is significantly larger than the others, allowing it to adapt to the vehicle.
    A distinction is a vehicle’s ESCs as “functioning well” while also saying ESC telemetry needed reconfiguring, for a flight where ESC telemetry had simply never been logged at all. The vehicle’s notch filter was set to track ESC telemetry RPM, so with no telemetry it could not track motor noise, and that noise reached the controller unfiltered.

  3. IMU: temperature calibration state, the accelerometer and gyroscope calibration prerequisite, temperature range, and calibration coverage. A calibration spread below 10°C fails and is flagged as needing recalibration, a spread between 10°C and 25°C meets the minimum but is flagged as below the recommended range, and a coldest recorded point above 0°C is flagged with a recommendation to cool the flight controller down to around 10°C before starting.
    One check specifically guards against a calibration that looks complete but is not trustworthy. INS_TCALn_ENABLE can report a calibrated state even when the underlying accelerometer and gyroscope calibration was never actually performed.

  4. Vibration: A peak at or above 60 m/s/s is reported as a level where position or altitude hold problems are nearly always present, while a peak between 30 and 60 m/s/s is reported as a level that may cause those problems.
    The data availability layer runs first for every subsystem and determines whether the corresponding analysis can be performed. The analysis models use the existing AMC configuration steps and vehicle component data for vehicle specific information instead of maintaining a separate description of the vehicle.

Analysis to configuration

The analysis is also connected back to the corresponding AMC configuration step. When a finding is associated with a configuration step, the frontend provides a Go to step button. Selecting it takes the user directly to the relevant step in the Methodic Configurator, where the associated parameters can be reviewed and changed.

This connects the analysis result to the existing AMC configuration workflow instead of only reporting a problem. The analysis identifies the condition, provides the relevant parameter and configuration step information, and AMC provides the place where the user can act on it.

Demonstration

Also tested the analysis starting from a completely unconfigured vehicle.

Analysis result of a default log.

This is useful for testing how the data availability and pending analyses behave when configuration and logging prerequisites have not yet been set up.

Demonstration: IMU temperature calibration

I tested the IMU temperature analysis using a deliberately poor temperature calibration log from my own vehicle.

I ran the calibration without cooling the flight controller down first.

For IMU 1, the coldest recorded temperature was 33.3°C, with a total calibration spread of 14.5°C.

For IMU 2, the coldest recorded temperature was 32.9°C, with a spread of 14.8°C.

Both spreads meet the 10°C minimum required for the calibration but are below the 25°C recommended range. The coldest temperatures are also above freezing.

The analysis detected these conditions and reported them with the actual values from the log.

Structured results and frontend

Analysis results are combined into a single JSON report validated against a defined schema.

The report contains:

  • Flight information
  • Vehicle components
  • Data availability results
  • Analysis results
  • Pending analyses with their reasons
  • Related configuration steps
  • Related parameters

Every finding embeds its own documentation instead of only returning a parameter name or step filename.

A step_info section provides information and links from the corresponding configuration step, while param_info provides the parameter name, documentation, range and units from apm.pdef.xml.

This information is not hardcoded into the analysis modules. It is taken from the existing AMC configuration data, so changes to that data are reflected in the report.

The AMC frontend can browse the results by subsystem. Selecting a subsystem shows its documentation links, hardware and connection information, data availability result and analysis findings.

A separate tuning graph reads tuning_report.csv and displays parameter changes trend across configuration steps.

Local LLM

A local Qwen2.5 3B Instruct Q4 K M model is being tested through llama cpp python.

The model receives the structured analysis report and not the raw .bin log. Its purpose is to explain findings that have already been produced by the deterministic analysis and connect them with the relevant configuration steps and documentation.

During testing, the model initially had problems with pending results. If a subsystem only had a data availability result, the model could sometimes interpret it as a successful analysis. Adding a real reason to every pending result and explicitly treating pending as “not analysed” fixed most of this problem.

I also found that a growing conversation history combined with a large JSON report caused the 3B model to sometimes contradict itself. Making each question an independent call and sending only the report sections relevant to that question worked better.

Only four subsystems currently have detailed analysis behind them. Results for the other subsystems are based on data availability checks, so the LLM should not be treated as having detailed diagnostic information for them yet.

The deterministic analysis remains responsible for detecting and measuring conditions. The LLM is an explanation layer on top of those results.

The LLM feature is not yet available in the current AMC release. It is being developed separately from the core analysis modules. Here is a snippet:

What remains

The current framework also contains data availability checks, without detailed analysis yet, for:

  • GPS
  • FFT
  • Errors
  • Performance Monitor
  • Arming
  • Flight Mode

Severity classification for individual findings also remains to be implemented properly rather than using the static legend currently shown in the frontend.

The remaining work is to expand the analysis coverage, improve the existing analysis, and test the system with more real data.

The vehicle behind the logs

I also built a 5 inch quad during GSoC to provide controlled flight logs for this work.

Its configuration, calibration history, tuning parameters and tuning results are maintained using ArduPilot Methodic Configurator in a separate repository:

AMC Drone Mark5

Documentation

A user guide for the Log Analysis feature is available here:

Log Analysis User Guide

The guide covers the required setup and the recommended workflow for investigating issues.

Closing

My original proposal focused more on the complete diagnostic system. A large part of the work during GSoC instead went into building the foundation required for that system: the extractor, data availability layer, reusable analysis models, structured results, vehicle context and AMC integration.

The current system provides a path from a flight log to a structured, subsystem specific result and then to an explanation of that result.

I will continue expanding the analysis coverage, improving the existing checks and testing them with more real flight data after GSoC.

I would like to thank @amilcarlucas and @NDEV for their guidance throughout the project. Their feedback, code review, were very important in improving the correctness of the checks.

A huge thanks to Patrick Hinchey for providing real flight logs, and to the whole ArduPilot community.

Project

The work is being integrated into: ArduPilot Methodic Configurator

Development repo: ArduPilot Log Analysis

7 Likes