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 "SpectDir2.hh"
00032
00033
00034 #ifndef SPECTDIRLINE2_HH
00035 #define SPECTDIRLINE2_HH
00036
00037
00038
00039
00040 enum
00041 {
00042 SDL2_SCALE_LIN = 0,
00043 SDL2_SCALE_LOG = 1
00044 };
00045
00046 enum
00047 {
00048 SDL2_BNER_NONE = 0,
00049 SDL2_BNER_TPSW = 1,
00050 SDL2_BNER_OTA = 2,
00051 SDL2_BNER_DIFF = 3,
00052 SDL2_BNER_IDIFF = 4
00053 };
00054
00055
00063 class clSpectDirLine2 : public clSpectDir2
00064 {
00065 bool bDebug;
00066 long lSensorCount;
00067 long lFilterSize;
00068 long lFFTSize;
00069 long lDecimation;
00070 long lSpectSize;
00071 long lMinBin;
00072 long lMaxBin;
00073 long lNewData;
00074 long lOldData;
00075 float fOverlap;
00076 GDT fFreqRes;
00077 GDT fIntTime;
00078 GDT *fpWinFunc;
00079 GDT *fpLevRes;
00080 GDT *fpDirRes;
00081 GDT *fpExtBuf;
00082 std::vector<GDT *> vfpProcBuf;
00083 std::vector<GDT *> vfpPrevBuf;
00084 std::vector<GDT *> vfpRNBuf;
00085 std::vector<GCDT *> vspSpect;
00086 clDSPAlloc WinFuncBuf;
00087 clDSPAlloc LevResBuf;
00088 clDSPAlloc DirResBuf;
00089 clDSPAlloc ExtBuf;
00090 std::vector<clDSPAlloc> vProcBuf;
00091 std::vector<clDSPAlloc> vPrevBuf;
00092 std::vector<clDSPAlloc> vRNBuf;
00093 std::vector<clDSPAlloc> vSpectBuf;
00094 std::vector<clRecDecimator *> vDecimator;
00095 clRemoveNoise BNER;
00096 void Calculate (int, stpSpectDir2RN);
00097 public:
00111 clSpectDirLine2 (long, GDT, GDT, double, long, int, long, GDT, bool);
00112 ~clSpectDirLine2 ();
00121 void PutData (const GDT *, long, long, long);
00132 bool GetResults (GDT *, GDT *, GDT, int, stpSpectDir2RN);
00138 GDT *GetLevels () { return fpLevRes; }
00144 GDT *GetDirections () { return fpDirRes; }
00150 GDT GetIntegrationTime () { return fIntTime; }
00156 GDT GetFreqResolution () { return fFreqRes; }
00162 long GetMinBin () { return lMinBin; }
00168 long GetMaxBin () { return lMaxBin; }
00174 long GetResultCount () { return lSpectSize; }
00175 };
00176
00177 #endif
00178