ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Plane: only trigger fence action for new breaches (allowing mode change after breach)

Open IamPete1 opened this issue 3 years ago • 2 comments

This brings plane in line with copter to only trigger on new breaches. Currently it is impossible to change mode following a fence breach as the breach action will continually re-trigger effectively removing all control from the pilot/GCS (unless you go and turn off fence).

This also increases the circle fence backup distance for plane from 20m to 50m. This means that circle fence will re-trigger every additional 50m from home.

This also sets the manual recovery flag on plane mode change, this means that the fence will never re-trigger in less than 10 seconds after as mode change.

IamPete1 avatar Aug 06 '22 20:08 IamPete1

Thanks @IamPete1 this is awesome. Just one question - the fence circle backup distance of 50m seems a bit small. For a fast plane this might give only a couple of seconds to correct/recover. Would it make sense to make this a parameter?

timtuxworth avatar Aug 06 '22 21:08 timtuxworth

We could make it a ratio of the radius, its only 300m by default. So the 50m backup gets you a 16% more.

TBH, i'm not really a fan of the backup thing, we don't have it for polygon.

IamPete1 avatar Aug 06 '22 21:08 IamPete1