Signal Management With Median
For measures recorded from the colour reader, the ultrasonic distance sensor and other sophisticated devices prone to erratic values, we need to separated the signal from the noise.
By signal, we mean usable information. At the contrary, noise refers to contaminated and useless measures.
Let's consider two common solutions
As per wikipedia,
In probability theory and statistics, a median is described as the numeric value separating the higher half of a sample, a population, or a probability distribution, from the lower half.
So, if we have five measures, we're going
Result is 2193.
Ready-To-Use Shared Function
Please find below the Robo Pro project ready-to-use Median functions.
Keep in mind:
Download the driver with an example for RoboPro.
This file is under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.