The MovingAverage object calculates the average value of the input over a given time interval.
y = { x + Σ(i = M to M-N-2) X(i) } / N
where:
y = present output value for the MovingAverage object
x = present input to the MovingAverage object
N = NumberOfSamples
M = number of updates that have been performed previously
X(i) = input to the MovingAverage object at the ith update time
The value returned by the MovingAverage object is calculated on demand. The update signal received from the Controller is used only to record the values X(i) used in the calculation.