TECS: in airspeed-less mode, set airspeed estimate to cruise airspeed

In airspeed-less mode, instead of the average of min/max airspeed, take the cruise
airspeed (from param) for current airspeed estimate. A diff of the airspeed setpoint
from this value results in increased enegery demand (incerase of throttle) even
in airspeed-less mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2021-05-28 14:25:53 +02:00
parent f9fe0e3746
commit 4b42a1639b
3 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -116,9 +116,9 @@ void TECS::_update_speed_states(float equivalent_airspeed_setpoint, float equiva
_TAS_max = _equivalent_airspeed_max * EAS2TAS;
_TAS_min = _equivalent_airspeed_min * EAS2TAS;
// If airspeed measurements are not being used, fix the EAS estimate to halfway between min and max limits
// If airspeed measurements are not being used, fix the airspeed estimate to the nominal cruise airspeed
if (!PX4_ISFINITE(equivalent_airspeed) || !airspeed_sensor_enabled()) {
_EAS = 0.5f * (_equivalent_airspeed_min + _equivalent_airspeed_max);
_EAS = _equivalent_airspeed_cruise;
} else {
_EAS = equivalent_airspeed;