tecs: moved trivial getter methods to header file

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst 2020-12-11 09:30:23 +03:00 committed by Roman Bapst
parent 701c105ab6
commit e546584555
2 changed files with 5 additions and 24 deletions

View File

@ -627,23 +627,3 @@ void TECS::_update_speed_height_weights()
_SPE_weighting = constrain(2.0f - _SKE_weighting, 0.f, 1.f);
_SKE_weighting = constrain(_SKE_weighting, 0.f, 1.f);
}
float TECS::SEB()
{
return _SPE_estimate * _SPE_weighting - _SKE_estimate * _SKE_weighting;
}
float TECS::SEB_setpoint()
{
return _SPE_setpoint * _SPE_weighting - _SKE_setpoint * _SKE_weighting;
}
float TECS::SEB_rate()
{
return _SPE_rate * _SPE_weighting - _SKE_rate * _SKE_weighting;
}
float TECS::SEB_rate_setpoint()
{
return _SPE_rate_setpoint * _SPE_weighting - _SKE_rate_setpoint * _SKE_weighting;
}

View File

@ -164,13 +164,14 @@ public:
float STE_rate_setpoint() { return _SPE_rate_setpoint + _SKE_rate_setpoint; }
float SEB();
float SEB() { return _SPE_estimate * _SPE_weighting - _SKE_estimate * _SKE_weighting; }
float SEB_setpoint();
float SEB_setpoint() { return _SPE_setpoint * _SPE_weighting - _SKE_setpoint * _SKE_weighting; }
float SEB_rate();
float SEB_rate() { return _SPE_rate * _SPE_weighting - _SKE_rate * _SKE_weighting; }
float SEB_rate_setpoint() { return _SPE_rate_setpoint * _SPE_weighting - _SKE_rate_setpoint * _SKE_weighting; }
float SEB_rate_setpoint();
/**
* Handle the altitude reset