This page details the high-level design behind the autopilot code.
RTOS
The main autopilot systems are built on FreeRTOS, an open-source Real-Time Operating System. FreeRTOS gives us the ability to run multiple concurrent tasks on a single embedded system, each of which has a priority and can "block" for a period of time while they wait for data. At any given time, the highest priority task that is not blocking will be running.
A few notes about developing for real-time systems:
- Treat timeouts as a design error. Most blocking OS functions on the autopilot allow (or require) specifying a timeout for the blocking operation.
Autopilot Drivers
Required:
- GPS
- XBee
- Altimeter
- IMU
- Interchip
- EEPROM
Optional:
- Airspeed
- Battery
- Ultrasonic
Safety Drivers
Required:
- PWM
- PPM
- Interchip
Autopilot Logic
Required:
- Task management
- PID
- Waypoint management
- Navigation
- Telemetry
- Autonomous level
- EEPROM storage
- Startup codes
Optional:
- Sensor fusion
- Landing/take off
- Multi-vehicle
Safety Logic
Required:
- Anonymous level
- Safety switch
- PPM disconnect
- Startup codes
- SPI heartbeat
0 Comments