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 .
Filter.hpp
- Committer:
- thomasmorris
- Date:
- 2017-12-02
- Revision:
- 11:7efb6e4759cc
- Parent:
- 7:6cb27cce4c50
- Child:
- 13:db76473a3d76
File content as of revision 11:7efb6e4759cc:
class FILTER { private: int _Fs; int _Fo; double _Boost; int _Q; double _Wo_d; double _Wo_d2; float _Com_Den; float _NC0,_NC1,_NC2,_DC1,_DC2; float _FilterOutput; float _centreTap; //internal node of filter float _b0; float _b1; float _b2; float _b3; float _b4; // A - Denominator coefficients float _a0; float _a1; float _a2; float _a3; float _a4; //Filter Parameters float _G; float _k; float _Wo; //Filter input Variables float _xn;//Current Filter input valuew float _xnm1;//Old filter inputs float _xnm2; float _xnm3; float _xnm4; //Filter Output Variables float _yn;//Current Filter Output Value float _ynm1; float _ynm2; float _ynm3; float _ynm4; public: FILTER(int Fs, int Fo, double Boost, int Q);//Constuctor ~FILTER();//Destuctor void Define_Filter();//Calculates the coefficeints of the filter void Print_Filter();//Print Filter Coefficients //Setters void setvalue(float RAW_input);//Sets the latest xn sample input value void Update_Boost(double Boost_New);//Updates the Boost Value void Update_Q(int Q_New);//Sets the Value of Q void Update_Fo(int Fo_New);//Update Centre Frequency //Getters float getvalue(void);//returns yn double Get_Boost();//Gets the Boost Value int Get_Q();//Gets the value of Q int Get_Fo(); //Gets the current value of Centre Frequency };