mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 09:53:33 +08:00
Merge pull request #372 from PX4/pr-tecs_init
TECS initialize throttle integrator at cruise if in air
This commit is contained in:
+1
-1
@@ -531,7 +531,7 @@ void TECS::_initialize_states(float pitch, float throttle_cruise, float baro_alt
|
|||||||
_vert_pos_state = baro_altitude;
|
_vert_pos_state = baro_altitude;
|
||||||
_tas_rate_state = 0.0f;
|
_tas_rate_state = 0.0f;
|
||||||
_tas_state = _EAS * EAS2TAS;
|
_tas_state = _EAS * EAS2TAS;
|
||||||
_throttle_integ_state = 0.0f;
|
_throttle_integ_state = (_in_air ? throttle_cruise : 0.0f);
|
||||||
_pitch_integ_state = 0.0f;
|
_pitch_integ_state = 0.0f;
|
||||||
_last_throttle_setpoint = throttle_cruise;
|
_last_throttle_setpoint = throttle_cruise;
|
||||||
_last_pitch_setpoint = constrain(pitch, _pitch_setpoint_min, _pitch_setpoint_max);
|
_last_pitch_setpoint = constrain(pitch, _pitch_setpoint_min, _pitch_setpoint_max);
|
||||||
|
|||||||
Reference in New Issue
Block a user