Skip to main content
A geofence is a boundary the flight controller enforces. Rally points are alternative return points the flight controller can use instead of home. You set both in the Plan tab, and Send to vehicle sends them to the flight controller together with the mission.
Plan tab with a polygon fence and rally points on the map and the geofence inspector open

A polygon geofence and two rally points, with the geofence settings open in the inspector.

A geofence breach triggers a flight action on the aircraft. Read Safety and test the fence on a bench or in SITL first.

Geofence

Click Geofence in the plan outline (or the Geofence row in the Mission inspector) to open the fence settings for the current plan in the inspector.

Create a fence

1

Open the geofence settings

In the Plan tab, click Geofence in the plan outline and switch on Enable geofence.
2

Draw the boundary

Pick Polygon or Circle under Type, click Draw on map and draw the shape. Or click Auto-fence to build a polygon around the plan with the buffer you set.
3

Set the ceiling and the action

Enter Max altitude and choose the Fence action.
4

Send

Click Send to vehicle in the planner bar and leave Geofence ticked, or click Upload fence in the geofence inspector to send the fence alone. Mission Control sends the fence points over the MAVLink mission protocol (fence mission type) and writes the fence parameters, including FENCE_ENABLE, FENCE_TYPE, FENCE_ACTION and FENCE_ALT_MAX.

Inclusion and exclusion zones

A fence can carry extra zones: inclusion zones the aircraft must stay inside and exclusion zones it must stay out of. Add and edit zones, and toggle a zone between inclusion and exclusion, in the node’s Setup tab under SAFETY → Geofence. On download, the first inclusion shape becomes the main fence and the rest become zones. Mission validation checks waypoints, legs and rally points against the fence and every zone, and blocks sending the mission when one falls outside. See Mission validation.
iNav uses geozones instead of the ArduPilot fence. See iNav guide.

Rally points

When the flight controller returns to launch, it can fly to the nearest rally point instead of home. Use them when home may be blocked, or when a closer safe landing area exists.
1

Place points

Choose the rally point tool (Y) and click the map, or click + on Rally points in the plan outline. Each point appears as a row under Rally points; click it to open it in the inspector.
2

Set altitudes

Set the Altitude of each point in the rally points inspector.
3

Send

Send them with Send to vehicle (leave Rally points ticked), or click Upload rally points in the inspector. Use Download rally points to read the points stored on the aircraft, and Clear all to remove them from the plan (undo restores them).
Validation blocks sending when a rally point is outside the fence or inside an exclusion zone, and warns when its altitude is above the fence ceiling.
On ArduPilot, RALLY_LIMIT_KM sets how far from home a rally point can be and still be used. Points farther away are ignored. Set it in the Parameters tab to cover your operating area.

A typical setup

  1. A polygon fence around the whole operating area, with a ceiling.
  2. Exclusion zones around buildings, roads or people.
  3. Three or four rally points in clear landing areas inside the fence.

Next steps

Mission planning

Validate and send the full plan.

3D mission preview

Preview the mission, fence and rally points in 3D.
Last modified on October 19, 2026