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 "SpectDir2.hh"
00030
00031
00032 #ifndef SPECTDIRDIPOLE2_HH
00033 #define SPECTDIRDIPOLE2_HH
00034
00035
00036
00037
00038 enum
00039 {
00040 SDD2_SCALE_LIN = 0,
00041 SDD2_SCALE_LOG = 1
00042 };
00043
00044 enum
00045 {
00046 SDD2_BNER_NONE = 0,
00047 SDD2_BNER_TPSW = 1,
00048 SDD2_BNER_OTA = 2,
00049 SDD2_BNER_DIFF = 3,
00050 SDD2_BNER_IDIFF = 4
00051 };
00052
00053
00061 class clSpectDirDipole2 : public clSpectDir2
00062 {
00063 bool bDebug;
00064 long lFilterSize;
00065 long lFFTSize;
00066 long lDecimation;
00067 long lSpectSize;
00068 long lMinBin;
00069 long lMaxBin;
00070 long lNewData;
00071 long lOldData;
00072 float fOverlap;
00073 GDT fFreqRes;
00074 GDT fIntTime;
00075 GDT *fpWinFunc;
00076 GDT *fpLevRes;
00077 GDT *fpDirRes;
00078 GDT *fpExtBuf;
00079 GDT *fpProcBuf[2];
00080 GDT *fpPrevBuf[2];
00081 GDT *fpRNBuf[2];
00082 GCDT *spSpect[2];
00083 clDSPAlloc WinFuncBuf;
00084 clDSPAlloc LevResBuf;
00085 clDSPAlloc DirResBuf;
00086 clDSPAlloc ExtBuf;
00087 clDSPAlloc ProcBuf[2];
00088 clDSPAlloc PrevBuf[2];
00089 clDSPAlloc RNBuf[2];
00090 clDSPAlloc SpectBuf[2];
00091 clRecDecimator Decimator[2];
00092 clRemoveNoise BNER;
00093 void Calculate (int, stpSpectDir2RN);
00094 public:
00107 clSpectDirDipole2 (GDT, GDT, double, long, int, long, GDT, bool);
00108 ~clSpectDirDipole2 ();
00117 void PutData (const GDT *, long, long, long);
00128 bool GetResults (GDT *, GDT *, GDT, int, stpSpectDir2RN);
00134 GDT *GetLevels () { return fpLevRes; }
00140 GDT *GetDirections () { return fpDirRes; }
00146 GDT GetIntegrationTime () { return fIntTime; }
00152 GDT GetFreqResolution () { return fFreqRes; }
00158 long GetMinBin () { return lMinBin; }
00164 long GetMaxBin () { return lMaxBin; }
00170 long GetResultCount () { return lSpectSize; }
00171 };
00172
00173 #endif
00174