AFS_ parameters

21 parameters in the AFS_ family. ArduCopter 4.7 only — other vehicles share many of these names but not always the same ranges or meanings.

AFS_AMSL_ERR_GPS

Error margin for GPS based AMSL limit

This sets margin for error in GPS derived altitude limit. This error margin is only used if the barometer has failed. If the barometer fails then the GPS will be used to enforce the AMSL_LIMIT, but this margin will be subtracted from the AMSL_LIMIT first, to ensure that even with the given amount of GPS altitude error the pressure altitude is not breached. OBC users should set this to comply with their D2 safety case. A value of -1 will mean that barometer failure will lead to immediate termination.

Units

m

User level

Advanced

AFS_AMSL_LIMIT

AMSL limit

This sets the AMSL (above mean sea level) altitude limit. If the pressure altitude determined by QNH exceeds this limit then flight termination will be forced. Note that this limit is in meters, whereas pressure altitude limits are often quoted in feet. A value of zero disables the pressure altitude limit.

Units

m

User level

Advanced

AFS_DUAL_LOSS

Enable dual loss terminate due to failure of both GCS and GPS simultaneously

This enables the dual loss termination part of the AFS system. If this parameter is 1 and both GPS and the ground control station fail simultaneously, this will be considered a “dual loss” and cause termination.

User level

Advanced

AFS_ENABLE

Enable Advanced Failsafe

This enables the advanced failsafe system. If this is set to zero (disable) then all the other AFS options have no effect

User level

Advanced

AFS_GCS_TIMEOUT

GCS timeout

The time (in seconds) of persistent data link loss before GCS failsafe occurs.

Units

s

User level

Advanced

AFS_GEOFENCE

Enable geofence Advanced Failsafe

This enables the geofence part of the AFS. Will only be in effect if AFS_ENABLE is also 1

User level

Advanced

AFS_HB_PIN

Heartbeat Pin

This sets a digital output pin which is cycled at 10Hz when termination is not activated. Note that if a FS_TERM_PIN is set then the heartbeat pin will continue to cycle at 10Hz when termination is activated, to allow the termination board to distinguish between autopilot crash and termination. Some common values are given, but see the Wiki’s “GPIOs” page for how to determine the pin number for a given autopilot.

Range

-1 to 127

User level

Advanced

Values

Value

Meaning

-1

Disabled

49

BB Blue GP0 pin 4

50

AUXOUT1

51

AUXOUT2

52

AUXOUT3

53

AUXOUT4

54

AUXOUT5

55

AUXOUT6

57

BB Blue GP0 pin 3

113

BB Blue GP0 pin 6

116

BB Blue GP0 pin 5

AFS_MAN_PIN

Manual Pin

This sets a digital output pin to set high when in manual mode. See the Wiki’s “GPIOs” page for how to determine the pin number for a given autopilot.

User level

Advanced

AFS_MAX_COM_LOSS

Maximum number of comms loss events

Maximum number of comms loss events before the aircraft stops returning to mission on comms recovery. Use zero to allow for any number of comms loss events.

User level

Advanced

AFS_MAX_GPS_LOSS

Maximum number of GPS loss events

Maximum number of GPS loss events before the aircraft stops returning to mission on GPS recovery. Use zero to allow for any number of GPS loss events.

User level

Advanced

AFS_MAX_RANGE

Max allowed range

This is the maximum range of the vehicle in kilometers from first arming. If the vehicle goes beyond this range then the TERM_ACTION is performed. A value of zero disables this feature.

Units

km

User level

Advanced

AFS_OPTIONS

AFS options

See description for each bitmask bit description

Bitmask

Value

Meaning

0

Continue the mission even after comms are recovered (does not go to the mission item at the time comms were lost)

1

Enable AFS for all autonomous modes (not just AUTO)

2

Option to not jump to AFS_WP_COMMS if already in the return path

AFS_QNH_PRESSURE

QNH pressure

This sets the QNH pressure in millibars to be used for pressure altitude in the altitude limit. A value of zero disables the altitude limit.

Units

hPa

User level

Advanced

AFS_RC

Enable RC Advanced Failsafe

This enables the RC part of the AFS. Will only be in effect if AFS_ENABLE is also 1

User level

Advanced

AFS_RC_FAIL_TIME

RC failure time

This is the time in seconds in manual mode that failsafe termination will activate if RC input is lost. For the OBC rules this should be (1.5). Use 0 to disable.

Units

s

User level

Advanced

AFS_RC_MAN_ONLY

Enable RC Termination only in manual control modes

If this parameter is set to 1, then an RC loss will only cause the plane to terminate in manual control modes. If it is 0, then the plane will terminate in any flight mode.

User level

Advanced

AFS_TERMINATE

Force Terminate

Can be set in flight to force termination of the heartbeat signal

User level

Advanced

AFS_TERM_ACTION

Terminate action

This can be used to force an action on flight termination. Normally this is handled by an external failsafe board, but you can setup ArduPilot to handle it here. Please consult the wiki for more information on the possible values of the parameter

User level

Advanced

AFS_TERM_PIN

Terminate Pin

This sets a digital output pin to set high on flight termination. Some common values are given, but see the Wiki’s “GPIOs” page for how to determine the pin number for a given autopilot.

Range

-1 to 127

User level

Advanced

Values

Value

Meaning

-1

Disabled

49

BB Blue GP0 pin 4

50

AUXOUT1

51

AUXOUT2

52

AUXOUT3

53

AUXOUT4

54

AUXOUT5

55

AUXOUT6

57

BB Blue GP0 pin 3

113

BB Blue GP0 pin 6

116

BB Blue GP0 pin 5

AFS_WP_COMMS

Comms Waypoint

Waypoint number to navigate to on comms loss

User level

Advanced

AFS_WP_GPS_LOSS

GPS Loss Waypoint

Waypoint number to navigate to on GPS lock loss

User level

Advanced