The aircraft refused the fence the ground station sent
What ArduPilot says:
- Received incorrect type (want=N got=N)
- Bad lat or lon
- Invalid vertex count (N)
- Fence exceeds storage size
- Non-positive circle radius
- Received incorrect vertex type (want=N got=N)
Also explained here: 4 more
- Fence validation failed
- Unexpected vertex count want=N got=N
- Incorrect item count
- Multiple return points
The ground station sent a fence and ArduPilot did not store it. “Fence validation failed” follows a line that says why: a polygon needs at least 3 points (“Invalid vertex count”), sent together and all of one kind (“Received incorrect vertex type”, “Unexpected vertex count”, “Incorrect item count”); a circle needs a radius above 0; there may be only one return point; every latitude and longitude must be a real one. “Fence exceeds storage size” means the fence is sound but too large for the board's fence storage. The fence already on the aircraft stays as it was.
What to do, most likely first
An unfinished item was drawn: a polygon with fewer than 3 points, or a circle with no radius.
CheckLook at each fence item in the ground station's Plan screen.
FixFinish or delete the item, write the fence again and read it back to see that it arrived.
The fence has more points than the board can store.
CheckThe line is “Fence exceeds storage size”. Each polygon point takes 8 bytes, and many boards have room for fewer than a hundred.
FixDraw the fence with fewer points. Or keep it on the SD card: set
BRD_SD_FENCEto a size in kilobytes, reboot and upload again.The ground station is old, or sent the items in an order ArduPilot does not accept.
FixUpdate the ground station and upload again. If one program keeps failing where another works, report it to its developers.
Parameters to look at
| Parameter | What it is |
|---|---|
FENCE_TYPE | Fence Type |
BRD_SD_FENCE | SDCard Fence size |
Where to do it:Failsafe Explainer
The code that sends it
Received incorrect type (want=N got=N)
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::validate_fence() · Open in ArduPilot Copter-4.7.1
Bad lat or lon
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::validate_fence() · Open in ArduPilot Copter-4.7.1
Invalid vertex count (N)
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::validate_fence() · Open in ArduPilot Copter-4.7.1
Fence exceeds storage size
libraries/AC_Fence/AC_PolyFence_loader.cpp AC_PolyFence_loader::write_fence() · Open in ArduPilot Copter-4.7.1
And 6 more messages, sent from the same places.