00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <Alloc.hh>
00024 #include <dsp/DSPOp.hh>
00025 #include <dsp/RecDecimator.hh>
00026
00027 #include "Config.h"
00028 #include "RemoveNoise.hh"
00029 #include "SpectDir.hh"
00030
00031
00032 #ifndef SPECTDIRDIPOLE_HH
00033 #define SPECTDIRDIPOLE_HH
00034
00035
00036
00037
00041 enum
00042 {
00043 SDD_SCALE_LIN = 0,
00044 SDD_SCALE_LOG = 1
00045 };
00046
00050 enum
00051 {
00052 SDD_BNER_NONE = 0,
00053 SDD_BNER_TPSW = 1,
00054 SDD_BNER_OTA = 2,
00055 SDD_BNER_DIFF = 3,
00056 SDD_BNER_IDIFF = 4
00057 };
00058
00059
00066 class clSpectDirDipole : public clSpectDir
00067 {
00068 bool bDebug;
00069 long lDirectionCount;
00070 long lFilterSize;
00071 long lFFTSize;
00072 long lDecimation;
00073 long lSpectSize;
00074 long lMinBin;
00075 long lMaxBin;
00076 long lNewData;
00077 long lOldData;
00078 float fOverlap;
00079 GDT fFreqRes;
00080 GDT fIntTime;
00081 GDT *fpWinFunc;
00082 GDT *fpExtBuf;
00083 GDT *fpProcBuf[2];
00084 GDT *fpPrevBuf[2];
00085 GDT *fpRNBuf[2];
00086 GCDT *spSpect[2];
00087 clDSPAlloc WinFuncBuf;
00088 clDSPAlloc ExtBuf;
00089 clDSPAlloc ProcBuf[2];
00090 clDSPAlloc PrevBuf[2];
00091 clDSPAlloc RNBuf[2];
00092 clDSPAlloc SpectBuf[2];
00093 clRecDecimator Decimator[2];
00094 clRemoveNoise BNER;
00095 void Calculate (int, stpSpectDirRN);
00096 public:
00110 clSpectDirDipole (GDT, GDT, double, long, int, long, long, GDT,
00111 bool);
00112 ~clSpectDirDipole ();
00121 void PutData (const GDT *, long, long, long);
00135 bool GetResults (GDT *, GDT, int, stpSpectDirRN);
00139 void ResetResults ();
00145 GDT GetIntegrationTime () { return fIntTime; }
00146 };
00147
00148 #endif
00149