How activate failsafe using switch on RC controller

I am currently configuring a flight termination system (FTS) that has to follow these rules:

  1. The FTS shall be automatically triggered:
    • By breach of the Geo-fence.
    • After 5 seconds of RC Signal loss. This is the connection directly between the
    RC controller and the air vehicle.
    • After no longer than 10 seconds from lost Datalink.

  2. The FTS shall not trigger a “return to home” action

  3. For fixed wing aircraft the following commands shall be set:
    • Pitch: full nose up
    • Roll: full right
    • Yaw: full right

  4. The FTS shall also be triggered manually by the Flight Safety via the RC Controller.

Right now, I’m specifcally looking at the 4th point. Is this possible? I assume that a switch has to be configured so that the failsafe action is performed, but I am not sure how to do this. Right now, I believe I have the first three rules completed (it would be great if someone could look over them to see if they are also correct). I am currently using the advanced failsafe configuration, as the rules are similar to the Outback Challenge Competition: Advanced Failsafe Configuration — Plane documentation.

This is what I have configured until now:

  • AFS_ENABLE = 1.
  • AFS_TERM_ACTION = 42. This sets all control surfaces to maximum, and throttle is disarmed to enter a spin that deliberately dives the aircraft into the ground.

These are the conditions that will activate the FTS, and how they have been implemented:

  • Geofence is breached
  • FENCE_AUTOENABLE = 3 (AutoEnableOnlyWhenArmed
    • The geofence becomes automatically active after arming the aircraft.
  • FENCE_ALT_MAX sets the maximum altitude limit for the geofence (in metres). This is set to 200ft Above Ground Level (AGL) or 60.96m.
  • FENCE_MARGIN is an Extra margin (in meters) outside the geofence before the action resulting from a geofence breach is triggered. This is set to its minimum as 1m.
  • FENCE_ACTION?

The AFS will automatically search for a geofence breach and activate AFS_TERM_ACTION = 42.

  • After 5s of RC signal loss

  • THR_FS_VALUE = 1 enables RC Failsafe.

  • AFS_RC_FAIL_TIME = 5000 activates FTS after 5000ms or 5s of RC signal loss.

  • After 10s of datalink loss

  • FS_GCS_ENABLE = 1 enables GCS Failsafe

  • AFS_GCS_TIMEOUT = 10 (default) defines how many seconds ardupilot will wait after the last MAVLink heartbeat before activating the FTS.

There is an option to terminate manually by setting AFS_TERMINATE = 1, but this is done by changing the parameter to mission planner and not through the RC controller.

At a glance, I don’t see a direct mechanism to force AFS behaviors with an RC channel. It would be exceedingly easy to write a short Lua script that would change the AFS_TERMINATE parameter based on an RC channel state. If that solution is satisfactory, let me know if you need further assistance.

1 Like