Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/PX4/PX4-Autopilot/llms.txt

Use this file to discover all available pages before exploring further.

PX4 supports a large set of flight modes — from fully manual stabilized flight to GPS-assisted position hold to fully autonomous mission execution. Rather than activating modes through a ground station during flight, you map each mode to a specific position of one or more switches on your RC transmitter. This page explains how the mode channel system works, how to configure mode assignments in QGroundControl, and which modes to assign depending on your experience level.
Complete RC radio calibration before configuring flight modes. QGC will not display the mode-to-switch mapping UI until the radio is calibrated and the channel values are valid.

How PX4 flight mode switching works

PX4 reads a single RC channel (the mode channel) and maps PWM value ranges to flight modes. Each distinct switch position on your transmitter produces a different PWM value, and PX4 selects the corresponding mode. You can assign up to six flight modes using one mode channel. In addition to the main mode channel, PX4 supports dedicated single-channel assignments for:
  • Kill switch — immediately stops all motor outputs regardless of the active mode.
  • Return switch — triggers Return to Launch (RTL) regardless of the active mode.
  • Offboard switch — toggles offboard (companion computer) control mode.
The kill switch is independent of the mode channel. Assign it to a distinct, easily reachable switch that you will not accidentally activate. A spring-loaded momentary switch is a good choice.

RC channel mapping

Your transmitter must encode switch positions as distinct PWM values on a single channel. Most modern transmitters let you do this through their mixer or logical switch system.
A 3-way switch directly assigned to a channel produces three PWM values — typically around 1000 µs, 1500 µs, and 2000 µs. This maps cleanly to three flight modes and requires no transmitter programming beyond assigning the switch to the channel.On a FrSky Taranis, open the MIXER page, scroll to the channel you want to use (e.g., CH5), press ENT to edit it, and set the Source to the desired switch (e.g., SD).

Assigning modes in QGroundControl

1

Open Flight Modes setup

Connect your vehicle and turn on your RC transmitter. In QGC, navigate to Q icon > Vehicle Setup > Flight Modes.
2

Select the mode channel

In the Flight Mode Settings section, open the Mode channel dropdown and select the RC channel that your transmitter switch is mapped to (e.g., Channel 5).Toggle your switch through all positions and watch the Channel Monitor at the bottom of the screen. You should see the channel value change with each switch position.
3

Assign a flight mode to each switch position

As you move the switch, QGC highlights the mode slot corresponding to the current switch position. Use the dropdown for each highlighted slot to select the flight mode you want to activate at that position.Only slots that correspond to real switch positions will be used — unused slots can be left unassigned.
4

Assign dedicated switches (optional)

Scroll to the Switch Settings section. Use the dropdowns to assign independent RC channels for the Return switch, Kill switch, and Offboard switch if you have spare switches and channels on your transmitter.
5

Verify the assignments

Toggle each switch on your transmitter and confirm in QGC that:
  • The channel monitor shows the value changing.
  • The correct mode name turns yellow (active) in the mode slots list.
All values save automatically as you make changes — there is no separate save step.
The right combination of flight modes depends on your experience level and mission type.
If you are new to PX4 or to the specific airframe, keep your mode set simple and focused on modes that help you recover from mistakes.
Switch positionModePurpose
Position 1PositionGPS-assisted horizontal position hold. Sticks control velocity. The easiest mode to fly and land from.
Position 2AltitudeBarometer-based altitude hold. No GPS position hold — vehicle can drift horizontally in wind. Useful as a step toward manual flying.
Position 3ReturnAutomated return to the launch point and landing. Your primary recovery mode if you lose orientation.
Also assign Return to a dedicated switch so you can trigger it instantly from any mode without scrolling through the mode channel positions.
Do not assign Acro or Manual mode as your primary modes until you have practiced recoveries extensively in Position mode. A Stabilized or Acro mode vehicle will not hold position against wind and can drift out of range quickly.

Available flight modes reference

GPS-assisted mode where horizontal position is held when the sticks are centered. Moving the sticks commands a velocity, not a direct attitude. The vehicle stops and hovers when you release the sticks. This is the recommended primary mode for beginners and for any situation where you need reliable station-keeping.
Barometer-based altitude hold. Vertical position is stabilized but horizontal position is not. In wind, the vehicle drifts laterally. The throttle stick commands climb/descent rate rather than thrust directly.
Attitude-stabilized mode. Roll and pitch sticks command the desired angle rather than angular rate. The vehicle self-levels when you release the sticks, but does not hold position or altitude automatically. Useful for proximity flying and sport use.
Rate control only. Sticks command angular rate directly. The vehicle does not self-level. Requires significant pilot skill. Used for aerobatics and freestyle flying.
The vehicle climbs to a safe return altitude (set by RTL_RETURN_ALT), navigates directly to the home point (the location where the vehicle was armed), and lands. The exact behavior — including whether it loiters before landing and the landing descent rate — is configurable via RTL_* parameters.
Executes a pre-uploaded waypoint mission. The vehicle navigates autonomously through each waypoint, executing any associated actions (photo trigger, speed change, loiter, etc.). Mission upload is done through QGC’s Plan view before arming.
The vehicle stops and holds its current position and altitude using GPS. Equivalent to a manual GPS loiter. Useful as a pause during autonomous operations.
Setpoints are provided by an external source — typically a companion computer — via MAVLink SET_POSITION_TARGET_* or SET_ATTITUDE_TARGET messages. PX4 applies its own inner-loop control but the outer-loop guidance comes from the external source. If the setpoint stream stops, PX4 triggers the offboard loss failsafe defined by COM_OBL_ACT.

Key parameters for mode switching

ParameterDescription
RC_MAP_FLTMODERC channel assigned as the main mode channel.
RC_MAP_KILL_SWRC channel for the kill switch.
RC_MAP_RETURN_SWRC channel for the dedicated Return switch.
RC_MAP_OFFB_SWRC channel for the Offboard mode switch.
COM_RC_LOSS_TSeconds before RC loss triggers a failsafe (default: 0.5 s).
RTL_RETURN_ALTMinimum altitude (m above home) used during Return mode.
COM_OBL_ACTAction when Offboard mode setpoints are lost: hold, return, or land.

Build docs developers (and LLMs) love