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

3G开发

开发平台:

Visual C++

  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. //
  3. //  File = cheb_filt_intg.cpp
  4. //
  5. //  Chebyshev Filter
  6. //
  7. //#include <math.h>
  8. //#include "misdefs.h"
  9. #include "parmfile.h"
  10. #include "cheb_filt_intg.h"
  11. #include "chebyshev_proto.h"
  12. //#include "filter_types.h"
  13. extern ParmFile *ParmInput;
  14. #ifdef _DEBUG
  15.   extern ofstream *DebugFile;
  16. #endif
  17. //======================================================
  18. //  constructor
  19. ChebyshevFilterByInteg::ChebyshevFilterByInteg( 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.   // Most of the parameters needed to specify a Chebyshev filter
  30.   // are common to all the classic types and are therefore
  31.   // read by the AnalogFilter base class.
  32.   //
  33.   // 'Ripple' is specific to Chebyshev so it is read here in the drerived class
  34.   
  35.   if( !Bypass_Enabled)
  36.     {
  37.     GET_DOUBLE_PARM(Passband_Ripple_In_Db);
  38.     GET_BOOL_PARM(Bw_Is_Ripple_Bw);
  39.     // construct a Chebyshev prototype
  40.     Lowpass_Proto_Filt = new ChebyshevPrototype(  Prototype_Order, 
  41.                                                   Passband_Ripple_In_Db,
  42.                                                   Bw_Is_Ripple_Bw);
  43.     Lowpass_Proto_Filt->DumpBiquads(DebugFile);
  44.     Lowpass_Proto_Filt->GetDenomPoly(false);
  45.     }
  46.   return;
  47. }