Giter Club home page Giter Club logo

fmt_firmware's Introduction

FMT

GitHub license

中文页 |

Overview

Firmament Autopilot (FMT) is the first open source autopilot based on Model-Based Design (MBD). The FMT project is developed from the Starry Pilot open source flight control system, including an embedded flight control system FMT Firmware mainly implemented in C language and an algorithm model library with simulation framework FMT Model developed based on Matlab/Simulink .

Based on the FMT platform, the algorithm can be developed and verified more quickly. There is no need to manually write embedded codes anymore. You only need to graphically design the algorithm model in Simulink and then generate C/C++ code with one click. The generated code can be directly incorporated into the flight controller without modifying and writing any embedded code, which greatly improves the efficiency of algorithm development and verification.

Project homepage : https://github.com/FirmamentPilot

Architecture

FMT Firmware is the embedded part of the FMT autopilot. It adopts a hierarchical design mode, with loose coupling between layers and modules. Its architecture is shown in the figure below.

fmt_structure

It specifically includes the following parts:

  • Kernel layer: The kernel layer uses the real-time operating system RT-Thread, which provides multithread scheduling, semaphore, mailbox, message queue, memory management, timer, etc. DFS is the virtual file system provided by RT-Thread supporting with standard POSIX interface.
  • Driver layer: The driver layer provides hardware driver support, such as IMU, GPS, SD card, USB, etc and communication buses such as I2C, SPI, DMA, etc.
  • Hardware Abstraction Layer: HAL provides the unified read/write/control interfaces for the upper layer. It is convenient to add new device driver or port to different hardware platforms. At the same time, the hardware-independent driver logic can be implemented on the HAL layer, which simplifies the difficulty of driver development.
  • Module layer: The module layer provides most of the functions of the system. For example, the uMCN provides IPC functions based on the publish/subscribe model. The log module provides the functions of binary log, text log and boot log. The parameter module provides powerful parameter functions and supports command line/ground station online parameter tuning. And the parameters will also be saved in the log for the simulation model to read.
  • Task layer: Each Task is a separate thread (sub-threads can be created internally) to achieve independent functions. For example, the vehicle task will periodically execute INS, FMS and Controller to manipulate the vehicle.

Why FMT

Model-based design is a mathematical and visual method to design complex algprothms or other application in a graphical manner. The manual coding process has its advantages, but its disadvantages are becoming more and more obvious. Especially when the system becomes larger and larger, the function becomes more and more complicated, the algorithm module using handwriting becomes more and more difficult to maintain, and the security and portability of the code will inevitably become worse.

The core algorithm of FMT is developped on the Matlab/Simulink platform and inherits many advantages of the MBD development method, including:

  1. Greatly improve the efficiency of algorithm development, saving time and costs.
  2. Reduce errors in the manual coding process and improve system robustness.
  3. Greatly improve algorithm optimization and debug efficiency, simplify the system testing and verification procedures.
  4. Improve the maintainability and portability of the algorithm.

FMT Firmware is lightweight, easy to read and use, as well as excellent stability and real-time performance. In summary, the features of FMT Firmware include:

  • A lightweight flight control system written in C language, easier to use and secondary development.
  • Cross-platform development tool chain, supporting Windows/Linux/Mac OS.
  • Support MBD develop method, greatly improving the efficiency of development and testing.
  • Support the most popular open source flight control hardware.
  • Excellent real-time performance with time error < 1us.
  • Higher execution efficiency and lower CPU usage. Provide more space to improve the algorithm complexity and higher execution frequency.
  • Support Mavlink V1.0/V2.0 and ground station QGC, Mission Planner, etc.
  • Support hardware-in-the-loop simulation (HIl/SIH).
  • Highly modular, loosely coupled software architecture, easy to tailor and port to other hardware.

Supported Hardware

  • Pixhawk: version 2.4.6 or 2.4.8.
  • May support more hardwares in future.

Documentation

User Guide (CN)

Develop Environment

The following toolchain are needed for development.

  • Compiler: arm-none-eabi- toolchain (recommend: 7-2018-q2-update,other version are not well tested). download
  • Construction tool: Scons
    • Python 2.x (Python 2.7.x is preferable) is needed
    • Scons 2.x (Scons 2.3.6 is prederable) is needed: download
  • USB Driver (only needed for Windows): download

Build & Doanload Firmware

Please refer to the user guide.

Contributor

Big thanks to these contributor:

fmt_firmware's People

Contributors

jczou avatar yangjion avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.