diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-05-27 08:37:59 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-05-27 08:37:59 +0200 |
commit | 10e2a6696976a5210d826dd5826b87db76990eaa (patch) | |
tree | 70fe406e04d8071b5cf77d4a9564e31b589f9af3 /src/modules | |
parent | bb0cae56a0bca879bd3f1720a92d1bf0ca03eda2 (diff) | |
download | px4-firmware-10e2a6696976a5210d826dd5826b87db76990eaa.tar.gz px4-firmware-10e2a6696976a5210d826dd5826b87db76990eaa.tar.bz2 px4-firmware-10e2a6696976a5210d826dd5826b87db76990eaa.zip |
fw pos control: landing: continue horizontally instead of climbing if just below slope
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp index f23719794..e3b6eb261 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp @@ -1031,14 +1031,15 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi /* intersect glide slope: * minimize speed to approach speed - * if current position is higher or within 10m of slope follow the glide slope + * if current position is higher than the slope follow the glide slope (sink to the + * glide slope) * also if the system captures the slope it should stay * on the slope (bool land_onslope) - * if current position is below slope -10m continue at previous wp altitude + * if current position is below the slope continue at previous wp altitude * until the intersection with slope * */ float altitude_desired_rel = relative_alt; - if (relative_alt > landing_slope_alt_rel_desired - 10.0f || land_onslope) { + if (relative_alt > landing_slope_alt_rel_desired || land_onslope) { /* stay on slope */ altitude_desired_rel = landing_slope_alt_rel_desired; if (!land_onslope) { |