LimitRate
-
template<fgc4::utils::NumericScalar T>
class LimitRate : public vslib::Component Public Functions
-
inline LimitRate(std::string_view name, Component &parent)
Constructor for the LimitRate component, initializes change_rate Parameter.
-
inline T limit(T input, const double time_difference)
Checks the input against the maximal rate of change.
- Parameters:
input – Numerical input to be checked
time_difference – Time difference between function calls
- Returns:
Either original input if no issues were found or maximal allowed rate, 0.0 if NaN was provided or time_difference is 0
-
inline void reset() noexcept
Resets the component to the initial state of the previous_value.
-
inline LimitRate(std::string_view name, Component &parent)