mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 03:10:36 +08:00
tecs: propagate altitude setpoint based on target climb/sink rate
- avoids tecs always climbing and sinking and max rates and allows to fine tune these rates - avoid numerical calculation of feedforward velocity using derivative, this was prone to jitter in dt Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Silvan Fuhrer
parent
4b7416c05b
commit
a5cc449e69
@@ -386,7 +386,7 @@ FixedwingPositionControl::tecs_status_publish()
|
||||
break;
|
||||
}
|
||||
|
||||
t.altitude_sp = _tecs.hgt_setpoint_adj();
|
||||
t.altitude_sp = _tecs.hgt_setpoint();
|
||||
t.altitude_filtered = _tecs.vert_pos_state();
|
||||
|
||||
t.true_airspeed_sp = _tecs.TAS_setpoint_adj();
|
||||
@@ -1947,7 +1947,8 @@ FixedwingPositionControl::tecs_update_pitch_throttle(const hrt_abstime &now, flo
|
||||
climbout_pitch_min_rad - radians(_param_fw_psp_off.get()),
|
||||
throttle_min, throttle_max, throttle_cruise,
|
||||
pitch_min_rad - radians(_param_fw_psp_off.get()),
|
||||
pitch_max_rad - radians(_param_fw_psp_off.get()));
|
||||
pitch_max_rad - radians(_param_fw_psp_off.get()),
|
||||
_param_climbrate_target.get(), _param_sinkrate_target.get());
|
||||
|
||||
tecs_status_publish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user