TAKEOFF Mode (Plane)
Executive Summary
TAKEOFF Mode is a specialized autonomous mode designed to safely launch a fixed-wing aircraft. It handles the critical transition from "on the ground" (or in your hand) to "climbing away." It supports Hand Launches, Catapult/Bungee Launches, and Runway Takeoffs, managing throttle and attitude to prevent stalls and crashes during the most vulnerable phase of flight.
Theory & Concepts
1. The Catapult Constraint
Launching a plane by hand or bungee is a violent event.
- The Physics: The plane goes from 0 m/s to 20 m/s in less than a second.
- The Error: GPS signals are too slow to track this (GPS updates at 10Hz, but the launch is over in 100ms).
- The Solution: The Inertial Trigger. ArduPilot uses the High-Rate IMU (400Hz) to detect the exact millisecond you release the bungee or throw the plane. It only starts the motor after it confirms the plane is safely away from your hand.
2. Wing Leveling on Climb-Out
Most crashes happen in the first 5 seconds after launch.
- The Problem: Torque from a large prop can roll a small plane into the ground.
- The Logic: During the "Level Altitude" phase, ArduPilot overrides all pilot turn commands. It uses 100% of its roll authority to keep the wings flat until the plane is high enough to clear the ground.
Hardware Dependency Matrix
Takeoff mode relies on sensors to detect the launch event.
| Sensor | Requirement | Code Implementation Notes |
|---|---|---|
| Accelerometer | CRITICAL | Required to detect the launch acceleration (Hand/Catapult). TKOFF_THR_MINACC. |
| GPS | CRITICAL | Required to verify ground speed (TKOFF_THR_MINSPD) and track the climb path. |
| Airspeed | RECOMMENDED | Critical for Runway Takeoffs (TKOFF_ROTATE_SPD) to ensure the plane doesn't pitch up before it has flying speed. |
| Compass | CRITICAL | Required to maintain heading during the initial climb-out. |
Control Architecture (Engineer's View)
The logic operates as a staged sequencer.
- Stage 1: Waiting (Throttle Suppressed)
- The pilot switches to TAKEOFF mode and arms the plane.
- The prop does NOT spin. The controller holds the throttle at 0.
- It waits for a "Launch Trigger":
- Accel: Forward acceleration >
TKOFF_THR_MINACC(e.g., the throw). - Speed: GPS Ground Speed >
TKOFF_THR_MINSPD.
- Accel: Forward acceleration >
- Code Path:
Plane::auto_takeoff_check().
- Stage 2: Launch Detected (Throttle Ramp)
- Once triggered, the throttle ramps up (
TKOFF_THR_SLEW) to maximum (TKOFF_THR_MAX). - Delay: If
TKOFF_THR_DELAYis set, the motor start is delayed to protect the thrower's hand.
- Once triggered, the throttle ramps up (
- Stage 3: Initial Climb (Level)
- The plane holds the wings level (
LEVEL_ROLL_LIMIT) and a specific pitch (TKOFF_LVL_PITCH) until it reachesTKOFF_LVL_ALT. - This ensures it gains speed before trying to turn.
- The plane holds the wings level (
- Stage 4: Loiter / Mission
- Once it reaches
TKOFF_ALTorTKOFF_DIST, the mode completes. - Behavior: It typically enters a Loiter at the target altitude.
- Once it reaches
Pilot Interaction
- Shake to Wake: If
TKOFF_ACCEL_CNT> 0, you may need to shake the plane back and forth to "arm" the launch detector before throwing. - Abort: If the launch fails (e.g., bad throw), switch instantly to MANUAL or FBWA to kill the throttle or try to save it manually.
Failsafe Logic
- Crash Detection: If the plane detects a crash (high accel spike) immediately after launch, it disarms.
- Timeout: If the plane doesn't reach flying speed (
4 m/s) withinTKOFF_TIMEOUTseconds after trigger, it disarms to prevent the motor from burning out in the grass.
Key Parameters
| Parameter | Default | Description |
|---|---|---|
TKOFF_ALT |
50 | (m) Target altitude to reach before finishing takeoff. |
TKOFF_LVL_ALT |
20 | (m) Altitude below which wings are held level (no turning). |
TKOFF_THR_MINACC |
0 | (m/s/s) Acceleration threshold to trigger launch. Set to ~15 for hand launch. 0 = Trigger immediately (Runway). |
TKOFF_THR_DELAY |
0 | (1/10s) Delay between throw detection and motor start. Essential for pusher props! |
TKOFF_ROTATE_SPD |
0 | (m/s) For runway: speed at which to pitch up (rotate). |
Source Code Reference
- Mode Logic:
ardupilot/ArduPlane/mode_takeoff.cpp - Launch Detector:
Plane::auto_takeoff_check()