← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The aircraft refused the fence the ground station sent

Stops itMissions, fence, rally points, terrain

What ArduPilot says:

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

  1. 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.

  2. 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_FENCE to a size in kilobytes, reboot and upload again.

  3. 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

ParameterWhat it is
FENCE_TYPEFence Type
BRD_SD_FENCE SDCard Fence size
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.

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