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

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = filter_response.h
  3. //
  4. #ifndef _FILTER_RESPONSE_H_
  5. #define _FILTER_RESPONSE_H_
  6. #include <complex>
  7. #include "floatsig.h"
  8. #include "psmodel.h"
  9. typedef enum {
  10.   LOWPASS_FILT_CONFIG,
  11.   HIGHPASS_FILT_CONFIG,
  12.   BANDPASS_FILT_CONFIG,
  13.   BANDSTOP_FILT_CONFIG
  14.   } FILT_RESP_CONFIG_T;
  15. class FilterResponse
  16. {
  17. public:
  18.   FilterResponse( int order );
  19.   ~FilterResponse(void);
  20.   std::complex<double> *GetProtoypeZeros( int *num_zeros );
  21.   std::complex<double> *GetProtoypePoles( int *num_poles );
  22.   double GetHZero(void);
  23.   void LowpassDenorm( double cutoff_freq_nfu,
  24.                       std::complex<double> **lowpass_pole_locs,
  25.                       int *num_lowpass_poles,
  26.                       std::complex<double> **lowpass_zero_locs,
  27.                       int *num_lowpass_zeros,
  28.                       double *h_zero );
  29.   void FilterFrequencyResponse(void);
  30. protected:
  31.   char *Response_Name;
  32.   
  33.   int Filt_Order;
  34.   
  35.   std::complex<double> *Prototype_Pole_Locs;
  36.   std::complex<double> *Prototype_Zero_Locs;
  37.   double H_Zero;
  38.   int Num_Prototype_Poles;
  39.   int Num_Prototype_Zeros;
  40.   std::complex<double> *Denorm_Pole_Locs;
  41.   std::complex<double> *Denorm_Zero_Locs;
  42.   int Num_Denorm_Poles;
  43.   int Num_Denorm_Zeros;
  44.   ofstream *ResponseFile;
  45.     
  46. };
  47. #endif