Rejects a single wild reading, where an average would let it pull the answer.
Creates an empty median filter over up to capacity readings, 32 unless told fewer.
capacity
A small odd window, such as 5, follows a real change in a few readings; a window of 32 follows it 16 readings late.
Optional
How many readings the filter keeps.
The current median, or null before the first reading.
null
Folds a reading in and returns the median of the window.
Rejects a single wild reading, where an average would let it pull the answer.