Dumper Class Reference
[GPSTk data structures]

#include <Dumper.hpp>

Inheritance diagram for Dumper:

Inheritance graph
[legend]
Collaboration diagram for Dumper:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class dumps the values inside a GNSS Data Structure (GDS), and therefore is meant to be used with the GDS objects found in "DataStructures" class.

A typical way to use this class follows:

       // Create the input obs file stream
    RinexObsStream rin("ebre0300.02o");

   gnssRinex gRin;

   Dumper dumpObj;

   while(rin >> gRin)
   {
      gRin >> dumpObj;
   }

The "Dumper" object will visit every satellite in the GNSS Data Structure that is "gRin" and will print the information associated with it to a pre-designated place.

By default "Dumper" will print all information to 'std::cout' output stream (which is a 'std::ostream'), and will include the epoch and the station, as well as the type associated with each data value.

The default behavior may be changed using the appropriate constructors and/or methods. For instance, in order to dump information to file 'model.out', not including station ID, and including only data of satellite arc, cycle slip flag, and prefit residuals of code and phase, we could do the following:


       // Create the output file stream
    ofstream dumperFile;
    dumperFile.open( "model.out", ios::out );

       // You make want to set an specific precision for printing
    dumperFile << fixed << setprecision( 3 );

   gnssRinex gRin;

   Dumper dumpObj( dumperFile );

      // Deactivate SourceID printing
   dumpObj.setPrintSourceID( false );

      // Limit TypeIDs to print. It is a good idea to start with 
      // 'setType()' to clear all TypeIDs previously set, and then
      // follow adding new TypeIDs using 'addType()'.
   dumpObj.setType(TypeID::satArc);
   dumpObj.addType(TypeID::CSL1);
   dumpObj.addType(TypeID::prefitC);
   dumpObj.addType(TypeID::prefitL);

   while(rin >> gRin)
   {
      try
      {
         gRin  >> basicM
               >> correctObs
               >> compWindup
               >> computeTropo
               >> linear1      // Compute combinations
               >> pcFilter
               >> markCSLI2
               >> markCSMW
               >> markArc
               >> linear2      // Compute prefit residuals
               >> dumpObj
               >> pppSolver;
      }
      catch(...)
      {
         cerr << "Unknown exception at epoch: " << time << endl;
         continue;
      }

Please note that, in order to dump a given TypeID, it must be present in the GNSS Data Structure.

A nice feature of "Dumper" objects is that they return the incoming GDS without altering it, so they can be inserted wherever you need them.

Definition at line 138 of file Dumper.hpp.

Public Member Functions

 Dumper ()
 Default constructor.
 Dumper (std::ostream &out, int printtype=true, bool printtime=true, bool printstation=true)
 Common constructor.
virtual satTypeValueMapProcess (satTypeValueMap &gData) throw (ProcessingException)
 Dumps data from a satTypeValueMap object.
virtual gnssSatTypeValueProcess (gnssSatTypeValue &gData) throw (ProcessingException)
 Dumps data from a gnnsSatTypeValue object.
virtual gnssRinexProcess (gnssRinex &gData) throw (ProcessingException)
 Dumps data from a gnnsRinex object.
virtual std::ostream * getOutputStream (void) const
 Returns pointer to stream object used for output.
virtual DumpersetOutputStream (std::ostream &out)
 Sets stream object used for output.
virtual bool getPrintTypeID (void) const
 Returns flag controlling TypeID printing.
virtual DumpersetPrintTypeID (bool printtype)
 Sets flag controlling TypeID printing.
virtual bool getPrintTime (void) const
 Returns flag controlling CommonTime printing.
virtual DumpersetPrintTime (bool printtime)
 Sets flag controlling CommonTime printing.
virtual bool getPrintSourceID (void) const
 Returns flag controlling SourceID printing.
virtual DumpersetPrintSourceID (bool printstation)
 Sets flag controlling SourceID printing.
virtual DumpersetType (const TypeID &type)
 Method to set the TypeID to be printed.
virtual DumperaddType (const TypeID &type)
 Method to add a TypeID to be printed.
virtual DumpersetTypeSet (const TypeIDSet &printSet)
 Method to set a set of TypeIDs to be printed.
virtual DumperaddTypeSet (const TypeIDSet &printSet)
 Method to add a set of TypeIDs to be printed.
virtual DumperclearTypeSet (void)
 Method to clear the set of TypeIDs to be printed.
virtual TypeIDSet getTypeSet (void) const
 Method to get the set of TypeIDs to be printed.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~Dumper ()
 Destructor.


Constructor & Destructor Documentation

Dumper  )  [inline]
 

Default constructor.

Definition at line 143 of file Dumper.hpp.

References gpstk::printTime().

Dumper std::ostream &  out,
int  printtype = true,
bool  printtime = true,
bool  printstation = true
[inline]
 

Common constructor.

Parameters:
out Stream object used for output.
printtype Flag to print TypeID's.
printtime Flag to print CommonTime's.
printstation Flag to print SourceID's.

Definition at line 157 of file Dumper.hpp.

References gpstk::printTime().

virtual ~Dumper  )  [inline, virtual]
 

Destructor.

Definition at line 301 of file Dumper.hpp.


Member Function Documentation

virtual Dumper& addType const TypeID type  )  [inline, virtual]
 

Method to add a TypeID to be printed.

Parameters:
type TypeID of data values to be added to the ones being printed.

Definition at line 262 of file Dumper.hpp.

Dumper & addTypeSet const TypeIDSet printSet  )  [virtual]
 

Method to add a set of TypeIDs to be printed.

Parameters:
printSet TypeIDSet of data values to be added to the ones being printed.

Definition at line 155 of file Dumper.cpp.

virtual Dumper& clearTypeSet void   )  [inline, virtual]
 

Method to clear the set of TypeIDs to be printed.

If you do this, all TypeIDs that are present in GDS will be printed.

Definition at line 287 of file Dumper.hpp.

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Definition at line 38 of file Dumper.cpp.

virtual std::ostream* getOutputStream void   )  const [inline, virtual]
 

Returns pointer to stream object used for output.

Definition at line 192 of file Dumper.hpp.

virtual bool getPrintSourceID void   )  const [inline, virtual]
 

Returns flag controlling SourceID printing.

Definition at line 231 of file Dumper.hpp.

virtual bool getPrintTime void   )  const [inline, virtual]
 

Returns flag controlling CommonTime printing.

Definition at line 218 of file Dumper.hpp.

virtual bool getPrintTypeID void   )  const [inline, virtual]
 

Returns flag controlling TypeID printing.

Definition at line 205 of file Dumper.hpp.

virtual TypeIDSet getTypeSet void   )  const [inline, virtual]
 

Method to get the set of TypeIDs to be printed.

Definition at line 292 of file Dumper.hpp.

References gpstk::TypeIDSet.

gnssRinex & Process gnssRinex gData  )  throw (ProcessingException) [virtual]
 

Dumps data from a gnnsRinex object.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 92 of file Dumper.cpp.

References GPSTK_THROW.

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

Dumps data from a gnnsSatTypeValue object.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 178 of file Dumper.hpp.

satTypeValueMap & Process satTypeValueMap gData  )  throw (ProcessingException) [virtual]
 

Dumps data from a satTypeValueMap object.

Parameters:
gData Data object holding the data.

Definition at line 47 of file Dumper.cpp.

References GPSTK_THROW.

virtual Dumper& setOutputStream std::ostream &  out  )  [inline, virtual]
 

Sets stream object used for output.

Parameters:
out Stream object used for output.

Definition at line 200 of file Dumper.hpp.

virtual Dumper& setPrintSourceID bool  printstation  )  [inline, virtual]
 

Sets flag controlling SourceID printing.

Parameters:
printstation Flag to print SourceID's.

Definition at line 239 of file Dumper.hpp.

virtual Dumper& setPrintTime bool  printtime  )  [inline, virtual]
 

Sets flag controlling CommonTime printing.

Parameters:
printtime Flag to print CommonTime's.

Definition at line 226 of file Dumper.hpp.

References gpstk::printTime().

virtual Dumper& setPrintTypeID bool  printtype  )  [inline, virtual]
 

Sets flag controlling TypeID printing.

Parameters:
printtype Flag to print TypeID's.

Definition at line 213 of file Dumper.hpp.

virtual Dumper& setType const TypeID type  )  [inline, virtual]
 

Method to set the TypeID to be printed.

Parameters:
type TypeID of data values to be printed.
Warning:
The previously set type values will be deleted. If this is not what you want, see method addType.

If no TypeIDs are specified, then ALL TypeIDs present in the GDS will be printed.

Definition at line 253 of file Dumper.hpp.

virtual Dumper& setTypeSet const TypeIDSet printSet  )  [inline, virtual]
 

Method to set a set of TypeIDs to be printed.

Parameters:
printSet TypeIDSet of data values to be printed.
Warning:
The previously set type values will be deleted. If this is not what you want, see method addDiffType.

Definition at line 273 of file Dumper.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 22 03:31:48 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1