← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The aircraft crossed a fence

Act nowFailsafes and emergencies in flight

The armed aircraft crossed a fence, and the line names which: “Max Alt fence breached”, “Circle and Polygon fences breached”. Max Alt: the height above home reached FENCE_ALT_MAX. Circle: the distance from home reached FENCE_RADIUS. Polygon: it left an inclusion area, or entered an exclusion area, drawn in the ground station. Min Alt: it sank to FENCE_ALT_MIN. What the aircraft does next is set by FENCE_ACTION. After a breach ArduPilot puts a second line 20 m farther on (100 m for a plane's circle) and acts again if that is crossed too.

What to do, most likely first

  1. The limit is tighter than the flight needed; the defaults are 100 m up and 300 m out.

    CheckCompare FENCE_ALT_MAX and FENCE_RADIUS with the height and distance of the flight you planned. Every waypoint of a mission must lie inside the fence too.

    FixLet the fence action finish and land. Before the next take-off set the limits for the flight you plan, with room to spare. Do not widen a fence in the air to silence it.

  2. Wind or speed carried the aircraft over: it could not stop or turn within the margin.

    CheckIn the log, look at the speed and the track just before the message.

    FixFly slower near the edge and plan routes farther inside the fence.

  3. The position or height estimate jumped (a GPS glitch, a drifting barometer), and the aircraft only appeared to cross.

    CheckIn the log the position steps sideways or the height changes with no stick input to match, and GPS or EKF messages appear around the same time.

    FixTreat it as a sensor problem: look up the GPS or EKF messages that came with it.

  4. Home is not where you took off, so the circle is centred somewhere else.

    CheckLook at the home icon on the map, in the ground station or in the log.

    FixCheck where home is before every take-off; reboot at the take-off place if it is wrong.

A change of flight mode during a breach gives 10 s in which the fence does not act again (“Manual recovery started”). “Fence breach cleared” follows when the aircraft is back inside.

Parameters to look at

ParameterWhat it is
FENCE_ACTIONFence Action
FENCE_TYPEFence Type
FENCE_ALT_MAXFence Maximum Altitude
FENCE_RADIUSCircular Fence Radius
FENCE_ALT_MINFence Minimum Altitude
FENCE_MARGINFence Margin

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer