00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <vector>
00024
00025 #include <Alloc.hh>
00026 #include <dsp/DSPOp.hh>
00027 #include <dsp/RecDecimator.hh>
00028
00029 #include "Config.h"
00030 #include "RemoveNoise.hh"
00031 #include "SpectDir.hh"
00032
00033
00034 #ifndef SPECTDIRLINE_HH
00035 #define SPECTDIRLINE_HH
00036
00037
00038
00039
00043 enum
00044 {
00045 SDL_SCALE_LIN = 0,
00046 SDL_SCALE_LOG = 1
00047 };
00048
00052 enum
00053 {
00054 SDL_BNER_NONE = 0,
00055 SDL_BNER_TPSW = 1,
00056 SDL_BNER_OTA = 2,
00057 SDL_BNER_DIFF = 3,
00058 SDL_BNER_IDIFF = 4
00059 };
00060
00061
00068 class clSpectDirLine : public clSpectDir
00069 {
00070 bool bDebug;
00071 long lSensorCount;
00072 long lDirectionCount;
00073 long lFilterSize;
00074 long lFFTSize;
00075 long lDecimation;
00076 long lSpectSize;
00077 long lMinBin;
00078 long lMaxBin;
00079 long lNewData;
00080 long lOldData;
00081 float fOverlap;
00082 GDT fFreqRes;
00083 GDT fIntTime;
00084 GDT *fpWinFunc;
00085 GDT *fpExtBuf;
00086 std::vector<GDT *> vfpProcBuf;
00087 std::vector<GDT *> vfpPrevBuf;
00088 std::vector<GDT *> vfpRNBuf;
00089 std::vector<GCDT *> vspSpect;
00090 clDSPAlloc WinFuncBuf;
00091 clDSPAlloc ExtBuf;
00092 std::vector<clDSPAlloc> vProcBuf;
00093 std::vector<clDSPAlloc> vPrevBuf;
00094 std::vector<clDSPAlloc> vRNBuf;
00095 std::vector<clDSPAlloc> vSpectBuf;
00096 std::vector<clRecDecimator *> vDecimator;
00097 clRemoveNoise BNER;
00098 void Calculate (int, stpSpectDirRN);
00099 public:
00114 clSpectDirLine (long, GDT, GDT, double, long, int, long, long, GDT,
00115 bool);
00116 ~clSpectDirLine ();
00125 void PutData (const GDT *, long, long, long);
00139 bool GetResults (GDT *, GDT, int, stpSpectDirRN);
00143 void ResetResults ();
00149 GDT GetIntegrationTime () { return fIntTime; }
00150 };
00151
00152 #endif
00153