The fence margin or a circle's radius is wrong
What ArduPilot says:
- Invalid FENCE_MARGIN value
- Circle FENCE_MARGIN is less than FENCE_RADIUS
- Invalid FENCE_MARGIN_XY value
- Invalid Circle FENCE_RADIUS value
- Circle FENCE_MARGIN is greater than FENCE_RADIUS
- Polygon fence margin is less than inclusion circle radius
Also explained here: 1 more
- Polygon fence margin is greater than inclusion circle radius
FENCE_MARGIN (2 m by default) is how far inside the fence ArduPilot tries to stay. It must not be negative, and no circle may be smaller than it: neither FENCE_RADIUS (the circle around home, 300 m by default) nor an inclusion circle drawn in the ground station. FENCE_RADIUS is checked even when the circle is not selected in FENCE_TYPE. In this version the two “… is less than …” messages are worded backwards: they appear when the radius is smaller than the margin.
What to do, most likely first
FENCE_RADIUSis smaller than the margin, often 0 because the circle is not used.CheckCompare
FENCE_RADIUSwithFENCE_MARGIN.FixGive
FENCE_RADIUSa real value (the documented range is 30 to 10000 m), even if the circle is not selected inFENCE_TYPE: the check runs regardless.An inclusion circle drawn in the ground station has a radius smaller than the margin.
CheckRead the fence back in the Plan screen and look at the radius of each circle.
FixDraw the circle larger, or delete it, and write the fence to the aircraft again.
The margin was typed as a negative number.
FixSet
FENCE_MARGINto a positive distance in metres; 2 is the default.
Parameters to look at
| Parameter | What it is |
|---|---|
FENCE_RADIUS | Circular Fence Radius |
FENCE_MARGIN | Fence Margin |
FENCE_TYPE | Fence Type |
Where to do it:Failsafe Explainer
The code that sends it
Invalid FENCE_MARGIN value
libraries/AC_Fence/AC_Fence.cpp AC_Fence::pre_arm_check() · Open in ArduPilot Copter-4.7.1
Circle FENCE_MARGIN is less than FENCE_RADIUS
libraries/AC_Fence/AC_Fence.cpp AC_Fence::pre_arm_check_circle() · Open in ArduPilot Copter-4.6.3
Invalid FENCE_MARGIN_XY value
libraries/AC_Fence/AC_Fence.cpp AC_Fence::pre_arm_check() · Open in ArduPilot Copter-4.7.1
Invalid Circle FENCE_RADIUS value
libraries/AC_Fence/AC_Fence.cpp AC_Fence::pre_arm_check_circle() · Open in ArduPilot Copter-4.7.1
And 3 more messages, sent from the same places.