Autonomous vehicle / flight software & power electronics
2026 – presentANVIL H1
ANVIL H1 is an autonomous vertical-flight test vehicle: a hopper that takes off, hovers and lands under its own thrust, from two counter-rotating propellers on a thrust-vectoring mount, and that has flown nine test campaigns since August 2026, captive, free and indoors. With Jean Herail, I co-developed its flight software, whose hardware-independent flight logic has run in every flight test. I built the CI/CD pipeline that tests that logic and packages the firmware, and I designed VITALITY, the power board of the avionics, over six iterations.
My contribution
- Flight softwareCo-developed with Jean Herail, the flight-software lead: the dual-core architecture on the RP2040, the hardware-independent flight logic in C, the hardware abstraction around it, the safety layer and the host tests. The campaign firmware that flies H1 links the same flight logic.
- CI/CDA GitHub Actions pipeline that checks the build manifests, runs the host-side C and Python tests, cross-compiles the 45 RP2040 targets with the team's pinned toolchain and publishes flash-ready artifacts with their checksums.
- Power electronicsVITALITY, the board that powers the avionics, designed end to end over six iterations: battery sizing, protection, 5 V regulation, battery sensing, PCB routing and reflow soldering.
- Landing visionThe sizing of the marker-detection network behind a ground-camera 3D pose estimate of the vehicle.
- Ground integrationA measured study of MAVLink and QGroundControl against H1's own link, and the integration decision that followed.
- Ground-distance sensingWith Maximilien Boudet, the bench integration of a downward-looking TFS20-L LiDAR.
The vehicle
- StructureLightweight airframe: an open top cage over the avionics column, and a bulkhead that carries four long legs.
- PropulsionElectric and vertical: two counter-rotating propellers under the vehicle.
- Thrust vectoringA gimbal vectors the thrust in pitch, for forward and aft attitude, and in yaw, for heading control during the hover.
- Avionics stackFlight computer, telemetry and power.
Flight software architecture & hardware abstraction
H1's flight computer, RESILIENCE, is built around an RP2040: two Cortex-M0+ cores, no hardware floating-point unit, and every peripheral reached through I2C, UART, SPI, ADC or PWM. The control loops must run at a fixed rate, while reading sensors, exchanging radio frames and writing the log all take a variable time. The flight software therefore gives each core one kind of work.
Two cores, two kinds of work
Core 0 does everything that touches a bus and may wait: sensor tasks read the IMU and the barometer over I2C, the navigation task turns their samples into altitude, vertical speed and attitude at 100 Hz, the link task talks to the radio module over UART, and the log task drains records to the microSD card over SPI. Core 1 runs the control task alone, at the highest priority and at 100 Hz: the mission sequencer and the vertical, horizontal and attitude loops run as decimated steps of a single control tick, so their phase relationship is fixed and testable, then the safety filter and the actuator outputs.
The two cores share memory, not buses. Each producer publishes a fixed-size snapshot through a single-writer seqlock, so the control task always reads the latest coherent estimate without taking a lock; ground commands reach it through a FreeRTOS queue that it polls without waiting, and the control state goes back the same way for telemetry and the log. When a sensor stops publishing, its snapshot ages: the safety envelope turns that age into an arming block on the ground or an abort in flight, instead of stalling the loop.
Hardware abstraction
The flight logic is a C library with no hardware dependency. On the way in, the drivers hand it measurements in SI units, each with its age and a validity flag. On the way out, it produces physical quantities: a thrust in newtons and moments in newton-metres. One mapping layer is the only place where those become hardware units.
- ThrustThe analytic inverse of the measured quadratic thrust curve gives the ESC command. A 15 % floor keeps the motors spinning in flight, because the bench measured about 0.13 to 0.15 s of spool-up delay that would otherwise be added to the next command.
- MomentsA desired moment becomes a gimbal deflection, δ = M / (F · lever arm), clamped to the gimbal's travel and converted to a servo pulse width.
- LimitsEvery clamp sets a saturation flag that the telemetry reports, so a saturated loop is visible in the log rather than silent.
Safety and testability
Safety has the last word: every actuator command passes the safety filter after the control laws, aborts are latched with their reason, flight phase and tripping value, and the 200 ms hardware watchdog is fed only by the control task, so a stalled control loop reboots the chip into its disarmed state.
Because the flight logic never touches a pin, the same C source compiles for the RP2040 and for a computer. The host suite drives it against a simulated vehicle: closed-loop flights, mission sequencing, actuator mapping, filters and the safety envelope, 233 checks today. The campaign firmware that flew HOP-TEST-01 to 09 links the same library and calls the same control step.
Campaign firmware
The same flight logic runs in two firmware lines, developed with the team and kept separate: the general flight software described above, on FreeRTOS SMP, and the campaign firmware that flies the hops, bare-metal on both cores of the RP2040. The functions below are those of the campaign firmware.
- MeasurementsLSM6DSV16X IMU with on-chip fusion (quaternion, gyroscope, accelerometer), BMP390 barometer, and battery voltage through an ADS1115 on the PDU divider, all over I2C.
- ExecutionCore 1 runs sensors, estimation, control, actuators and the microSD log; core 0 runs the radio link and the console. A shared snapshot and a command ring connect them.
- Estimation and controlAttitude from the fused quaternion, vertical speed from a complementary barometer and IMU filter, x/y by dead reckoning. PID loops: attitude at 100 Hz, vertical speed at 50 Hz with gravity feed-forward and thrust-curve inversion, horizontal position at 10 Hz.
- States and faultsAscent, hover, descent, terminal and landed phases; a launch checklist; automatic aborts on tilt, altitude, vertical speed, battery voltage and stale sensors.
- Actuators and logsTwo ESCs for the counter-rotating motors, two thrust-vectoring servos in open loop and a buzzer; a 50 Hz CSV log per hop on microSD and a binary telemetry frame for the ground.
Firmware versions and ground tools
Versions
- Flight software
- FreeRTOS SMP with the Pico SDK: control alone on core 1 at 100 Hz; navigation, sensors, radio link, logging and console on core 0. Arming stays blocked until the hardware is confirmed.
- Test 39
- Campaign firmware with the LoRa link, telemetry on the pad only. Flew campaigns 1 to 6, from late August to late September 2026.
- Test 42
- Same source with the Wi-Fi bridge: 100 Hz telemetry in flight, soft-landing features and an emergency-landing mode.
- Ground and bench tools
- Log scoring and gain tuner, Wi-Fi ground station with abort and land commands, host software-in-the-loop tests, mission compiler.
CI/CD: test the flight code, package the firmware
Before a new firmware reaches the vehicle on a test day, the team needs to know that every target still builds with the toolchain used for flashing, and that the flight logic still behaves. I built a GitHub Actions pipeline for the firmware repository that answers both questions on every push, without hardware.
- Manifest checksThe fields that ANVIL-Pesto, the team's build-and-flash tool, reads in its project and tool manifests; every declared CMake target must exist in CMake's own model of the build; mission headers must regenerate identically from their TOML sources.
- Host testsThe GNC C suite, compiled with the host compiler on the real flight sources, 233 checks; and 20 Python suites, 823 tests, covering the ground station, the Wi-Fi link protocol and the bench tools, with the Qt windows running offscreen.
- Cross-compilationArm GNU 14.2.rel1, pico-sdk 2.1.1 and FreeRTOS V11.2.0, pinned to the versions the flashing tool uses and verified by hash; all 45 RP2040 targets built with zero compiler warnings.
- ArtifactsEvery UF2 image and the flight ELF files, with SHA-256 sums and a build manifest recording the commit and the tool versions, uploaded only when every check passed. Reports are kept even when a job fails.
- CostAbout 6 minutes per run, and 4.6 MB of artifacts kept for 7 days.
What it caught
The first runs, on a clean machine, exposed an undeclared Python dependency, missing Qt system libraries, and two GNC tests whose expectations had not followed a change of filter constant in the GNC configuration. I then injected six faults on purpose in throw-away copies: a compile error in the flight code, a wrong discretisation of the PID derivative filter, the same error in the shared low-pass filter, a Wi-Fi ground link that accepts frames without a valid authentication tag, a manifest target that exists only in a CMake comment, and a mission file edited without regenerating its header. Each one failed the job that should catch it.
Runs on a dedicated branchNext step: hardware-in-the-loop testing.
Onboard system and ground link
Telemetry and ground integration
Wi-Fi bridge (ESP32-S3)
- ProblemOver LoRa, the 42-byte telemetry frame took about 113 ms of airtime: 3 Hz on the pad and no downlink in flight.
- ChangeAn ESP32-S3 on the flight computer's UART relays ANVIL Wi-Fi Link frames (COBS framing, CRC-16) over UDP with an 8-byte HMAC tag. It never parses the application frames.
- StatusBuilt by the team and validated on the bench with no frame lost at 50 and 100 Hz. The Wi-Fi campaign firmware sends telemetry at 100 Hz in flight.
MAVLink and QGroundControl: an integration study
MAVLink and QGroundControl are the standard pair of the PX4 and ArduPilot world, so the question came up for H1: should the vehicle speak MAVLink, or should the team's ground station give way to QGroundControl? I studied the protocol in early September and the ground-station application on 8 September, on a software bench, against criteria fixed before the runs.
- BenchA 100 Hz replay of the H1 GNC model, a simulated vehicle and an emulated Wi-Fi link with loss, jitter and outages. Six telemetry chains were compared, from H1's native frame to standard MAVLink messages, signed or not, a private MAVLink message and a ground gateway, with QGroundControl 5.1.5 behind the gateway.
- MAVLink on the linkAt equal information and rate, standard MAVLink messages took 4.4 to 5.9 times the traffic of H1's 42-byte frame (311 to 416 kbit/s against 71, for a Wi-Fi link proven to 160) and added 3.4 ms of median latency, mostly in the 921.6 kBd UART. Signed, MAVLink drops packets that arrive out of order: 54 % were delivered under 50 ± 30 ms of jitter. A private message is as light as the native frame, but QGroundControl cannot display it.
- Gateway on the groundConverting the decoded native frames to MAVLink on the ground added 0.3 ms, passed every sample without error and reproduced the same command acceptances, refusals and timeouts as the team's station, without touching the vehicle.
- QGroundControlBehind the gateway it showed flight state, altitude, voltage, operator messages and sensor health, and offered arming. For H1 it lacked the launch command and the two distinct emergency stops, Rescue and Kill, that the team's station provides, used 44 % of a core, and showed altitude 163 ms after the vehicle snapshot.
- DecisionKeep H1's native link and ground station, and keep the ground gateway as an option for a second display or for MAVLink logs. The verdict is specific to H1's link budget and two-abort safety model, not a judgement on MAVLink or QGroundControl in general. It is not a PX4 port.
Study completeNative link retained; ground gateway optional.
Attitude data
The microSD log carries three Euler angles in ANVIL's own axis convention, and the live frame carries two of them. A 3D attitude view can be rebuilt from the logs once the convention is converted, and only partially from the live stream; the quaternion stays inside the firmware.
Landing vision: 3D pose estimation
For a precise landing, H1 needs its horizontal position, which an IMU alone can only dead-reckon. The design keeps that computation off the vehicle: a camera on the ground looks up at the hopper, finds the four landing-leg markers, whose geometry is known, and estimates the vehicle's pose; the ground station then sends the lateral fix up to the vehicle, which takes the camera as its horizontal reference below 2 m above the pad.
The detector is a compact U-Net developed by the team. It runs on the whole 1080p frame, predicts a single heatmap of the four marker centres, and is exported to ONNX for OpenCV DNN, with the classical detector as a fallback; it was trained on synthetic perspectives and backgrounds plus frames auto-labelled from real video. The pose then comes from the camera model: given the calibrated intrinsics and distortion, it is the orientation and position that best explain the four observed markers, the reprojection-error objective below, solved with solvePnP.
: known position of marker on H1 · : marker centre detected in the image · : projection with the camera calibration and distortion · : orientation and position of the vehicle in the camera frame.
My part: sizing the network
The network's 3 × 3 convolutions hold a number of weights that grows with the square of its first-layer width b, so the width setting directly trades detection quality against what a ground computer can run on every frame. I analysed that parameter budget and selected the width:
With b = 16, the convolutions carry 1.22 million weights and about 7.2 billion multiply-accumulates per 512 × 288 input frame, against 19.6 million weights and 114 billion at b = 64.
Results on the calibration target
- Detection
- 311 of 313 labelled real frames, 99.4 %, at a 0.15 threshold.
- Corner error
- 0.88 px mean, 1.59 px at the 95th percentile.
- Full video
- 1,220 of 1,259 frames detected, 96.9 %.
- Throughput
- About 22 frames per second for the full 1920 × 1080 pipeline on a Mac.
- Calibration
- fx ≈ fy ≈ 1055 px at 1920 × 1080, 1.0 px RMS reprojection over 12 views. The lens's 85° rating is its horizontal field of view: read as diagonal, every distance would come out about 12 % too far.
Validated on a calibration targetNext: footage of the vehicle's own leg markers and a fine-tune.
Power electronics: the VITALITY board
VITALITY distributes the 3S flight pack to the avionics: 5 A fuse, power switch, reverse-polarity protection and a 5 V buck converter for the flight computer, the servos and the Wi-Fi bridge, with battery-voltage sensing. The ESCs run directly from the pack. I designed the board end to end over six iterations, IT1 to IT6: sizing the battery and the power path, choosing the protection and the regulation, laying out and routing the PCB, and assembling it by reflow soldering. An earlier iteration flies on H1.
- Bench findingThe battery reading came out about 0.45 V low: the sensing divider sat after the Schottky protection diode, whose drop grows with current. The flight firmware compensates with a fixed 382 mV offset.
- IT6 redesignBattery sensing moved upstream of the protection, a PMOS transistor replacing the Schottky for reverse-polarity protection, an ADS1115 converter read over I2C and a 3.3 V regulator for the sensing supply. Converter and transient studies in SIMBA; in LTspice, IT6 drops 89 mV at 2 A instead of 670 mV through the diode. Routed in KiCad, with 57 of 57 blocking layout checks passed.
- ReuseThe same power architecture was resized and reused on another embedded product.
- DocumentationIT5 and IT4 schematics as PDF on the VITALITY page.
PDU documentation
Ground-distance sensing: LiDAR bench integration
Near the ground, exactly where landing happens, the barometer is at its weakest: propeller wash and ground effect disturb the pressure, and campaign 6 read altitude estimates between −0.20 and +0.44 m at contact. A single-point direct time-of-flight LiDAR looking down measures the height above the ground directly. With Maximilien Boudet, I brought the Benewake TFS20-L (DFRobot SEN0672) onto the bench.
- FirmwareA flight-computer test firmware that relays the sensor's frames to the computer over UART and sends its version, frame-rate and output commands. The frame rate is sent only when it changes, because the sensor writes every setting to its flash.
- DecoderA dependency-free Python core that splits the 9-byte frames, verifies their checksum, flags readings below the signal-strength threshold as substitute values, and computes a one-second mean and standard deviation; unit tests check it against the C source.
- DisplayA live window, launched from ANVIL-Pesto, with the distance, its one-second statistics, the frame rate actually received and the signal strength.
- NextComparison against a ruler, fusion with the barometric altitude in the estimator, then flight validation, on a working horizon to February 2027.
Bench integrationEstimator fusion is the next step.
Tests and iterations
Campaigns 1 to 6 flew the LoRa campaign firmware between late August and late September 2026.
First flight weeks
Team records note a 2.5 m free fall on 28 August that broke the lower structure; an abort cuts the motors by design. The team reprinted the lower chassis and legs with aluminium rods, made the altitude and vertical-speed aborts switchable and kept the log recording after an abort. Later campaigns flew with these changes, and a touchdown detector was then checked offline: it fired on all 10 powered landings in 30 logged hops and never in free air.
Flight campaigns
Dates and results from ANVIL's public campaign log.
3 Jun – 22 Aug 2026
STATIC-FIRE-01 to 07
Propulsion static fires
First static fire on 3 June, thrust characterisation in June, engine qualification on 27 June, propulsion and thrust-vectoring static fire on 9 August, requalification on 22 August.
24–27 Aug 2026
HOP-TEST-01 to 03
Initial captive hops
H1 held by two test ropes on the captive rig.
27–28 Aug 2026
HOP-TEST-04
First free-flight attempts
Mixed results; flight 3 crashed.
8 Sep 2026
HOP-TEST-05
Captive tests after the TVC repair
Non-nominal; no free flight attempted.
27 Sep 2026
HOP-TEST-06
Repeatable free hops
Free flights completed, with a manual engine shutdown after touchdown.
3 Oct 2026
HOP-TEST-07
Touchdown detection and a longer hover
Flights completed; about 29 m of drift over a 10 s hover.
8–9 Oct 2026
HOP-TEST-08
Emergency-landing verification
Verification conducted; the drift persisted.
9 Oct 2026
HOP-TEST-09
Indoor flights, SUPAERO drone cage
Flight 1 nominal; flight 2 interrupted to limit lateral drift. Analysis in progress.
Next
HOP-TEST-10
In preparation
Priorities: altitude estimation, hover oscillations and lateral drift.
Campaign log and videos
Software and avionics milestones
Jul 2026
Flight software V1
Co-developed with Jean Herail
Dual-core architecture, hardware-independent flight logic, safety layer and host tests.
24 Aug 2026
First captive hops
On the V1 flight logic
The campaign firmware links the same library from its first flights.
Sep 2026
MAVLink and QGroundControl
Integration study
MAVLink in early September, QGroundControl on 8 September; native link retained, ground gateway optional.
3 Oct 2026
HOP-TEST-07
Touchdown detection in flight
Automatic touchdown detection and engine shutdown flown.
9 Oct 2026
HOP-TEST-09
Indoor flights
First flights in the ISAE-SUPAERO drone cage.
28 Oct 2026
LiDAR bench firmware
With Maximilien Boudet
TFS20-L test firmware, frame decoder and live display.
30 Oct 2026
CI/CD pipeline
Firmware verification
Green run: 45 RP2040 targets, 233 C checks, 823 Python tests, flash-ready artifacts.
To Feb 2027
Roadmap
Next
LiDAR fusion with the barometric altitude estimate, then flight validation.
Partners
ISAE-SUPAERO is an official partner of ANVIL: it supports the team and lends its drone cage for indoor flights, where HOP-TEST-09 flew on 9 October 2026. SIMBA provides its power-electronics simulation software free of charge for my simulations.













