Skip to content

thirstymelon/flight-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flight Controller

A modular UAV flight controller simulator written in Ada.

This project is an ongoing effort to design and implement a flight-control software stack using Ada's strong typing, package system, and reliability-focused language features.

The long-term goal is to evolve this codebase into a realistic flight controller simulator with navigation, guidance, telemetry, power management, propulsion control, sensor simulation, and autonomous flight capabilities.


Current Features

Flight Controller

  • Flight mode management
  • State transitions
  • Flight status reporting

Supported modes:

  • Standby
  • Takeoff
  • Hover
  • Cruise
  • Landing

Battery Management

  • Battery percentage tracking
  • Battery health classification

Battery states:

  • Normal
  • Low
  • Critical
  • Dead

Propulsion

  • Flying state detection
  • Motor running detection

Input Handling

  • Menu-driven control
  • Input validation
  • Exception handling

Architecture

modules/
├── power/
│   ├── Battery.ads
│   └── Battery.adb
│
├── propulsion/
│   ├── Motors.ads
│   └── Motors.adb
│
└── flight_controller/
    ├── Flight_Modes.ads
    └── Flight_Modes.adb

src/
└── main.adb

The project follows a package-oriented architecture where each subsystem owns its behavior and exposes a clean public interface.


Roadmap

Core System

  • Drone state records
  • Aircraft status modeling
  • System-wide type definitions

Sensors

  • IMU simulation
  • GPS simulation
  • Magnetometer simulation
  • Barometer simulation

Navigation

  • Position estimation
  • Waypoint navigation
  • Route planning

Guidance & Control

  • PID controllers
  • Altitude hold
  • Heading hold
  • Autonomous flight modes

Telemetry

  • Flight logging
  • Ground station communication
  • Real-time status reporting

Mission System

  • Mission execution engine
  • Return-to-home functionality
  • Autonomous mission profiles

Simulation

  • Flight dynamics
  • Environmental effects
  • Sensor noise modeling

Why Ada?

Ada is widely used in safety-critical and high-reliability systems where correctness, maintainability, and robustness are essential.

This project serves as a practical environment for learning:

  • Strong typing
  • Modular software design
  • State-machine architecture
  • Embedded-system development
  • Aerospace-oriented software engineering

Building

Requirements

  • GNAT
  • Alire

Build

alr build

Run

alr run

Status

🚧 Early Development

The current focus is building a clean and scalable architecture that can grow into a complete UAV flight-controller simulation platform.


Author

Lokesh (ThirstyMelon)

Learning Ada, embedded systems, avionics software architecture, and flight-control systems.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors