Component: Modified Moving Average 16-bit (Calculation)

From Flowcode Help
Revision as of 14:13, 22 October 2025 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Calculation


Modified Moving Average 16-bit component

Allows a value from a sensor to be averaged out filtering out high frequencies and removing noise. Modified moving average means we maintain a sum of the last n number of samples. On each new sample we subtract the previous result and then add in the latest raw sample.

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-s16-icon.png - INT Value
 
Fc9-f32-icon.png - FLOAT Return


InitialiseFilter

Fc9-comp-macro.png InitialiseFilter
Preload the filter with the specified value and sets the number of samples to average over. Must be called before calling the filter macro. 
Fc9-s16-icon.png - INT FilterValue
 
Fc9-u16-icon.png - UINT NumSamples
Specifies the number of samples to average over. 
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_ModifiedMovingAverage.fcfx

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