Copter includes support for a polygon geofence with up to 70 points. The purpose of this fence is to attempt to stop your vehicle from flying out of the polygon by initiating an RTL or, if flying in Loiter mode, the vehicle will normally stop before breaching the fence. This feature is an extension of the simpler cylindrical fence.
The Polygon GeoFence was introduced in Copter 3.4.
Enabling the Fence in Mission Planner¶
Connect your Autopilot to the Mission Planner
Go to the Config/Tuning | GeoFence screen
Click “Enable” and set Type to “All” or another option that includes “Polygon”
Leave the Action as “RTL or Land”
Go to the Flight Plan screen
Right-mouse-button click on the map and select “Draw Polygon” >> “Add Polygon Point”
Click on other points on the map to define the polygon
After the polygon has been defined you must Right-mouse-button click and “Draw Polygon” >> “Set Return Location”. This location is not actually used by copter but it must be set because the same underlying library is used as Plane.
Upload the polygon geofence to the vehicle using Right-mouse-button click and “Geo Fence” >> “Upload”
Combining with the Cylindrical Fence¶
The polygon fence can be used in combination with the cylindrical fences and the failsafe behaviour (i.e. stop at the fence or RTL) will trigger at whichever barrier the vehicle reaches first (i.e. the green line shown below)
Please see the Cylindrical Fence page for additional warnings and instructions including how to enable/disable the fence with the RC channel auxiliary switches.