CodeSmoother Class Reference
[GPSTk data structures]

#include <CodeSmoother.hpp>

Inheritance diagram for CodeSmoother:

Inheritance graph
[legend]
Collaboration diagram for CodeSmoother:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class smoothes a given code observable using the corresponding phase observable.

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:

   RinexObsStream rin("ebre0300.02o");

   gnssRinex gRin;
   OneFreqCSDetector markCSC1;    // We MUST mark cycle slips
   CodeSmoother smoothC1;

   while(rin >> gRin)
   {
      gRin >> markCSC1 >> smoothC1;
   }

The "CodeSmoother" object will visit every satellite in the GNSS data structure that is "gRin" and will smooth the given code observation using the corresponding phase observation.

By default, the algorithm will use C1 and L1 observables, and the CSL1 index will be consulted for cycle slip information. You can change these settings with the appropriate methods.

When used with the ">>" operator, this class returns the same incoming data structure with the code observation smoothed (unless the 'resultType' field is changed). Be warned that if a given satellite does not have the observations required, it will be summarily deleted from the data structure.

Another important parameter is the maxWindowSize field. By default, it is set to 100 samples (you may adjust that with the setMaxWindowSize() method).

A window of 100 samples is typical and appropriate when working with data sampled at 1 Hz, because then the full window will last at most 100 seconds.

However, if for instance your samples are taken at 30 seconds (and you are working with C1/L1 or other ionosphere-affected observation pair), then the former value of number of samples will yield a window of 50 minutes will be used and you will get badly distorted data because of ionosphere drift, among other effects.

A good rule here is to make sure that the filter window lasts at most 5 minutes. Therefore, for a 30 s sampling data set you should set your smoother object like this:

   CodeSmoother smoothC1;
   smoothC1.setMaxWindowSize(8);

Resulting in a 4 minutes filter window.

Warning:
Code smoothers are objets that store their internal state, so you MUST NOT use the SAME object to process DIFFERENT data streams.

Definition at line 110 of file CodeSmoother.hpp.

Public Member Functions

 CodeSmoother ()
 Default constructor, setting default parameters and C1 and L1 as observables.
 CodeSmoother (const TypeID &codeT, const int &mwSize=100)
 Common constructor.
virtual satTypeValueMapProcess (satTypeValueMap &gData) throw (ProcessingException)
 Returns a satTypeValueMap object, adding the new data generated when calling this object.
virtual gnssSatTypeValueProcess (gnssSatTypeValue &gData) throw (ProcessingException)
 Returns a gnnsSatTypeValue object, adding the new data generated when calling this object.
virtual gnssRinexProcess (gnssRinex &gData) throw (ProcessingException)
 Returns a gnnsRinex object, adding the new data generated when calling this object.
virtual TypeID getCodeType () const
 Method to get the default code type being used.
virtual CodeSmoothersetCodeType (const TypeID &codeT)
 Method to set the default code type to be used.
virtual TypeID getPhaseType () const
 Method to get the default phase type being used.
virtual CodeSmoothersetPhaseType (const TypeID &phaseT)
 Method to set the default phase type to be used.
virtual TypeID getCSFlag () const
 Method to get the default cycle slip type being used.
virtual CodeSmoothersetCSFlag (const TypeID &csT)
 Method to set the default cycle slip type to be used.
virtual TypeID getResultType () const
 Method to get the default return type being used.
virtual CodeSmoothersetResultType (const TypeID &resultT)
 Method to set the default return type to be used.
virtual int getMaxWindowSize () const
 Method to get the maximum size of filter window, in samples.
virtual CodeSmoothersetMaxWindowSize (const int &maxSize)
 Method to set the maximum size of filter window, in samples.
virtual int getIndex (void) const
 Returns an index identifying this object.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~CodeSmoother ()
 Destructor.


Constructor & Destructor Documentation

CodeSmoother  )  [inline]
 

Default constructor, setting default parameters and C1 and L1 as observables.

Definition at line 116 of file CodeSmoother.hpp.

References gpstk::codeType, and L1.

CodeSmoother const TypeID codeT,
const int &  mwSize = 100
 

Common constructor.

Parameters:
codeT Type of code to be smoothed.
mwSize Maximum size of filter window, in samples.

Definition at line 58 of file CodeSmoother.cpp.

References gpstk::codeType, and TypeID::type.

virtual ~CodeSmoother  )  [inline, virtual]
 

Destructor.

Definition at line 232 of file CodeSmoother.hpp.


Member Function Documentation

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Reimplemented in PCSmoother.

Definition at line 48 of file CodeSmoother.cpp.

virtual TypeID getCodeType  )  const [inline, virtual]
 

Method to get the default code type being used.

Definition at line 160 of file CodeSmoother.hpp.

virtual TypeID getCSFlag  )  const [inline, virtual]
 

Method to get the default cycle slip type being used.

Definition at line 186 of file CodeSmoother.hpp.

int getIndex void   )  const [virtual]
 

Returns an index identifying this object.

Implements ProcessingClass.

Reimplemented in PCSmoother.

Definition at line 43 of file CodeSmoother.cpp.

virtual int getMaxWindowSize  )  const [inline, virtual]
 

Method to get the maximum size of filter window, in samples.

Reimplemented in PCSmoother.

Definition at line 212 of file CodeSmoother.hpp.

virtual TypeID getPhaseType  )  const [inline, virtual]
 

Method to get the default phase type being used.

Definition at line 173 of file CodeSmoother.hpp.

virtual TypeID getResultType  )  const [inline, virtual]
 

Method to get the default return type being used.

Reimplemented in PCSmoother.

Definition at line 199 of file CodeSmoother.hpp.

virtual gnssRinex& Process gnssRinex gData  )  throw (ProcessingException) [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 154 of file CodeSmoother.hpp.

virtual gnssSatTypeValue& Process gnssSatTypeValue gData  )  throw (ProcessingException) [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 144 of file CodeSmoother.hpp.

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

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

Parameters:
gData Data object holding the data.

Reimplemented in PCSmoother.

Definition at line 142 of file CodeSmoother.cpp.

References gpstk::codeType, GPSTK_THROW, and gpstk::SatIDSet.

virtual CodeSmoother& setCodeType const TypeID codeT  )  [inline, virtual]
 

Method to set the default code type to be used.

Parameters:
codeT TypeID of code to be used

Definition at line 168 of file CodeSmoother.hpp.

References gpstk::codeType.

virtual CodeSmoother& setCSFlag const TypeID csT  )  [inline, virtual]
 

Method to set the default cycle slip type to be used.

Parameters:
csT Cycle slip type to be used

Definition at line 194 of file CodeSmoother.hpp.

CodeSmoother & setMaxWindowSize const int &  maxSize  )  [virtual]
 

Method to set the maximum size of filter window, in samples.

Parameters:
maxSize Maximum size of filter window, in samples.

Reimplemented in PCSmoother.

Definition at line 212 of file CodeSmoother.cpp.

virtual CodeSmoother& setPhaseType const TypeID phaseT  )  [inline, virtual]
 

Method to set the default phase type to be used.

Parameters:
phaseT TypeID of phase to be used

Definition at line 181 of file CodeSmoother.hpp.

virtual CodeSmoother& setResultType const TypeID resultT  )  [inline, virtual]
 

Method to set the default return type to be used.

Parameters:
returnT TypeID to be returned

Reimplemented in PCSmoother.

Definition at line 207 of file CodeSmoother.hpp.


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