Crab UAV
Alpha

Flight Firmware, Written in Rust

Memory-safe autopilot firmware for STM32H7 flight controllers. 24-state EKF, 13 flight modes, VTOL support, and ArduPilot-compatible parameters — with zero heap allocation in the control loop.

24

EKF States

13

Flight Modes

1,500+

Tests

253

Parameters

Features

A complete autopilot stack with no_std Rust — from sensor drivers to navigation.

24-State EKF

Full sensor fusion: IMU at 400Hz, GPS, barometer, magnetometer, rangefinder, optical flow, airspeed, and dual-antenna RTK GPS heading. Wind and terrain estimation with innovation gating.

13 Flight Modes

Stabilize, AltHold, Loiter, Auto, Guided, RTL, SmartRTL, Land, Acro, PosHold, Circle, Brake, and Flip. ArduPilot-compatible mode numbers.

ArduPilot Compatible

Same parameter names (ATC_*, PSC_*, EK3_*), mode numbers, and MAVLink protocol. Works with existing GCS software.

Multi-Frame Support

QuadX, HexaX, OctoX, Plane, and VTOL with transition. Runtime vehicle-type selection via FRAME_CLASS with 16-channel output. DShot and DroneCAN motor protocols.

Safety Systems

Pre-arm checks, cylindrical geofence, configurable failsafes, autonomous land detection, and auto-disarm.

1,500+ Tests

Comprehensive unit and property-based testing with proptest. Criterion benchmarks, Monte Carlo fault injection, and Gazebo SITL. Every control loop, sensor driver, and state machine verified.

Specifications

Supported Sensors

  • ICM-20948

    9-DOF IMU + Magnetometer

  • ICM-42688-P

    High-performance IMU

  • ICM-20649

    High-G IMU (30g)

  • BMP280

    Barometer

  • BMP388

    Barometer

  • MS5611

    Barometer

  • u-Blox

    GPS receiver (RTK supported)

  • IST8310

    Magnetometer

  • Optical Flow

    Position hold without GPS

  • Rangefinder

    Terrain following + precision landing

  • Airspeed

    Fixed-wing airspeed sensor

  • ESC Telemetry

    Bidirectional DShot RPM/current/temp

Hardware Targets

  • Cube Orange

    STM32H743, primary target

  • Pixhawk 4

    STM32H743

  • Matek H743-Wing

    STM32H743

  • Gazebo SITL

    JSON + native lock-step modes

Part of the Crab UAV Stack

CrabStation

Cross-platform ground control station for ArduPilot, PX4, and CrabPilot.

CrabLink

Async MAVLink communication library built on Tokio.

Interested?

CrabPilot is in active development. Get in touch for early access.

Contact Us