commander: refactor home position setter

- always try to set local or global home position when possible
- set global home with GNSS position if global pos from EKF isn't
  available
- reset home when significantly moved from home before takeoff (checking
  lpos or gpos or GNSS)
- reset home on takeoff transition
- reset home on mavlink arm command
- remove "home required accuracy" parameters, rely on validity flags
This commit is contained in:
bresch
2022-04-19 15:29:25 +02:00
committed by Mathieu Bresciani
parent a7683eea07
commit d2f2ba59a4
3 changed files with 125 additions and 147 deletions
-28
View File
@@ -213,34 +213,6 @@ PARAM_DEFINE_FLOAT(COM_RCL_ACT_T, 15.0f);
*/
PARAM_DEFINE_INT32(COM_HOME_EN, 1);
/**
* Home set horizontal threshold
*
* The home position will be set if the estimated positioning accuracy is below the threshold.
*
* @group Commander
* @unit m
* @min 2
* @max 15
* @decimal 2
* @increment 0.5
*/
PARAM_DEFINE_FLOAT(COM_HOME_H_T, 5.0f);
/**
* Home set vertical threshold
*
* The home position will be set if the estimated positioning accuracy is below the threshold.
*
* @group Commander
* @unit m
* @min 5
* @max 25
* @decimal 2
* @increment 0.5
*/
PARAM_DEFINE_FLOAT(COM_HOME_V_T, 10.0f);
/**
* Allows setting the home position after takeoff
*