Engineering
8 pieces · Long-form field reports from building real systems — flight firmware, simulators, RTOSes, and CPU models — and the bugs that live where the math meets the machine.
-
Eight Bugs Between a File and the Ground: Debugging Vayu's Transfer Stack on Hardware
June 24, 2026I wanted to copy a file off the flight controller's SD card and get the same bytes back. Small files worked; anything past a kilobyte stalled or came…
-
Cutting the Cable: Reading Vayu's First Wireless Rig Log
June 17, 2026We had logged the flight controller on the bench before — but always down a USB cable, which is exactly what kept it pinned to the bench. A new…
-
From Mesh to Motion: The Mechanics and Numerics of a Flight Simulator
June 17, 2026vsim_d is the physics daemon that flies Vayu's real firmware in software. A field report from the seam where Newton–Euler rigid-body mechanics meets…
2026
-
A Heap Without a Tail: A TLSF Allocator for VaiOS, and Teaching QEMU to Measure It
VaiOS's heap is fast on average and resists fragmentation — but its malloc has a worst case that grows with the heap, and it runs with interrupts off, which makes it an interrupt-latency problem in disguise. I gave the kernel a second allocator — TLSF, O(1) in the worst case — behind a swappable backend interface, so either can be selected from config. Then I tried to measure the difference under QEMU and found the cycle counter was fake. This is how I made the measurement honest: a real time source from semihosting, and a deterministic metric that doesn't need one at all.
-
Eight Bugs Between a File and the Ground: Debugging Vayu's Transfer Stack on Hardware
I wanted to copy a file off the flight controller's SD card and get the same bytes back. Small files worked; anything past a kilobyte stalled or came back subtly wrong, non-deterministically. This is the hunt that followed — an isolation ladder that exonerated the SD card, a plausible theory I ruled out by measuring instead of guessing, and two bugs with the exact same shape: a synchronous primitive racing an asynchronous event that only collides under a preemptive scheduler. Eight fixes later, the round-trip is byte-perfect to 64 KB.
-
Cutting the Cable: Reading Vayu's First Wireless Rig Log
We had logged the flight controller on the bench before — but always down a USB cable, which is exactly what kept it pinned to the bench. A new UDP/WiFi telemetry bridge cut that cable and let the airframe move freely on a rig for the first time. This is a frame-by-frame read of that first untethered log: the transport, an attitude loop that shakes itself apart under its own feedback, and the sensors and telemetry bugs underneath.
-
From Mesh to Motion: The Mechanics and Numerics of a Flight Simulator
vsim_d is the physics daemon that flies Vayu's real firmware in software. A field report from the seam where Newton–Euler rigid-body mechanics meets RK4, quaternion drift, impulse contact, and a hard-real-time loop — including the cleanest way I know to turn a triangle mesh into an inertia tensor, and the bugs where the physics was right but the numerics (or the systems) lied.
-
I Wrote an FFT to Play Music: An Over-Engineered Terminal Player
The browser ate gigabytes to play a song, so I wrote a 2,000-line terminal music player with no pip deps. Along the way it grew a hand-rolled Fourier transform, a filesystem-as-LRU cache, two mpv processes, and an LLM that scores my songs by vibes. A field report on accidental over-engineering.
-
Does an AVR Need SIMD? A Roofline Study That Said No
I set out to design a wide-SIMD coprocessor for an 8-bit MCU. Then I measured twelve real kernels in a validated gem5 model. A roofline analysis talked me out of the vector unit — and pointed at what to build instead.
-
Teaching a Drone to Tune Itself: Closed-Loop PID Autotuning in SITL
We built a closed-loop PID autotuner that flies its own experiments in simulation and searches the gain space — eight optimizers, a chatter-aware cost, and two failure modes that looked solved but weren't. A deep dive into the system, the algorithms, and the fixes.
-
Benchmarking VAIOS Against FreeRTOS and Zephyr
We measured our in-house real-time operating system against FreeRTOS and Zephyr on the same flight-controller hardware — scheduling, IPC, memory, timing, and footprint. Here is the full set of results.