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

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = welch_pdgm.h
  3. //
  4. #ifndef _WELCH_PDGM_H_
  5. #define _WELCH_PDGM_H_
  6. #include "psmodel.h"
  7. #include "signal_T.h"
  8. #include "gen_win.h"
  9. #include "window_shapes.h"
  10. //#include "spect_calc_kinds.h"
  11. //#include "samp_spect.h"
  12. //#include "compress.h"
  13. //#include "dirform1.h"
  14. //using namespace std;
  15. template <class T>
  16. class WelchPeriodogram : public PracSimModel
  17. {
  18. public:
  19.   WelchPeriodogram( char* instance_name,
  20.                     PracSimModel* outer_model,
  21.                     Signal<T>* in_sig );
  22.   ~WelchPeriodogram(void);
  23.   void Initialize(void);
  24.   int Execute(void);
  25. private:
  26.   int Block_Size;
  27.   Signal<T> *In_Sig;
  28.   std::complex<double> *Freq_Seg;
  29.   double *Sample_Spectrum;
  30.   double Samp_Intvl;
  31.   //double *Sample_Spectrum;
  32.   T *Time_Seg;
  33.   T *Overlap_Seg;
  34.   T *Win_Time_Seg;
  35.   double *Psd_Est;
  36.   int Num_Segs_To_Avg;
  37.   int Segs_In_Est;
  38.   int Fft_Len;
  39.   int Hold_Off;
  40.   int Seg_Len;
  41.   int Samps_Needed;
  42.   int Shift_Between_Segs;
  43.   int Overlap_Len;
  44.   char *Psd_File_Name;
  45.   ofstream *Psd_File;
  46.   bool Halt_When_Completed;
  47.   bool Processing_Completed;
  48.   bool Output_In_Decibels;
  49.   bool Plot_Two_Sided;
  50.   bool Using_Window;
  51.   GenericWindow* Data_Window;
  52.   double *Window_Taps;
  53.   WINDOW_SHAPE_T Window_Shape;
  54.   double Delta_F;
  55.   double Norm_Factor;
  56.   double Freq_Norm_Factor;
  57.   double Window_Power;
  58.   //void (*Spectrum_Calc)( T* time_signal,
  59.   //                   double* psd_estimate,
  60.   //                   int num_samps,
  61.   //                   int fft_len,
  62.   //                   double samp_intvl );
  63. //   KIND_OF_SPECT_CALC_T Kind_Of_Spec_Estim;
  64. };
  65. #endif //_BART_PDGM_WIND_H_