Package org.chsrobotics.lib.math.filters
Interface Filter
-
- All Known Implementing Classes:
DifferentiatingFilter,PeakDetectionFilter,RateLimiter,ThresholdFilter
public interface FilterCommon interface for this library's filters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublecalculate(double value)Adds the value to the window and calculates the current output of the filterdoublegetCurrentOutput()Returns the current output of the filter without updating with a new value.voidreset()Resets the history of the filter.
-
-
-
Method Detail
-
calculate
double calculate(double value)
Adds the value to the window and calculates the current output of the filter- Parameters:
value- The value to input to the filter.- Returns:
- The current output of the filter.
-
reset
void reset()
Resets the history of the filter.
-
getCurrentOutput
double getCurrentOutput()
Returns the current output of the filter without updating with a new value.- Returns:
- The current output of the filter (0 if no values have been given to
calculate()).
-
-