ProblemSatFilter.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: ProblemSatFilter.hpp 2535 2011-03-25 15:58:06Z ccutlip $"
00002 
00008 #ifndef GPSTK_PROBLEMSATFILTER_HPP
00009 #define GPSTK_PROBLEMSATFILTER_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 //  Wei Yan - Chinese Academy of Sciences . 2009, 2010, 2011
00030 //
00031 //============================================================================
00032 
00033 
00034 #include <iostream>
00035 #include <string>
00036 #include "DayTime.hpp"
00037 #include "ProcessingClass.hpp"
00038 
00039 
00040 namespace gpstk
00041 {
00042 
00045 
00046 
00073    class ProblemSatFilter : public ProcessingClass
00074    {
00075       public:
00076 
00078       ProblemSatFilter() 
00079       { setIndex(); };
00080 
00081 
00088       virtual satTypeValueMap& Process( const DayTime& epoch,
00089                                         satTypeValueMap& gData )
00090          throw(ProcessingException);
00091 
00092 
00098       virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00099          throw(ProcessingException)
00100       { Process(gData.header.epoch, gData.body); return gData; };
00101 
00102 
00108       virtual gnssRinex& Process(gnssRinex& gData)
00109          throw(ProcessingException);
00110 
00111 
00113       virtual int getIndex(void) const;
00114 
00115 
00117       virtual std::string getClassName(void) const;
00118 
00121       int loadSatelliteProblemFile(const std::string& crxFile);
00122 
00123 
00125       void clear()
00126       { satDataMap.clear(); }
00127 
00128       
00130       virtual ~ProblemSatFilter() {};
00131 
00132    protected:
00133       bool isBadSat(const DayTime& time,const SatID& sat);
00134 
00135    protected:
00136 
00137       struct SatData
00138       {
00139          int spiltFlag;
00140          int problemFlag;
00141          int actionFlag;
00142          DayTime startEpoch;
00143          DayTime endEpoch;
00144 
00145          SatData():spiltFlag(0),problemFlag(0),actionFlag(0),
00146             startEpoch(DayTime::BEGINNING_OF_TIME),
00147             endEpoch(DayTime::BEGINNING_OF_TIME)
00148          {}
00149       };
00150 
00151       typedef std::list<SatData> SatDataList;
00152       typedef std::map<SatID, SatDataList > SatDataMap;
00153          
00155       SatDataMap  satDataMap;
00156 
00157    private:
00158 
00160       static int classIndex;
00161 
00163       int index;
00164 
00166       void setIndex(void)
00167       { index = classIndex++; };
00168 
00169 
00170    }; // End of class 'ProblemSatFilter'
00171 
00172 
00174 
00175 }
00176 #endif   // GPSTK_PROBLEMSATFILTER_HPP

Generated on Tue May 22 03:31:00 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1