Template Class SmoothPid

Class Documentation

template<typename ErrorType, typename ControlType, typename TimeUnit>
class SmoothPid

This will require the use of units::lenth::meters instead of units::length::meter_t The control unit is the unit that is used to change the system The error unit is the unit that the system takes as an input The time unit is unit for the passage of time

Public Types

using Config = tap::algorithms::SmoothPidConfig

Public Functions

inline SmoothPid(const Config &config, ErrorType initialLastError = ErrorType{0})
inline ControlType runController(ErrorType error)

error - how much error This wrapper automatically calculates how much the error has changed and the amount of time which has passed between calls

inline ControlType runController(ErrorType error, double errorDerivative, TimeUnit deltaTime)

Manually include delta time (this is for testing purposes but may bear use to future testers) For implementation purposes, the errorDerivative is stripped of any unit