A HITI Signal Filter is a variable which lets you filter your data on the fly while you receive them. It is ideal to filter a continuous data stream, and it is particularly useful for filtering data from your sensors to:
- remove electrical noise
- smooth low-resolution data and increase resolution
- improve data quality and reading
Filtering is interesting for sensors with poor resolution or placed in environments with strong electronic noise.
How does it work ?
A HITI Signal Filter processes input data that you give it and calculates a filtered output based on the last input data it received. By default, it processes the last 10 data you gave it, but you are free to change this number by using setBufferSize(size). The max is 255. If needed, you can clear() this buffer at any time.
2 filters are available: average and median. To filter your input data (float), simply use the following functions:
- average(input data) => returns the average value (float) of the last xxx input data
- median(input data) => returns the median value (float) of the last xxx input data
Examples
Refer to this example : HITI Signal Filter (Smoothing sensor data)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article