Browse Source

fw pos ctrl: add missing guidance control interval setting to control_manual_position()

v1.13.0-BW
Thomas Stastny 3 years ago committed by Daniel Agar
parent
commit
f60d38db65
  1. 8
      src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

8
src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

@ -2109,6 +2109,14 @@ FixedwingPositionControl::control_manual_position(const hrt_abstime &now, const @@ -2109,6 +2109,14 @@ FixedwingPositionControl::control_manual_position(const hrt_abstime &now, const
{
const float dt = update_position_control_mode_timestep(now);
// update lateral guidance timesteps for slewrates
if (_param_fw_use_npfg.get()) {
_npfg.setDt(dt);
} else {
_l1_control.set_dt(dt);
}
// if we assume that user is taking off then help by demanding altitude setpoint well above ground
// and set limit to pitch angle to prevent steering into ground
// this will only affect planes and not VTOL

Loading…
Cancel
Save