CodeSmoother.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: CodeSmoother.hpp 1316 2008-07-25 21:13:58Z ckiesch $"
00002 
00009 #ifndef CODESMOOTHER_HPP
00010 #define CODESMOOTHER_HPP
00011 
00012 //============================================================================
00013 //
00014 //  This file is part of GPSTk, the GPS Toolkit.
00015 //
00016 //  The GPSTk is free software; you can redistribute it and/or modify
00017 //  it under the terms of the GNU Lesser General Public License as published
00018 //  by the Free Software Foundation; either version 2.1 of the License, or
00019 //  any later version.
00020 //
00021 //  The GPSTk is distributed in the hope that it will be useful,
00022 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024 //  GNU Lesser General Public License for more details.
00025 //
00026 //  You should have received a copy of the GNU Lesser General Public
00027 //  License along with GPSTk; if not, write to the Free Software Foundation,
00028 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029 //
00030 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2007, 2008
00031 //
00032 //============================================================================
00033 
00034 
00035 
00036 #include "ProcessingClass.hpp"
00037 
00038 
00039 namespace gpstk
00040 {
00041 
00044 
00045 
00110    class CodeSmoother : public ProcessingClass
00111    {
00112    public:
00113 
00116       CodeSmoother() : codeType(TypeID::C1), phaseType(TypeID::L1),
00117          resultType(TypeID::C1), maxWindowSize(100), csFlag(TypeID::CSL1) 
00118       { setIndex(); };
00119 
00120 
00126       CodeSmoother( const TypeID& codeT,
00127                     const int& mwSize = 100 );
00128 
00129 
00135       virtual satTypeValueMap& Process(satTypeValueMap& gData)
00136          throw(ProcessingException);
00137 
00138 
00144       virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00145          throw(ProcessingException)
00146       { Process(gData.body); return gData; };
00147 
00148 
00154       virtual gnssRinex& Process(gnssRinex& gData)
00155          throw(ProcessingException)
00156       { Process(gData.body); return gData; };
00157 
00158 
00160       virtual TypeID getCodeType() const
00161       { return codeType; };
00162 
00163 
00168       virtual CodeSmoother& setCodeType(const TypeID& codeT)
00169       { codeType = codeT; return (*this); };
00170 
00171 
00173       virtual TypeID getPhaseType() const
00174       { return phaseType; };
00175 
00176 
00181       virtual CodeSmoother& setPhaseType(const TypeID& phaseT)
00182       { phaseType = phaseT; return (*this); };
00183 
00184 
00186       virtual TypeID getCSFlag() const
00187       { return csFlag; };
00188 
00189 
00194       virtual CodeSmoother& setCSFlag(const TypeID& csT)
00195       { csFlag = csT; return (*this); };
00196 
00197 
00199       virtual TypeID getResultType() const
00200       { return resultType; };
00201 
00202 
00207       virtual CodeSmoother& setResultType(const TypeID& resultT)
00208       { resultType = resultT; return (*this); };
00209 
00210 
00212       virtual int getMaxWindowSize() const
00213       { return maxWindowSize; };
00214 
00215 
00220       virtual CodeSmoother& setMaxWindowSize(const int& maxSize);
00221 
00222 
00224       virtual int getIndex(void) const;
00225 
00226 
00228       virtual std::string getClassName(void) const;
00229 
00230 
00232       virtual ~CodeSmoother() {};
00233 
00234 
00235    private:
00236 
00238       TypeID codeType;
00239 
00240 
00242       TypeID phaseType;
00243 
00244 
00246       TypeID resultType;
00247 
00248 
00250       int maxWindowSize;
00251 
00252 
00255       TypeID csFlag;
00256 
00257 
00259       struct filterData
00260       {
00261             // Default constructor initializing the data in the structure
00262          filterData() : windowSize(1), previousCode(0.0), previousPhase(0.0) {};
00263 
00264          int windowSize;       
00265          double previousCode;  
00266          double previousPhase; 
00267       };
00268 
00269 
00271       std::map<SatID, filterData> SmoothingData;
00272 
00273 
00281       virtual double getSmoothing( const SatID& sat,
00282                                    const double& code,
00283                                    const double& phase,
00284                                    const double& flag );
00285 
00286 
00288       static int classIndex;
00289 
00291       int index;
00292 
00294       void setIndex(void)
00295       { (*this).index = classIndex++; };
00296 
00297 
00298    }; // End of class 'CodeSmoother'
00299 
00301 
00302 }
00303 #endif   // CODESMOOTHER_HPP

Generated on Thu Feb 9 03:30:55 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1