00001 #pragma ident "$Id: Decimate.hpp 1315 2008-07-25 18:35:21Z architest $"
00002
00008 #ifndef DECIMATE_HPP
00009 #define DECIMATE_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include "Exception.hpp"
00035 #include "ProcessingClass.hpp"
00036
00037
00038
00039 namespace gpstk
00040 {
00041
00044 NEW_EXCEPTION_CLASS(DecimateEpoch, gpstk::Exception);
00045
00046
00049
00050
00148 class Decimate : public ProcessingClass
00149 {
00150 public:
00151
00153 Decimate()
00154 : sampling(30.0),tolerance(0.5),lastEpoch(DayTime::BEGINNING_OF_TIME)
00155 { setIndex(); };
00156
00157
00164 Decimate( const double sampleInterval,
00165 const double tol,
00166 const DayTime& initialEpoch )
00167 : sampling(sampleInterval), tolerance(tol), lastEpoch(initialEpoch)
00168 { setIndex(); };
00169
00170
00177 virtual satTypeValueMap& Process( const DayTime& time,
00178 satTypeValueMap& gData )
00179 throw(DecimateEpoch);
00180
00181
00187 virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00188 throw(DecimateEpoch)
00189 { Process(gData.header.epoch, gData.body); return gData; };
00190
00191
00197 virtual gnssRinex& Process(gnssRinex& gData)
00198 throw(DecimateEpoch)
00199 { Process(gData.header.epoch, gData.body); return gData; };
00200
00201
00203 virtual double getSampleInterval(void) const
00204 { return sampling; };
00205
00206
00211 virtual Decimate& setSampleInterval(const double sampleInterval);
00212
00213
00215 virtual double getTolerance(void) const
00216 { return tolerance; };
00217
00218
00223 virtual Decimate& setTolerance(const double tol);
00224
00225
00230 virtual Decimate& setInitialEpoch(const DayTime& initialEpoch)
00231 { lastEpoch = initialEpoch; return (*this); };
00232
00233
00235 virtual int getIndex(void) const;
00236
00237
00239 virtual std::string getClassName(void) const;
00240
00241
00243 virtual ~Decimate() {};
00244
00245
00246 private:
00247
00248
00250 double sampling;
00251
00253 double tolerance;
00254
00256 DayTime lastEpoch;
00257
00259 static int classIndex;
00260
00262 int index;
00263
00265 void setIndex(void)
00266 { index = classIndex++; };
00267
00268
00269 };
00270
00272
00273 }
00274 #endif // DECIMATE_HPP