AirMode (Copter)
Executive Summary
AirMode is not a distinct flight mode but a specific stabilization feature that can be enabled within modes like Acro, Stabilize, and AutoTune. Its primary purpose is to maintain full authority of the PID controllers even at zero throttle. This allows the vehicle to maintain its attitude during free-fall, inverted hang-time, or aggressive descents where the throttle is cut to minimum.
Theory & Concepts
1. The PID Decay Problem
In standard stabilization, when the throttle is at 0%, the flight controller reduces the authority of the PID loops. This is to prevent the drone from "twitching" or flipping over while it is sitting on the ground idling.
- The Downside: If you are flying high and cut the throttle to 0% to "free fall," the drone loses its ability to stay level. A gust of wind can tumble it.
- The Solution: AirMode. It forces the PID loops to stay at 100% authority regardless of throttle position.
2. Authority vs. Thrust
AirMode separates the concepts of Rotation (Torque) and Altitude (Thrust).
- Even if you want 0% net thrust, AirMode will spin up Motor 1 and spin down Motor 4 to create a roll.
- Result: You gain "Hang Time" stability. You can perform complex acrobatic tricks in a vacuum of throttle without losing control of the aircraft's orientation.
Hardware Dependency Matrix
AirMode is a pure software logic feature affecting the motor mixer.
| Sensor | Requirement | Code Implementation Notes |
|---|---|---|
| Gyroscope | CRITICAL | AirMode relies on gyro feedback to maintain attitude authority when motors are at idle. |
| Throttle | INPUT | AirMode modifies how the system reacts to low/zero pilot throttle input. |
Control Architecture (Engineer's View)
To understand AirMode, you must understand the ArduPilot Mixer strategy.
- The "Minimum" Mix: Normally, when the pilot drops the throttle to zero, the mixer switches to a "Minimum" state. In this state, the PID output is constrained to prevent the motors from spinning up significantly. This is a safety feature to prevent the drone from flipping over on the ground while idling.
- The "Manual" Mix (AirMode): When AirMode is active, the mixer is forced to stay in the "Manual" state (
ATC_THR_MIX_MAN) even at zero throttle.- Mechanism: The code sets
_throttle_rpy_mix_desired = _thr_mix_man. - Result: The PID loops retain full authority. If the drone tilts uncommanded (e.g., wind gust in freefall), the motors will aggressively spin up to correct it, even if the throttle stick is at bottom.
- Code Path:
update_throttle_mix()logic overrides the standard spool-down logic.
- Mechanism: The code sets
Activation Methods
AirMode is not selected like "Loiter" or "RTL". It is enabled via:
- Parameters: Setting
ACRO_OPTIONSbit 1 (Force AirMode) permanently enables it for Acro mode. - RC Switch: Assigning
RCx_OPTIONto84(AirMode) allows a toggle switch. - Arming: Assigning
RCx_OPTIONto154(ArmDisarmAirMode) enables it immediately upon arming.
Failsafe & Safety Logic
AirMode introduces a specific risk profile, particularly during landing.
- Landing Bounce:
- Risk: When the drone touches the ground, the impact creates a sudden gyro spike (shock).
- Reaction: In standard modes, zero throttle dampens the reaction. In AirMode, the P-term sees this spike as an error and commands a motor surge to "correct" the attitude. This causes the drone to bounce or "freak out" on the ground.
- Mitigation: ArduPilot increases the landing detector delay (
LAND_AIRMODE_DETECTOR_TRIGGER_SEC, default 3s) to prevent false-positives, but this means you must be ready to disarm instantly upon touchdown.
- Safety Recommendation: It is highly recommended to assign AirMode to a switch so you can turn it OFF just before landing to ensure a smooth touchdown.
Key Parameters
| Parameter | Default | Description |
|---|---|---|
ATC_THR_MIX_MAN |
0.1 | (0.1 - 0.9) Defines the ratio of throttle vs attitude authority. Higher values give the PID loop more "headroom" to spin up motors at zero throttle. Typical AirMode feel requires 0.5+. |
ACRO_OPTIONS |
0 | Bitmask. Set bit 1 to "Force AirMode" in Acro. |
LAND_AIRMODE_DETECTOR_TRIGGER_SEC |
3.0 | Time (seconds) the landing detector waits before declaring a landing when AirMode is active. |
Source Code Reference
- Mixer Logic:
Copter::update_throttle_mix() - Attitude Control Interface:
AC_AttitudeControl_Multi::set_throttle_mix_man()
Practical Guide: The "Landing Switch"
The safest way to fly AirMode is to have a dedicated switch.
- Assign Switch: Set
RC7_OPTION = 84(AirMode). - Takeoff: Take off in Stabilize/Loiter with AirMode OFF.
- Flight: Once airborne, flip the switch ON. Enjoy the hang time.
- Landing:
- Approach the ground.
- When 1 meter high, flip AirMode OFF.
- Land normally. The motors will settle peacefully.
- Why? This prevents the "P-Term Explosion" where the drone bounces violently if it hits the ground while AirMode is active.