File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/modules/fw_pos_control_l1 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -641,13 +641,13 @@ FixedwingPositionControl::update_desired_altitude(float dt)
641
641
if (_manual_control_setpoint_altitude > deadBand) {
642
642
/* pitching down */
643
643
float pitch = -(_manual_control_setpoint_altitude - deadBand) / factor;
644
- _hold_alt += (_param_fw_t_sink_max .get () * dt) * pitch;
644
+ _hold_alt += (_param_sinkrate_target .get () * dt) * pitch;
645
645
_was_in_deadband = false ;
646
646
647
647
} else if (_manual_control_setpoint_altitude < - deadBand) {
648
648
/* pitching up */
649
649
float pitch = -(_manual_control_setpoint_altitude + deadBand) / factor;
650
- _hold_alt += (_param_fw_t_clmb_max .get () * dt) * pitch;
650
+ _hold_alt += (_param_climbrate_target .get () * dt) * pitch;
651
651
_was_in_deadband = false ;
652
652
653
653
} else if (!_was_in_deadband) {
You can’t perform that action at this time.
0 commit comments