Skip to Content

Papers and prototypes from the bench

The engineering notes behind what we build and sell — published work, open repositories, and the packages that came out of them.

Filesystems & storage

fat12-engine: a dependency-free FAT12 write layer with atomic verify-after-write + rollback

A minimal, dependency-free FAT12 read/write layer bringing atomic verify-after-write and rollback to removable and embedded media with no OS filesystem stack and no journaling. Every multi-step operation is undo-logged, byte-compared after write, and restored to a byte-for-byte identical state on any failure.

Sagnik Ghosh 2026
Flight control

FCS Switcher: Push-Button Switching Between Betaflight, INAV, and ArduPilot on a Single Flight Controller

Closed vendor bootloaders normally lock a flight controller to one resident firmware, forcing a re-flash from a host computer every time a pilot wants to try a different stack. FCS Switcher removes that lock: a tap-and-hold on the BrainFPV Radix 2 HD's single BOOT button swaps between Betaflight, INAV, and ArduPilot with no hardware changes, no host computer, and no modification to the vendor bootloader itself. Getting there meant reverse-engineering the bootloader with nothing but probes from the running firmware and discovering it doesn't boot a fixed flash slot at all; it boots whichever cluster chain a private, hidden FAT12 filesystem points to. That insight collapses "switch firmware" into rewriting one file-allocation sector and one directory entry, an atomic operation of about 10 milliseconds instead of a multi-second slot copy. The result held up across more than 230 build-flash-bench iterations and around 90 root-caused failures, and all six directed switches between the three firmwares now run from the physical button alone.

Sagnik Ghosh, Kaustuv Dey, Evan Sarkar 2026
Numerical computing

exact-pi: a dependency-free TypeScript engine for exact decimal prefixes of π, triple cross-verified to ten million digits

Most JavaScript and TypeScript pi calculators either choke past a few thousand digits or quietly print wrong digits at the tail, because they round instead of proving the cutoff is exact. exact-pi is an ~800-line, zero-dependency TypeScript engine that computes provably exact decimal prefixes of π using the Chudnovsky series with binary splitting over native BigInt, reaching a million verified digits in under 30 seconds and ten million in under 40. A guard-band ambiguity test with automatic retry makes that cutoff unconditionally exact rather than merely probable. Correctness is cross-checked three independent ways spanning three centuries: digit-for-digit against Machin's 1706 arctangent formula, spot-checked in base 16 via 1995 Bailey-Borwein-Plouffe extraction, and matched against three independently published digit tables out to ten million places. The paper documents the rounding-versus-truncation failure mode with concrete examples and ships the implementation, test suite, and verification artifacts.

Sagnik Ghosh, Evan Sarkar 2026