Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VTOL Flight Computer

Flight-control firmware for a fixed-wing VTOL (vertical take-off and landing) aircraft, running on a Teensy microcontroller. It manages the full flight envelope — vertical hover, transition, and horizontal cruise — from onboard sensor fusion, and talks to a ground station over a long-range LoRa radio link.

Hardware target

  • MCU: Teensy (Arduino / PlatformIO framework)
  • Radio: LoRa @ 915 MHz (RadioHead) for ground-station telemetry and commands
  • Sensors: barometer (altitude), GPS (position/heading/speed), magnetometer (heading)
  • Actuators: 4× motors, 4× servos

Flight modes

The vehicle runs a small mode state machine and only actuates once armed from the ground:

Mode Behavior
IDLE Disarmed; waiting for the ground-station ARM command over LoRa
VERTICAL Hover / vertical control — holds a target altitude (barometer-driven)
HORIZONTAL Cruise — holds target pitch and roll

Architecture

Each subsystem is a self-contained module (.cpp/.h pair):

  • flight_computer.* — central loop; fuses sensors into a single FlightData state (altitude, pitch, roll, yaw, speed, heading, vertical speed, acceleration, per-motor power, per-servo angle)
  • flight_control_vertical.* / flight_control_horizontal.* — the two control loops
  • barometer.*, gps.*, magnetometer.* — sensor drivers
  • motors.*, servos.* — actuator outputs
  • telemetry.* — packs state for the LoRa downlink
  • main.cpp — init, arming sequence, and the mode dispatcher

Build & flash

Built with PlatformIO:

pio run              # build
pio run -t upload    # flash to the Teensy
pio device monitor   # serial telemetry

Safety

The aircraft boots disarmed. Motors and servos stay inert until the ground station sends ARM over the LoRa link, so it can't spin up on the bench by accident.

Status

Working firmware for the core sensing, control, and comms path. This is real flight-controls code — treat any live-vehicle testing with the usual RC/UAV safety practices (props off for bench tests, open field, spotter).

About

Flight-control firmware for a VTOL aircraft — barometer/GPS/magnetometer sensor fusion driving independent horizontal and vertical control loops.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages