With the help of EMS, I am trying to calculate the running average weighted outside temperature.
The formula is as following:
Running average weighted outside temp = ((Ttoday1)+(Tyesterday0.8)+(Tdaybeforeyesterday*0.3))/2.1
In which: Ttoday is the outside temperature between 0 and 24 hours ago Tyesterday is the average outside temperature between 24 and 48 hour ago. Tdaybeforeyesterday is the average outside temperature between 48 and 72 hour ago.
My question is, how can I do calculate Tyesterday and Tdaybeforeyesterday? I initially thought of using trend variables, but with trendvariables, one can only store the data from now to a certain point in the past, but not from a point in the past (yesterday) to a point further in the past (the day before yesterday) (as far as I am aware).
Does anybody know how I can calculate the Tyesterday and Tdaybeforeyesterday on an hourly level? The running average will later be used in EMS to determine thermostat setpoint on an hourly basis.
Thank you