|
|
|
@ -242,6 +242,21 @@ public:
@@ -242,6 +242,21 @@ public:
|
|
|
|
|
_lowPass(this, "LP") |
|
|
|
|
{}; |
|
|
|
|
virtual ~BlockDerivative() {}; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update the state and get current derivative |
|
|
|
|
* |
|
|
|
|
* This call updates the state and gets the current |
|
|
|
|
* derivative. As the derivative is only valid |
|
|
|
|
* on the second call to update, it will return |
|
|
|
|
* no change (0) on the first. To get a closer |
|
|
|
|
* estimate of the derivative on the first call, |
|
|
|
|
* call setU() one time step before using the |
|
|
|
|
* return value of update(). |
|
|
|
|
* |
|
|
|
|
* @param input the variable to calculate the derivative of |
|
|
|
|
* @return the current derivative |
|
|
|
|
*/ |
|
|
|
|
float update(float input); |
|
|
|
|
// accessors
|
|
|
|
|
void setU(float u) {_u = u;} |
|
|
|
|