MAVLink Diversion Operations with Fencing Research

After setting up geofences that define areas where a drone is allowed or not allowed to fly, they can be used to trigger specific actions or behaviours when the drone approaches or breaches the fencing boundaries.

Defining a Fence

Fence areas can be polygonal or circular and indicate an inclusion or exclusion area. They can be set up in Mission Planner under the PLAN screen and loaded to the autopilot, using the FENCES item in the drop-down box. Seehttps://ardupilot.org/copter/docs/common-geofencing-landing-page.html#general-setup for more setup instructions and types of fences.

https://youtu.be/yhNrtTERnJk

 

Diversion Operations

Upon a fence breach, the following actions can be taken (vehicle-dependent):

Value

Field Name

Description

Value

Field Name

Description

0

FENCE_ACTION_NONE

Disable fenced mode. If used in a plan this would mean the next fence is disabled.

1

FENCE_ACTION_GUIDED

Fly to geofence MAV_CMD_NAV_FENCE_RETURN_POINT in GUIDED mode. Note: This action is only supported by ArduPlane, and may not be supported in all versions.

2

FENCE_ACTION_REPORT

Report fence breach, but don't take action

3

FENCE_ACTION_GUIDED_THR_PASS

Fly to geofence MAV_CMD_NAV_FENCE_RETURN_POINT with manual throttle control in GUIDED mode. Note: This action is only supported by ArduPlane, and may not be supported in all versions.

4

FENCE_ACTION_RTL

Return/RTL mode.

5

FENCE_ACTION_HOLD

Hold at current location.

6

FENCE_ACTION_TERMINATE

Termination failsafe. Motors are shut down (some flight stacks may trigger other failsafe actions).

7

FENCE_ACTION_LAND

Land at current location.

Some actions like activating RTL mode, or diverting to an alternate location can be leveraged to achieve diversion operations. Trigger conditions can be configured in Mission Planner to detect when the drone breaches the fence boundaries; they can be based on relative position, altitude, etc.