public class IntegrationFilter extends AbstractFilter
Modifier and Type | Field and Description |
---|---|
private float[] |
currentValue |
private long |
lastTime |
private static float |
NANO |
sampleSize, source
Constructor and Description |
---|
IntegrationFilter(SampleProvider source) |
Modifier and Type | Method and Description |
---|---|
void |
fetchSample(float[] sample,
int off)
Fetches a sample from the source and then integrates it.
|
void |
resetTo(float value)
Sets the current value of the integrator to the specified value.
|
sampleSize
private long lastTime
private final float[] currentValue
private static final float NANO
public IntegrationFilter(SampleProvider source)
public void resetTo(float value)
value
- The valuepublic void fetchSample(float[] sample, int off)
fetchSample
in interface SampleProvider
fetchSample
in class AbstractFilter
sample
- The array to store the sample in.off
- The elements of the sample are stored in the array starting at the offset position.AbstractFilter.fetchSample(float[], int)