Component: Running Average Float (Calculation)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Calculation


Running Average Float component

Allows a value from a sensor to be averaged out filtering out high frequencies and removing noise. Running average means we have a variable that we maintain that on each pass will be 10% new value + 90% old value for example at a ratio of 0.1.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

Filter

Fc9-comp-macro.png Filter
Performs the filtering function, passing in the latest sampled value and outputting the latest filtered value. 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-f32-icon.png - FLOAT Return


SetFilterRatio

Fc9-comp-macro.png SetFilterRatio
Sets the amount of input that makes it into each output. 0.25 would be 25% new and 75% old. 
Fc9-f32-icon.png - FLOAT Ratio
Range: 0.0 to 1.0 
Fc9-void-icon.png - VOID Return


SetFilterValue

Fc9-comp-macro.png SetFilterValue
Sets the absolute value of the filter value i.e. for setting the initial state. 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RunningAverageFloat.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RunningAverageFloat.fcfx