From 701c105ab685656430494504dc95194aaa9320e4 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Fri, 11 Dec 2020 09:26:56 +0300 Subject: [PATCH] Update src/lib/tecs/TECS.cpp Co-authored-by: Mathieu Bresciani --- src/lib/tecs/TECS.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/tecs/TECS.cpp b/src/lib/tecs/TECS.cpp index a4cf405658..2fab00db54 100644 --- a/src/lib/tecs/TECS.cpp +++ b/src/lib/tecs/TECS.cpp @@ -254,10 +254,8 @@ void TECS::_update_energy_estimates() // Calculate the specific energy balance demand which specifies how the available total // energy should be allocated to speed (kinetic energy) and height (potential energy) - float SEB_setpoint = _SPE_setpoint * _SPE_weighting - _SKE_setpoint * _SKE_weighting; - // Calculate the specific energy balance error - _SEB_error = SEB_setpoint - (_SPE_estimate * _SPE_weighting - _SKE_estimate * _SKE_weighting); + _SEB_error = SEB_setpoint() - (_SPE_estimate * _SPE_weighting - _SKE_estimate * _SKE_weighting); // Calculate specific energy rate demands in units of (m**2/sec**3) _SPE_rate_setpoint = _hgt_rate_setpoint * CONSTANTS_ONE_G; // potential energy rate of change