Decimate Class Reference
[GPSTk data structures]

#include <Decimate.hpp>

Inheritance diagram for Decimate:

Inheritance graph
[legend]
Collaboration diagram for Decimate:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class decimates GNSS Data Structures data.

This class is meant to be used with the GNSS data structures objects found in "DataStructures" class.

A typical way to use this class follows:

      // INITIALIZATION PART

      // EBRE station nominal position
   Position nominalPos(4833520.192, 41537.1043, 4147461.560);
   RinexObsStream rin("ebre0300.02o");  // Data stream

      // Load all the SP3 ephemerides files
   SP3EphemerisStore SP3EphList;
   SP3EphList.loadFile("igs11512.sp3");
   SP3EphList.loadFile("igs11513.sp3");
   SP3EphList.loadFile("igs11514.sp3");

      // Set up Niell tropospheric model
   NeillTropModel neillTM( nominalPos.getAltitude(),
                           nominalPos.getGeodeticLatitude(),
                           30 );

      // Objects to compute the model
   BasicModel basicM(nominalPos, SP3EphList);
   ComputeTropModel computeTropo(neillTM);

      // More declarations here: ComputeMOPSWeights, SimpleFilter,
      // LICSDetector, MWCSDetector, SolidTides, OceanLoading,
      // PoleTides, CorrectObservables, ComputeWindUp, ComputeLinear,
      // LinearCombinations, etc.

      // Declare a SolverPPP object
   SolverPPP pppSolver;

      // Object to decimate data: Take data each 900 s, tolerance 5 s
   Decimate decimateData( 900.0,
                          5.0,
                          SP3EphList.getInitialTime() );

     // PROCESSING PART

   gnssRinex gRin;

   while(rin >> gRin)
   {
      try
      {
         gRin  >> basicM
               >> correctObs
               >> compWindup
               >> computeTropo
               >> linear
               >> pcFilter
               >> markCSLI
               >> markCSMW
               >> decimateData   // Continue processing only each 900 s
               >> mopsWeights
               >> pppSolver;
      }
      catch(DecimateEpoch& d)
      {
            // If we catch a DecimateEpoch exception, just continue
            // with the next epoch.
         continue;
      }
      catch(...)
      {
         cerr << "Unknown exception at epoch: " << time << endl;
         continue;
      }

         // Print results
      cout << time.DOYsecond()      << "  "; // Output field #1
      cout << pppSolver.solution[1] << "  "; // dx: Output field #2
      cout << pppSolver.solution[2] << "  "; // dy: Output field #3
      cout << pppSolver.solution[3] << "  "; // dz: Output field #4
      cout << pppSolver.solution[0] << "  "; // wetMap: Output field #5
      cout << endl;
   }

Each Decimate object has a sampling interval, a tolerance and a epoch to start decimation. If decimation conditions are met, it returns the incoming GNSS Data Structure without changes and the processing chain continues.

Otherwise, it will stop the processing chain and throw a "DecimateEpoch" exception. The program then must handle it appropriately, usually just issuing a 'continue' statement in order to process next epoch.

See also:
Synchronize.hpp for another time management class.

Definition at line 153 of file Decimate.hpp.

Public Member Functions

 Decimate ()
 Default constructor.
 Decimate (const double sampleInterval, const double tol, const DayTime &initialEpoch)
 Common constructor.
virtual satTypeValueMapProcess (const DayTime &time, satTypeValueMap &gData) throw (DecimateEpoch)
 Returns a satTypeValueMap object, adding the new data generated when calling this object.
virtual gnssSatTypeValueProcess (gnssSatTypeValue &gData) throw (DecimateEpoch)
 Returns a gnnsSatTypeValue object, adding the new data generated when calling this object.
virtual gnssRinexProcess (gnssRinex &gData) throw (DecimateEpoch)
 Returns a gnnsRinex object, adding the new data generated when calling this object.
virtual double getSampleInterval (void) const
 Returns sampling interval, in seconds.
virtual DecimatesetSampleInterval (const double sampleInterval)
 Sets sampling interval.
virtual double getTolerance (void) const
 Returns tolerance, in seconds.
virtual DecimatesetTolerance (const double tol)
 Sets tolerance, in seconds.
virtual DecimatesetInitialEpoch (const DayTime &initialEpoch)
 Sets epoch to start decimation.
virtual int getIndex (void) const
 Returns an index identifying this object.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~Decimate ()
 Destructor.


Constructor & Destructor Documentation

Decimate  )  [inline]
 

Default constructor.

Definition at line 158 of file Decimate.hpp.

Decimate const double  sampleInterval,
const double  tol,
const DayTime initialEpoch
[inline]
 

Common constructor.

Parameters:
sampleInterval Sampling interval, in seconds.
tol Tolerance, in seconds.
initialEpoch Epoch to start decimation.

Definition at line 169 of file Decimate.hpp.

virtual ~Decimate  )  [inline, virtual]
 

Destructor.

Definition at line 248 of file Decimate.hpp.

References index().


Member Function Documentation

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Definition at line 48 of file Decimate.cpp.

int getIndex void   )  const [virtual]
 

Returns an index identifying this object.

Implements ProcessingClass.

Definition at line 43 of file Decimate.cpp.

virtual double getSampleInterval void   )  const [inline, virtual]
 

Returns sampling interval, in seconds.

Definition at line 208 of file Decimate.hpp.

virtual double getTolerance void   )  const [inline, virtual]
 

Returns tolerance, in seconds.

Definition at line 220 of file Decimate.hpp.

virtual gnssRinex& Process gnssRinex gData  )  throw (DecimateEpoch) [inline, virtual]
 

Returns a gnnsRinex object, adding the new data generated when calling this object.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 202 of file Decimate.hpp.

virtual gnssSatTypeValue& Process gnssSatTypeValue gData  )  throw (DecimateEpoch) [inline, virtual]
 

Returns a gnnsSatTypeValue object, adding the new data generated when calling this object.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 192 of file Decimate.hpp.

satTypeValueMap & Process const DayTime time,
satTypeValueMap gData
throw (DecimateEpoch) [virtual]
 

Returns a satTypeValueMap object, adding the new data generated when calling this object.

Parameters:
time Epoch corresponding to the data.
gData Data object holding the data.

Definition at line 97 of file Decimate.cpp.

References gpstk::abs(), and GPSTK_THROW.

virtual Decimate& setInitialEpoch const DayTime initialEpoch  )  [inline, virtual]
 

Sets epoch to start decimation.

Parameters:
initialEpoch Epoch to start decimation.

Definition at line 235 of file Decimate.hpp.

Decimate & setSampleInterval const double  sampleInterval  )  [virtual]
 

Sets sampling interval.

Parameters:
sampleInterval Sampling interval, in seconds.

Definition at line 57 of file Decimate.cpp.

Decimate & setTolerance const double  tol  )  [virtual]
 

Sets tolerance, in seconds.

Parameters:
tol Tolerance, in seconds.

Definition at line 76 of file Decimate.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 8 03:31:30 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1