The fence is on, but there is no position to check it against
What ArduPilot says:
- Fence requires position
A fence that limits distance is selected: the circle around home (FENCE_TYPE bit 1) or the areas drawn in the ground station (bit 2), and the fence is on (FENCE_ENABLE is 1, or FENCE_AUTOENABLE is not 0). To check such a fence ArduPilot needs a home position and its own current position. One of the two is missing, so it will not arm: it could not tell when the aircraft crosses the fence.
What to do, most likely first
The GPS has no fix yet, or the EKF (ArduPilot's position estimator) has not started using it.
CheckThe ground station shows the fix type and the number of satellites; home appears on the map once the position is good.
FixWait outdoors with a clear view of the sky, usually a minute or two after power-on. The message goes away by itself when home is set.
You are indoors or on the bench, where there is no GPS signal.
FixArm outdoors. Where a position is never available (indoor flying), a circle or drawn fence cannot work at all: keep only the altitude fence by setting
FENCE_TYPEto 1 (maximum altitude), withFENCE_AUTOENABLEat 0, because with 3 a position is asked for whatever the type.No GPS is detected at all: wrong wiring or serial port settings.
CheckThe ground station shows “No GPS” rather than “No Fix”, and other GPS messages appear among the arming checks.
FixGet the GPS working first (look up its own messages here); the fence check passes as soon as a position exists.
With FENCE_AUTOENABLE 3 the fence itself is off on the ground, but this check runs all the same, and it then asks for a position even when only altitude fences are selected. Copter has a second message for the same thing at the moment of arming: “Fence enabled, need position estimate”.
Parameters to look at
| Parameter | What it is |
|---|---|
FENCE_ENABLE | Fence enable/disable |
FENCE_TYPE | Fence Type |
FENCE_AUTOENABLE | Fence Auto-Enable |
FENCE_RADIUS | Circular Fence Radius |
Where to do it:Setup & Tuning GuideFailsafe Explainer
The code that sends it
Fence requires position
libraries/AC_Fence/AC_Fence.cpp AC_Fence::pre_arm_check() · Open in ArduPilot Copter-4.7.1