Vadim,
From my time working with NTP, I am fond of median filters. Dave Mills
is a wizard of all such things and uses a median filter to remove noise
from client time updates. You can only use this when the update rate is
significantly faster that the system response time. Dave uses this to
front his time software PLL. This is a guy who thinks that 1ms errors
are ok for the masses but not anywhere near acceptable for anyone who
cares. I've had more than one machine running his software that is
software clock traceable to <10us. I have also caught GPS time sources
having microsecond level systemic offsets.
It's simple enough that I don't use a library. You keep an odd length
queue (maybe 3 or 5 long) . When a new entry comes in, you sort the
queue into a list and take the entry in the middle of the list. This
prevents a single (or two) outliers from impacting the second stage. It
comes at the price of a 1-2 read cycle delay when a real change comes
in. Since in general with heating/cooling systems, the read time is much
faster than the system response time, this is acceptable.
This is what I use (queue length 3) for my zone temp filter. If you are
using 1-wire sensors, this assumes that you have filtered out false 85c
readings first, since it is theoretically possible to get a string of these.
enjoy,
jerry