commander: Add parameters to control position failsafe behaviour

This is required because the hardcoded values were too sensitive for fixed wing use and bad initial mag heading could trigger the failsafe and lead to crashes on launch. The defaults have been left unchanged. Suitable values for fixed wing use will need to be implemented in the airframe specific config file.
This commit is contained in:
Paul Riseborough
2017-09-01 11:53:41 +02:00
committed by Lorenz Meier
parent f67ac8ba00
commit 491ba08af1
2 changed files with 52 additions and 11 deletions
+32
View File
@@ -637,3 +637,35 @@ PARAM_DEFINE_INT32(COM_POSCTL_NAVL, 0);
* @group Commander
*/
PARAM_DEFINE_INT32(COM_ARM_AUTH, 256010);
/**
* Loss of position failsafe activation delay.
*
* This sets number of micro seconds that the position checks need to be failed before the failsafe will activate.
*
* @reboot_required true
* @group Commander
*/
PARAM_DEFINE_INT32(COM_POS_FS_DELAY, 1E6);
/**
* Loss of position probation delay at takeoff.
*
* This sets number of micro seconds at takeoff that the EKF innovation checks need to pass for the positon to be declared good, if it has been declared bad.
* The probation period reduces by one second for every lapsed second of valid position down to a minimum of one second.
* When checks fail, the probation period is increased by COM_POS_FS_FACT seconds for every lapsed second up to a maximum of 100 seconds
*
* @reboot_required true
* @group Commander
*/
PARAM_DEFINE_INT32(COM_POS_FS_PROB, 30E6);
/**
* Loss of position probation gain factor.
*
* This sets the rate that the loss of position probation time grows when position checks are failing.
*
* @reboot_required true
* @group Commander
*/
PARAM_DEFINE_INT32(COM_POS_FS_GAIN, 10);