Accessing Advanced Failsafe Parameters - Copter 3.4.6

Hi Everybody,

I am try to set up my copter to return to home (or a predefined waypoint) after after losing comms with my GCS when in AUTO mode outside of RC range (FS_THR_ENABLE = 2 - Enabled Continue with Mission in Auto Mode ).

I am attempting to enable advanced failsafe (AFS_ENABLE = 1) to be able to set AFS_WP_COMMS. However, AFS_ENABLE does not seem to appear in the parameter list. Does another parameter need to be enabled to access AFS_ENABLE? The ArduCopter releasenotes.txt document says “Advanced Failsafe for use in OutBack challenge (see http://ardupilot.org/plane/docs/advanced-failsafe-configuration.html)” was added in Copter 3.4.0-rc3 and doesn’t seem to mention it being removed. http://ardupilot.org/copter/docs/parameters.html# also still documents the AFS parameters.

It would be great if someone was able to point me in the right direction.

Thanks,
Luke

Hello,
Did you have a look at http://ardupilot.org/copter/docs/common-rally-points.html for alternate RTL destination?
Why put FS_THR_ENABLE to 2 when using 1 trigger the RTL it seem what you want, no? If you are using RC_OVERRIDE, you should use http://ardupilot.org/copter/docs/parameters.html#fs-gcs-enable-ground-station-failsafe-enable

To have acces to AFS you need to compile a version with AFS support : in config.h set # define ADVANCED_FAILSAFE ENABLE

Advanced Failsafe isn’t included in default builds, you’ll need to build it yourself if you need it.

Have you looked at the GCS failsafe?

Thanks for your replies khancyr and Francisco,

I did not realise that AFS was not compiled in the standard firmware. I’ll recompile with it enabled as you both suggested.

@khancyr - I do not want the copter to RTL on loss RC as I will be flying in AUTO mode beyond the range of my RC transmitter.

@OXINARF - I originally tried to use GCS failsafe as I assumed it would operate the same as it does in APM Plane (There is no dependence on RC_OVERIDE in Plane) I am not using a joystick, but simply sending the copter to a series of waypoints several kilometers away in AUTO mode. Therefore, RC_OVERIDE isn’t being used and RTL is not triggered in the event of a GCS comms loss.

I see that there was a discussion on this topic a few years ago where it was decided to add the RTL functionality in GUIDED mode. https://groups.google.com/forum/#!topic/drones-discuss/VZ84Wz59Pfc Is there a reason why this could not include AUTO mode? Perhaps only trigger RTL when both RC and GCS comms have been lost?

For example, in the ‘void Copter::failsafe_gcs_check()’ function in events.cpp the check could be amended from

if ((!failsafe.gcs)&&(g.failsafe_gcs == FS_GCS_DISABLED || failsafe.last_heartbeat_ms == 0 || (!failsafe.rc_override_active && control_mode != GUIDED))) {
        return;
    }

to

 if ((!failsafe.gcs)&&(g.failsafe_gcs == FS_GCS_DISABLED || failsafe.last_heartbeat_ms == 0 || (!failsafe.rc_override_active && control_mode != GUIDED && !(failsafe.radio && control_mode == AUTO)))) {
        return;
    }

I realise that with a properly planned AUTO mission the aircraft will still return to home, but unfortunately it’s a requirement for me to have some form of situational awareness of the copter on my GCS when it enters “Beyond Visual Line of Sight”, otherwise I must RTL.

Advanced Failsafe isn’t included in default builds, you’ll need to build it yourself if you need it.

In Arducopter/APM_config.h un-comment Line (define ADVANCED_FAILSAFE ENABLED // enabled advanced failsafe which allows running a portion of the mission in failsafe events) and add <“LIBRARIES += AP_AdvancedFailsafe”> In Arducopter/make.inc

After this you can see the enable advanced fail-safe (AFS_ENABLE = 0) in full parameter list. Once after enabling advanced fail-safe (AFS_ENABLE = 1), refresh the parameter and search for AFS_ you can see a list of all parameters related to AFS.