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
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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
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 };
00299
00301
00302 }
00303 #endif // CODESMOOTHER_HPP