42 #include <px4_platform_common/defines.h> 68 _derivative(this,
"D"),
75 return getKP() * input +
76 getKD() * getDerivative().update(input);
79 float getKP() {
return _kP.get(); }
80 float getKD() {
return _kD.get(); }
control::BlockParamFloat _kD
BlockPD(SuperBlock *parent, const char *name)
A proportional-derivative controller.
BlockDerivative _derivative
control::BlockParamFloat _kP
A simple derivative approximation.
float update(float input)
BlockDerivative & getDerivative()