Contents

The airframe configuration file is located in conf/airframes and contains
all the hardware and software settings for an aircraft. All gains, trims, and behavior settings are defined with standard XML elements. Optionally you can also add a raw Makefile section.

Firmware and Hardware definitions

This is one example of a pretty standard quadcopter firmware definition:

Select your Board

The airframe file must include the description of the controller board and it's low-level settings.
This is done in the firmware section by specifying the board attribute for the target "ap" (autopilot).

Motor Arming

By default the motors are armed with zero-throttle and full yaw. The motors are never started if AHRS is not aligned (disable it with AUTOPILOT_DISABLE_AHRS_KILL).

Other arming sequences can be configured:

USE_KILL_SWITCH_FOR_MOTOR_ARMING defined (to 1):

switch kill switch off to arm the motors

if kill switch is off during startup, you need to kill again first, then unkill to start

throttle needs to be down, other sticks centered to start motors

need to be in manual mode to start the motors

USE_THROTTLE_FOR_MOTOR_ARMING defined (to 1):

automatically start motors when applying throttle

if throttle was not down at startup, you need to put throttle down again first

other sticks need to be centered to start motors

need to be in manual mode to start the motors

Autopilot modes

For rotorcrafts we have a lot of different modes that can be mapped to your 3-position switch (Manual, Auto1, Auto2).
The horizontal and vertical mode can be set differently as the following possible modes indicate (in parenthesis are the abbreviations displayed in the GCS strip) :

AP_MODE_FAILSAFE (SAFE)

This is a failsafe mode that gets triggered if:

RC signal is lost (and you are not in KILL or NAV mode)

GPS and RC is lost in NAV mode

The autopilot will level the rotorcraft out (setpoints to zero pitch and roll angles) and descend at 0.5m/s downwards.

AP_MODE_KILL (KILL)

Motors are simply switched off.

AP_MODE_RATE_DIRECT (RATE)

This is basically the "most" manual mode you can get. You control not the attitude (roll and pitch angles) but the rotation rate. You also set the throttle directly with your RC.

AP_MODE_ATTITUDE_DIRECT (ATT)

You control the attitude (roll, pitch and yaw angles), but the throttle directly proportional to your stick position.

AP_MODE_RATE_RC_CLIMB (R_RCC)

You control the rotation rate and the vertical speed according to your throttle stick position. If you have your throttle stick in the middle position, the altitude is kept, down goes down at a speed proportional to your stick position (same for up). In this mode it makes sense to mount the spring for your throttle stick so it can recenter itself.

AP_MODE_ATTITUDE_RC_CLIMB (A_RCC)

You control the attitude (roll, pitch and yaw angles) and the vertical speed according to your throttle stick position. If you have your throttle stick in the middle position the altitude is kept, if you move the stick down it goes down at a speed proportional to your stick position (same for up). In this mode it makes sense to mount the spring for your throttle stick so it recenter itself.

AP_MODE_ATTITUDE_CLIMB (ATT_C)

You control the attitude (roll, pitch and yaw angles) and the vertical speed. The vertical speed is set via fms (e.g. joystick).

AP_MODE_RATE_Z_HOLD (R_ZH)

You control the rotation rate and it holds the altitude you were at when entering this mode. Your throttle stick position still limits the max throttle authority, so you should push your throttle stick up after entering this mode so the vertical controller has some "room" to stabilize the altitude. Should something weird happen you can limit the max thrust by taking throttle back.

AP_MODE_ATTITUDE_Z_HOLD (A_ZH)

You control the attitude (roll, pitch and yaw angles) and it holds the altitude you were at when entering this mode. Your throttle stick position still limits the max throttle authority, so you should push your throttle stick up after entering this mode so the vertical controller has some "room" to stabilize the altitude. Should something weird happen you can limit the max thrust by taking throttle back.

AP_MODE_HOVER_DIRECT (HOVER)

The rotorcraft hovers at the horizontal position you were at when entering this mode (position control). You still set the throttle directly with your RC.

AP_MODE_HOVER_CLIMB (HOV_C)

The rotorcraft hovers at the position you were at when entering this mode (position control). The vertical speed is set via fms (e.g. joystick).

AP_MODE_HOVER_Z_HOLD (H_ZH)

The rotorcraft hovers at the 3D position you were at when entering this mode (position and altitude control). Your throttle stick position still limits the max throttle authority, so you should push your throttle stick up after entering this mode so the vertical controller has some "room" to stabilize the altitude. Should something weird happen you can limit the max thrust by taking throttle back.

AP_MODE_NAV (NAV)

Full navigation mode. The rotorcraft follows your flightplan.

AP_MODE_RC_DIRECT (RC_D)

Safety pilot direct commands for helicopter.

XML Parameters

Mode

In the mode section you can set the autopilot modes associated with your 3-way mode switch on your RC.

Each command is also associated with a failsafe value which will be used if no controller is active, for example during initialization of the autopilot board.

Supervision

Valid before v4.9_devel-164-gdb0d004

This section describes the "mixing" used for your particular multirotor configuration. This section is needed for "mkk" (mikrokopter), "pwm_supervision" and "asctecV2" controllers, as "asctecV1" do their mixing themselves.