diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-06 14:52:40 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-06 14:52:40 +0100 |
commit | 6f55ba9014972efd060cfd4437a912b9bfff2dad (patch) | |
tree | 09c6defdb259e8a7a58cafffddfb4f4475adbc2f /src/modules/fw_pos_control_l1 | |
parent | cc219b87284158c03510a670273eb41ebc0132f4 (diff) | |
parent | 56aa8c7e8d5c6c4ebd4afabfdda4493db1d9290e (diff) | |
download | px4-firmware-6f55ba9014972efd060cfd4437a912b9bfff2dad.tar.gz px4-firmware-6f55ba9014972efd060cfd4437a912b9bfff2dad.tar.bz2 px4-firmware-6f55ba9014972efd060cfd4437a912b9bfff2dad.zip |
Merge remote-tracking branch 'upstream/fw_autoland' into fw_autoland_att_tecs
Diffstat (limited to 'src/modules/fw_pos_control_l1')
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 8 |
1 files changed, 4 insertions, 4 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 9de6f8366..94b3b75ba 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 @@ -826,7 +826,7 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio float L_altitude = getLandingSlopeAbsoluteAltitude(L_wp_distance, _global_triplet.current.altitude, landing_slope_angle_rad, horizontal_slope_displacement); float landing_slope_alt_desired = getLandingSlopeAbsoluteAltitude(wp_distance, _global_triplet.current.altitude, landing_slope_angle_rad, horizontal_slope_displacement); - if (_global_pos.alt < _global_triplet.current.altitude + flare_relative_alt || land_noreturn_vertical) { //checking for land_noreturn to avoid unwanted climb out + if (((wp_distance < 2.0f * math::max(15.0f, flare_relative_alt)) && (_global_pos.alt < _global_triplet.current.altitude + flare_relative_alt)) || land_noreturn_vertical) { //checking for land_noreturn to avoid unwanted climb out /* land with minimal speed */ @@ -836,9 +836,9 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio /* kill the throttle if param requests it */ throttle_max = _parameters.throttle_max; - if (_global_pos.alt < _global_triplet.current.altitude + motor_lim_relative_alt) { + // if ((_global_pos.alt < _global_triplet.current.altitude + motor_lim_relative_alt)) { throttle_max = math::min(throttle_max, _parameters.throttle_land_max); - } + // } float flare_curve_alt = _global_triplet.current.altitude + H0 * expf(-math::max(0.0f, flare_length - wp_distance)/flare_constant) - H1; @@ -903,7 +903,7 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio _att_sp.yaw_body = _l1_control.nav_bearing(); /* apply minimum pitch and limit roll if target altitude is not within 10 meters */ - if (altitude_error > 10.0f) { + if (altitude_error > 15.0f) { /* enforce a minimum of 10 degrees pitch up on takeoff, or take parameter */ _tecs.update_pitch_throttle(_R_nb, _att.pitch, _global_pos.alt, _global_triplet.current.altitude, calculate_target_airspeed(_parameters.airspeed_min), |