FENCE_ parameters

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

FENCE_ACTION

Fence Action

What action should be taken when fence is breached

User level

Standard

Values

Value

Meaning

0

Report Only

1

RTL or Land

2

Always Land

3

SmartRTL or RTL or Land

4

Brake or Land

5

SmartRTL or Land

FENCE_ALT_MAX

Fence Maximum Altitude

Maximum altitude allowed before geofence triggers. See FENCE_ALT_MAX_TP for reference frame.

Units

m

Range

10 to 1000

Increment

1

User level

Standard

FENCE_ALT_MAX_TP

Altitude max frame type

The altitude reference frame for the maximum altitude fence. Can be AMSL, home-relative, origin relative or AGL.

User level

Advanced

Values

Value

Meaning

0

Above sea level

1

Above Home

2

Above Origin

3

Above Terrain

FENCE_ALT_MIN

Fence Minimum Altitude

Minimum altitude allowed before geofence triggers. See FENCE_ALT_MIN_TP for reference frame.

Units

m

Range

-100 to 100

Increment

1

User level

Standard

FENCE_ALT_MIN_TP

Altitude min frame type

The altitude reference frame for the minimum altitude fence. Can be AMSL, home-relative, origin relative or AGL.

User level

Advanced

Values

Value

Meaning

0

Above sea level

1

Above Home

2

Above Origin

3

Above Terrain

FENCE_AUTOENABLE

Fence Auto-Enable

Auto-enable of fences. AutoEnableOnTakeoff enables all configured fences, except the minimum altitude fence (which is enabled when the minimum altitude is reached), after autotakeoffs reach altitude. During autolandings the fences will be disabled. AutoEnableDisableFloorOnLanding enables all configured fences, except the minimum altitude fence (which is enabled when the minimum altitude is reached), after autotakeoffs reach altitude. During autolandings only the Minimum Altitude fence will be disabled. AutoEnableOnlyWhenArmed enables all configured fences on arming, except the minimum altitude fence (which is enabled when the minimum altitude is reached), but no fences are disabled during autolandings. However, fence breaches are ignored while executing prior breach recovery actions which may include autolandings.

Range

0 to 3

Increment

1

User level

Standard

Values

Value

Meaning

0

AutoEnableOff

1

AutoEnableOnTakeoff

2

AutoEnableDisableFloorOnLanding

3

AutoEnableOnlyWhenArmed

FENCE_ENABLE

Fence enable/disable

Allows you to enable (1) or disable (0) the fence functionality. Fences can still be enabled and disabled via mavlink or an RC option, but these changes are not persisted.

User level

Standard

Values

Value

Meaning

0

Disabled

1

Enabled

FENCE_MARGIN

Fence Margin

Distance that autopilot’s should maintain from the fence to avoid a breach

Units

m

Range

1 to 10

User level

Standard

FENCE_MARGIN_XY

Fence Horizontal Margin

Distance that autopilot’s should maintain from the fence in the horizontal plane to avoid a breach. If set to 0 then FENCE_MARGIN is used.

Units

m

Range

0 to 50

User level

Standard

FENCE_NTF_FREQ

Fence margin notification frequency in hz

When bit 2 of FENCE_OPTIONS is set this parameter controls the frequency of margin breach notifications. If set to 0 only new margin breaches are notified.

Units

Hz

Range

0 to 10

User level

Advanced

FENCE_OPTIONS

Fence options

When bit 0 is set disable mode change following fence action until fence breach is cleared. When bit 1 is set the allowable flight areas is the union of all polygon and circle fence areas instead of the intersection, which means a fence breach occurs only if you are outside all of the fence areas.

User level

Standard

Bitmask

Value

Meaning

0

Disable mode change following fence action until fence breach is cleared

1

Allow union of inclusion areas

2

Notify on margin breaches

FENCE_RADIUS

Circular Fence Radius

Circle fence radius which when breached will cause an RTL

Units

m

Range

30 to 10000

User level

Standard

FENCE_TOTAL

Fence polygon point total

Number of polygon points saved in eeprom (do not update manually)

Range

1 to 20

User level

Standard

FENCE_TYPE

Fence Type

Configured fence types held as bitmask. Max altitide, Circle and Polygon fences will be immediately enabled if configured. Min altitude fence will only be enabled once the minimum altitude is reached.

User level

Standard

Bitmask

Value

Meaning

0

Max altitude

1

Circle Centered on Home

2

Inclusion/Exclusion Circles+Polygons

3

Min altitude