TECS: run underspeed detection method before calculating speed demand

- the method in TECS for detecting an underspeed condition was run after
the method which calculated the airspeed demand. As a result the specific
engergy balance error signal showed a spike when TECS detected an underspeed
condition.

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman 2016-11-01 14:26:43 +01:00 committed by Paul Riseborough
parent dc6ca7c372
commit eec55a0918
1 changed files with 3 additions and 2 deletions

View File

@ -583,14 +583,15 @@ void TECS::update_pitch_throttle(const math::Matrix<3,3> &rotMat, float pitch, f
// Calculate Specific Total Energy Rate Limits
_update_STE_rate_lim();
// Detect underspeed condition
_detect_underspeed();
// Calculate the speed demand
_update_speed_demand();
// Calculate the height demand
_update_height_demand(hgt_dem, baro_altitude);
// Detect underspeed condition
_detect_underspeed();
// Calculate specific energy quantitiues
_update_energies();