42 #include <px4_platform_common/defines.h> 69 _derivative(this,
"D"),
77 return getKP() * input +
78 getKI() * getIntegral().update(input) +
79 getKD() * getDerivative().update(input);
82 float getKP() {
return _kP.get(); }
83 float getKI() {
return _kI.get(); }
84 float getKD() {
return _kD.get(); }
BlockDerivative & getDerivative()
control::BlockParamFloat _kD
BlockDerivative _derivative
float update(float input)
A rectangular integrator.
A proportional-integral-derivative controller.
control::BlockParamFloat _kP
A simple derivative approximation.
control::BlockParamFloat _kI
BlockPID(SuperBlock *parent, const char *name)
BlockIntegral & getIntegral()