diff options
author | Thomas Gubler <thomasgubler@student.ethz.ch> | 2013-10-31 18:19:16 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@student.ethz.ch> | 2013-10-31 18:19:16 +0100 |
commit | 97a54d1b5e684be36819816c03a54fe8bfd1792f (patch) | |
tree | 863ca38766acf36f2e433de111612001220eb506 /src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | |
parent | 18c5d901889e33167f0967f612fb7e57b3b4a018 (diff) | |
download | px4-firmware-97a54d1b5e684be36819816c03a54fe8bfd1792f.tar.gz px4-firmware-97a54d1b5e684be36819816c03a54fe8bfd1792f.tar.bz2 px4-firmware-97a54d1b5e684be36819816c03a54fe8bfd1792f.zip |
fix missing conversion to absolute altitude
Diffstat (limited to 'src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp')
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 2 |
1 files changed, 1 insertions, 1 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 be6cc0e8c..97b659af8 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 @@ -778,7 +778,7 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio float airspeed_approach = (_parameters.airspeed_min + _parameters.airspeed_trim) / 2.0f; const float landing_slope_angle_rad = 20.0f/180.0f*M_PI_F; //xxx: param - float landing_slope_alt_desired = wp_distance * tanf(landing_slope_angle_rad); + float landing_slope_alt_desired = wp_distance * tanf(landing_slope_angle_rad) + _global_triplet.current.altitude; if (altitude_error > -4.0f) { |