Explanation to ewma and average calculation

Hi All,

i am searching for some more detailed explanation to the
ewma and average calculations in gnuradio.
There is something written at,
So i think the average will only be calculated when the threshold does
find something.
However how is the average calculated ?
I can’t find any algorithm to that.

Any hint ?

Regards Markus