V001. 2017_11_30 10:21 Working code from Tuesday's lab session.
Fork of 2017_11_28_ELEC347_Coursework by
DSP Coursework ELEC347 2017-2018 Group members: Matthew Thewsey, Thomas Morris, Samuel Waggett, Christopher Hills .
Diff: Filter.hpp
- Revision:
- 2:f6e49378dd8a
- Parent:
- 1:b088b771a591
- Child:
- 6:a2737b51424c
--- a/Filter.hpp Tue Nov 28 09:41:07 2017 +0000 +++ b/Filter.hpp Tue Nov 28 09:51:30 2017 +0000 @@ -9,10 +9,18 @@ //Can be interrupt driven int _Fs; int _Fo; - int _Boost; + double _Boost; int _Q; - - float FilterOutput; + double _Wo_d; + double _Wo_d2; + float _Com_Den; + float _NC0; + float _NC1; + float _NC2; + float _DC1; + float _DC2; + + float _FilterOutput; float _centreTap; //internal node of filter float _b0; float _b1; @@ -45,16 +53,18 @@ public: - FILTER(int Fs, int Fo, int Boost, int Q); //Constuctor + FILTER(int Fs, int Fo, double Boost, int Q); //Constuctor ~FILTER(); //deConstuctor - //setters - void setvalue(int RAW_input); //xn sample input + //Constuct filter + + void Define_Filter(); //Calculates the coefficeints of the filter + + //Setters + void setvalue(float RAW_input); //xn sample input - //getters + //Getters float getvalue(void); //returns yn - }; -https://os.mbed.com/users/thomasmorris/code/ELEC347_CourseWork/ \ No newline at end of file