Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

SpectDirLine2.hh

Go to the documentation of this file.
00001 /*
00002 
00003     Spectrum based direction finding for line array
00004     Copyright (C) 2000-2002 Jussi Laako
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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     // These should match with the ones defined in Messages.hh!
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 

Generated on Sun Oct 26 19:11:22 2003 for HASAS by doxygen 1.3.3