This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Temperature tendency
#7
You can use simple IIR filter to calculate average values:
Code:
123456789101112
ALPHA = 0.1 -- between 0 and 1, adjust as needed function iir_filter(val, avg)   return val * ALPHA + avg * (1 - ALPHA) end avg = 0 for val = 1, 10 do   avg = iir_filter(val, avg) end log(avg)
Reply


Messages In This Thread
Temperature tendency - by Thomas - 10.10.2019, 16:05
RE: Temperature tendency - by admin - 11.10.2019, 07:14
RE: Temperature tendency - by Tokatubs - 11.10.2019, 10:33
RE: Temperature tendency - by admin - 11.10.2019, 10:48
RE: Temperature tendency - by Thomas - 02.12.2019, 20:13
RE: Temperature tendency - by admin - 03.12.2019, 08:28

Forum Jump: