A ground station is using the old way of sending fences
What ArduPilot says:
- Invalid fence point, bad count (N vs N)
- Invalid fence point, index past total(N >= N)
- Vehicle contains advanced fences
- Failed to get return point
- Invalid fence point, index past total (N >= N)
- PolyFence: storage write failed
Also explained here: 3 more
- Invalid FENCE_TOTAL
- Fence read failed
- Invalid fence point, bad lat or lng
A ground station is reading or writing the fence with the old FENCE_POINT messages, which know only one polygon with a return point and keep the number of points in FENCE_TOTAL. ArduPilot found the request inconsistent: a FENCE_TOTAL from 1 to 4 (a fence sent this way has at least 5 points: the return point, three corners and the closing point), a point number at or beyond FENCE_TOTAL, a coordinate that cannot be real. “Vehicle contains advanced fences” means the stored fence has several areas or circles and cannot be read this way.
What to do, most likely first
The ground station, or a script talking to the aircraft, is too old.
FixUpdate it. Current ground stations send the fence together with the mission, as fence items in the Plan screen.
FENCE_TOTALwas changed by hand or came with another aircraft's parameters.Check
FENCE_TOTALis above 0 and below 5.FixDo not edit
FENCE_TOTAL. Clear the fence from the ground station and upload it again.
4.7 is built without the old messages: there these lines cannot appear, and a ground station that still uses them gets no answer at all.
Parameters to look at
| Parameter | What it is |
|---|---|
FENCE_TOTAL | Fence polygon point total |
The code that sends it
Invalid fence point, bad count (N vs N)
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::handle_msg_fence_point() · Open in ArduPilot Copter-4.7.1
Invalid fence point, index past total(N >= N)
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::handle_msg_fetch_fence_point() · Open in ArduPilot Copter-4.7.1
Vehicle contains advanced fences
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::handle_msg_fetch_fence_point() · Open in ArduPilot Copter-4.7.1
Failed to get return point
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::handle_msg_fetch_fence_point() · Open in ArduPilot Copter-4.7.1
And 5 more messages, sent from the same places.