FW landing optionally disable heading hold (#7617)

This commit is contained in:
Daniel Agar 2017-07-28 20:28:54 -04:00 committed by GitHub
parent 5324f30cb6
commit ddc4500753
2 changed files with 3 additions and 2 deletions

View File

@ -842,7 +842,7 @@ FixedwingPositionControl::control_position(const math::Vector<2> &curr_pos, cons
// we want the plane to keep tracking the desired flight path until we start flaring
// if we go into heading hold mode earlier then we risk to be pushed away from the runway by cross winds
if (!_land_noreturn_horizontal &&
if ((_parameters.land_heading_hold_horizontal_distance > 0.0f) && !_land_noreturn_horizontal &&
((wp_distance < _parameters.land_heading_hold_horizontal_distance) || _land_noreturn_vertical)) {
if (pos_sp_prev.valid) {

View File

@ -278,7 +278,8 @@ PARAM_DEFINE_FLOAT(FW_LND_FLALT, 8.0f);
PARAM_DEFINE_FLOAT(FW_LND_TLALT, -1.0f);
/**
* Landing heading hold horizontal distance
* Landing heading hold horizontal distance.
* Set to 0 to disable heading hold.
*
* @unit m
* @min 0