A 10-Point moving average filter that returns a float each time a new value is added to the moving average array.
Fork of MovingAverageFilter by
MAF.h@2:21b70641f866, 2014-05-16 (annotated)
- Committer:
- joe4465
- Date:
- Fri May 16 14:17:38 2014 +0000
- Revision:
- 2:21b70641f866
- Parent:
- 1:fbc57eb4e61d
Added RC control - still not holding attitude correctly
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KarimAzzouz | 0:c1b48befe066 | 1 | #ifndef MAF_H |
KarimAzzouz | 0:c1b48befe066 | 2 | #define MAF_H |
KarimAzzouz | 0:c1b48befe066 | 3 | |
KarimAzzouz | 0:c1b48befe066 | 4 | #include "mbed.h" |
KarimAzzouz | 0:c1b48befe066 | 5 | |
joe4465 | 2:21b70641f866 | 6 | class MAF |
joe4465 | 2:21b70641f866 | 7 | { |
KarimAzzouz | 0:c1b48befe066 | 8 | public: |
joe4465 | 2:21b70641f866 | 9 | MAF(); |
KarimAzzouz | 1:fbc57eb4e61d | 10 | float update(float data); |
KarimAzzouz | 0:c1b48befe066 | 11 | |
KarimAzzouz | 0:c1b48befe066 | 12 | private : |
joe4465 | 2:21b70641f866 | 13 | float _k[10]; |
KarimAzzouz | 0:c1b48befe066 | 14 | float _result; |
KarimAzzouz | 0:c1b48befe066 | 15 | }; |
KarimAzzouz | 0:c1b48befe066 | 16 | |
KarimAzzouz | 0:c1b48befe066 | 17 | #endif |