butt_filt_intg.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:1k
源码类别:

3G开发

开发平台:

Visual C++

  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. //
  3. //  File = butt_filt_intg.cpp
  4. //
  5. //  Butterworth Filter by IIR model
  6. //
  7. //#include <math.h>
  8. //#include "misdefs.h"
  9. //#include "parmfile.h"
  10. #include "butt_filt_intg.h"
  11. #include "butterworth_proto.h"
  12. //#include "filter_types.h"
  13. //extern ParmFile ParmInput;
  14. #ifdef _DEBUG
  15.   extern ofstream *DebugFile;
  16. #endif
  17. //================================================================
  18. //  constructor
  19. ButterworthFilterByInteg::ButterworthFilterByInteg( char *instance_name,
  20.                                       PracSimModel *outer_model,
  21.                                       Signal<float> *in_sig,
  22.                                       Signal<float> *out_sig )
  23.                   :AnalogFilterByInteg( instance_name,
  24.                                outer_model,
  25.                                in_sig,
  26.                                out_sig )
  27. {
  28.   //OPEN_PARM_BLOCK;
  29.   // All of the parameters needed to specify a Butterworth filter
  30.   // are common to all the classic types: Chebyshev, Elliptical, Bessel.
  31.   // Since they will be needed by all types of filters they are
  32.   // read by the AnalogFilter base class.
  33.   
  34.   //if( !Bypass_Enabled)
  35.     //{
  36.     // construct a Butterworth prototype
  37.     Lowpass_Proto_Filt = new ButterworthPrototype(Prototype_Order);
  38.     Lowpass_Proto_Filt->DumpBiquads(DebugFile);
  39.     Lowpass_Proto_Filt->GetDenomPoly(false);
  40.     //}
  41.   return;
  42. }