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

3G开发

开发平台:

Visual C++

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