Flight control software written in rust, aims to provide more convenience for developers and better OSD experience for users.
There are some popular flight-control software like Betaflight, INAV, PX4 and ardupilot, which is indeed mature and stable, while programming language they're using is C/C++ which is a bit of outdated, and besides:
- all of them provides an ugly OSD
- Betaflight and INAV is written in C, and codestyle is not very good
- PX4 and ardupilot uses RTOS for concurrency, but with async and interrupt based thread RTOS is no longer nessesary, and we'll achieve minimum latency
- being lack of package manager their repository is huge, full filled with self made wheels
In conclusion, I want to customize my own flight-control software while not willing to use C/C++.
Here's a sample OSD output:
Implemented
- Component
- IMU
- Logger
- YAML-like config
- software interrupt based event
- FCS
- PWM & ESC
- PID
- Law protection
- INS
- Displacement integral
- Complementary filter
- IO
- USB console serial
- DMA buffer descriptor
- OSD
- MAX7456 (With XMODEM font upload)
- Telemetry page for troubleshooting
- Sensor
- MPU6000
- Gyroscope/Accelerometer
- Battery Voltage ADC
- Barometer
- protocol
- SBUS Receiver
- GNSS NMEA Protocol
- GNSS UBX Protocol
- misc
- Simulator
WIP
- AP
- Auto-throttle
- Waypoint navigation with failsafe
Future
- AP
- HDG/ALT hold, ALT hold
- IO
- SDCARD read & write
- DMA based SDCARD read & write
- logging
- Blackbox
- driver
- Magnetometer
- DMA based I2C
- QMC5883L
- INS
- More reliable calibration
- Extended kalman filter
- protocol
- Mavlink
- misc
- Camera distortion adaption
Priority | Module |
---|---|
Systick | Software interrupts |
Immediate | Serial RX, ESC and Servo |
Sensor | USART DMA and Sensor Interrupt |
System | SPI/I²C DMA |
Telemtry | OSD |
Main | LED/CLI |
graph LR
subgraph Sensors
Accelerometer
Gyroscope
Magnetometer
style Magnetometer stroke-dasharray: 5 5
Barometer
GNSS
end
Accelerometer -->|"Acceleration(RAW)"| IMU
Gyroscope -->|"Gyro(RAW)"| IMU
Magnetometer -.-> |Magnetism| IMU
GNSS -->|Heading/Course| IMU
Barometer -->|Pressure| Altimeter
subgraph INS
Speedometer --> Positioning
end
IMU -->|"Acceleration(CAL)<br/>Attitude"| Speedometer
GNSS -->|datetime| System-clock
GNSS -->|V/S<br/>G/S| Speedometer
GNSS -->|Coordinate| Positioning
Altimeter -->|Altitude| Variometer
Altimeter -->|Altitude| Positioning
Variometer -->|V/S| Speedometer
subgraph FCS
PIDs --> Servos
end
RC -->|Input| PIDs
IMU -->|"Gyro(CAL)"| PIDs