PCSmoother.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: PCSmoother.hpp 1311 2008-07-23 19:32:36Z architest $"
00002 
00009 #ifndef PCSMOOTHER_HPP
00010 #define PCSMOOTHER_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 "CodeSmoother.hpp"
00037 
00038 
00039 namespace gpstk
00040 {
00041 
00044 
00045 
00103    class PCSmoother : public CodeSmoother
00104    {
00105    public:
00106 
00109       PCSmoother() : codeType(TypeID::PC), phaseType(TypeID::LC),
00110          resultType(TypeID::PC), maxWindowSize(100), csFlag1(TypeID::CSL1),
00111          csFlag2(TypeID::CSL2)
00112       { setIndex(); };
00113 
00114 
00120       PCSmoother( const int& mwSize,
00121                   const TypeID& resultT = TypeID::PC )
00122          : codeType(TypeID::PC), phaseType(TypeID::LC), resultType(resultT),
00123            maxWindowSize(mwSize), csFlag1(TypeID::CSL1), csFlag2(TypeID::CSL2)
00124       { setIndex(); };
00125 
00126 
00132       virtual satTypeValueMap& Process(satTypeValueMap& gData)
00133          throw(ProcessingException);
00134 
00135 
00137       virtual TypeID getResultType() const
00138       { return resultType; };
00139 
00140 
00145       virtual PCSmoother& setResultType(const TypeID& resultT)
00146       { resultType = resultT; return (*this); };
00147 
00148 
00150       virtual int getMaxWindowSize() const
00151       { return maxWindowSize; };
00152 
00153 
00158       virtual PCSmoother& setMaxWindowSize(const int& maxSize);
00159 
00160 
00162       virtual TypeID getCSFlag1() const
00163       { return csFlag1; };
00164 
00165 
00170       virtual PCSmoother& setCSFlag1(const TypeID& csT)
00171       { csFlag1 = csT; return (*this); };
00172 
00173 
00175       virtual TypeID getCSFlag2() const
00176       { return csFlag2; };
00177 
00178 
00183       virtual PCSmoother& setCSFlag2(const TypeID& csT)
00184       { csFlag2 = csT; return (*this); };
00185 
00186 
00188       virtual int getIndex(void) const;
00189 
00190 
00192       virtual std::string getClassName(void) const;
00193 
00194 
00196       virtual ~PCSmoother() {};
00197 
00198 
00199     private:
00200 
00201 
00203       TypeID codeType;
00204 
00205 
00207       TypeID phaseType;
00208 
00209 
00211       TypeID resultType;
00212 
00213 
00215       int maxWindowSize;
00216 
00217 
00219       TypeID csFlag1;
00220 
00221 
00223       TypeID csFlag2;
00224 
00225 
00227       struct filterData
00228       {
00229             // Default constructor initializing the data in the structure
00230          filterData() : windowSize(1), previousCode(0.0), previousPhase(0.0) {};
00231 
00232          int windowSize;       
00233          double previousCode;  
00234          double previousPhase; 
00235       };
00236 
00237 
00239       std::map<SatID, filterData> SmoothingData;
00240 
00241 
00250       virtual double getSmoothing( const SatID& sat,
00251                                    const double& code,
00252                                    const double& phase,
00253                                    const double& flag1,
00254                                    const double& flag2 );
00255 
00256 
00258       virtual PCSmoother& setCodeType(const TypeID& dummy)
00259       { return (*this); };
00260 
00262       virtual PCSmoother& setPhaseType(const TypeID& dummy)
00263       { return (*this); };
00264 
00266       virtual PCSmoother& setCSFlag(const TypeID& dummy)
00267       { return (*this); };
00268 
00270       virtual TypeID getCSFlag() const
00271       { return TypeID::Unknown; };
00272 
00273 
00275       static int classIndex;
00276 
00277 
00279       int index;
00280 
00281 
00283       void setIndex(void)
00284       { index = classIndex++; };
00285 
00286 
00287 
00288    }; // End of class 'PCSmoother'
00289 
00291 
00292 }
00293 #endif   // PCSMOOTHER_HPP

Generated on Wed Feb 8 03:31:01 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1