ComputeLinear Class Reference
[GPSTk data structures]

#include <ComputeLinear.hpp>

Inheritance diagram for ComputeLinear:

Inheritance graph
[legend]
Collaboration diagram for ComputeLinear:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class computes linear combinations of GDS data.

This class is meant to be used with the GNSS data structures (GDS) objects found in "DataStructures" class, and it is intended to be used as a more flexible replacement for classes such as ComputePC.hpp.

A typical way to use this class follows:

      // Define a linear combination to compute PC using C1
   gnssLinearCombination pcComb;
   pcComb.header = TypeID::PC;
   pcComb.body[TypeID::C1] = +GAMMA_GPS/0.646944444;
   pcComb.body[TypeID::P2] = -1.0/0.646944444;


      // Define another linear combination to compute PC prefit
      // residual
   gnssLinearCombination prefitComb;
   prefitComb.header = TypeID::prefitC;
   prefitComb.body[TypeID::PC] = +1.0;
   prefitComb.body[TypeID::rho] = -1.0;
   prefitComb.body[TypeID::dtSat] = +1.0;
   prefitComb.body[TypeID::rel] = -1.0;
   prefitComb.body[TypeID::tropoSlant] = -1.0;


      // Object to compute linear combinations of data
      // Linear combinations will be computed in a FIFO basis
   ComputeLinear linear;
   linear.addLinear(pcComb);
   linear.addLinear(prefitComb);

      // Load observation data
   RinexObsStream rin("ebre0300.02o");

      // Loads precise ephemeris object with file data
   SP3EphemerisStore SP3EphList;
   SP3EphList.loadFile("igs11513.sp3");

      // Sets nominal position of receiver
   Position nominalPos(4833520.3800, 41536.8300, 4147461.2800);

      // Declare a MOPSTropModel object, setting the defaults
   MOPSTropModel mopsTM( nominalPos.getAltitude(),
                         nominalPos.getGeodeticLatitude(), 30);

      // Object to compute the tropospheric data
   ComputeTropModel computeTropo(mopsTM);

      // Declare a basic modeler
   BasicModel basic(nominalPos, SP3EphList);

   gnssRinex gRin;

   while(rin >> gRin)
   {

      gRin >> basic >> computeTropo >> linear;

         // Dump results
      gRin.body.dump(cout,1);
   }

The "ComputeLinear" object will visit every satellite in the GNSS data structure that is "gRin" and will compute the previously defined linear combination (or combinations).

When used with the ">>" operator, this class returns the same incoming data structure with the results inserted in it. Be warned that if a given satellite does not have the observations or data required by the linear combination definition, such data will be taken as zero.

Warning:
If the "ComputeLinear" object has more than one linear combination definition, they will be applied in the same order they were added to the object, i.e. in a FIFO (First Input - First Output) basis. Therefore, you must be mindful of combination order.
See also:
ComputeCombination.hpp, ComputePC.hpp, ModelObsFixedStation.hpp and ModelObs.hpp, among others, for related classes.

Definition at line 131 of file ComputeLinear.hpp.

Public Member Functions

 ComputeLinear ()
 Default constructor.
 ComputeLinear (const gnssLinearCombination &linearComb)
 Common constructor.
 ComputeLinear (const LinearCombList &list)
 Common constructor.
virtual satTypeValueMapProcess (const DayTime &time, 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 LinearCombList getLinearCombinations (void) const
 Returns the list of linear combinations to be computed.
virtual ComputeLinearclearAll (void)
 Clear all linear combinations.
virtual ComputeLinearsetLinearCombination (const gnssLinearCombination &linear)
 Sets a linear combinations to be computed.
virtual ComputeLinearsetLinearCombination (const LinearCombList &list)
 Sets the list of linear combinations to be computed.
virtual ComputeLinearaddLinear (const gnssLinearCombination &linear)
 Add a linear combination to be computed.
virtual int getIndex (void) const
 Returns an index identifying this object.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~ComputeLinear ()
 Destructor.


Constructor & Destructor Documentation

ComputeLinear  )  [inline]
 

Default constructor.

Definition at line 136 of file ComputeLinear.hpp.

ComputeLinear const gnssLinearCombination linearComb  )  [inline]
 

Common constructor.

Parameters:
linearComb Linear combination to be computed.

Definition at line 144 of file ComputeLinear.hpp.

ComputeLinear const LinearCombList list  )  [inline]
 

Common constructor.

Parameters:
list List of linear combination definitions to compute.

Definition at line 152 of file ComputeLinear.hpp.

virtual ~ComputeLinear  )  [inline, virtual]
 

Destructor.

Definition at line 236 of file ComputeLinear.hpp.


Member Function Documentation

virtual ComputeLinear& addLinear const gnssLinearCombination linear  )  [inline, virtual]
 

Add a linear combination to be computed.

Parameters:
linear Linear combination definitions to be added.

Definition at line 223 of file ComputeLinear.hpp.

virtual ComputeLinear& clearAll void   )  [inline, virtual]
 

Clear all linear combinations.

Definition at line 194 of file ComputeLinear.hpp.

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Definition at line 47 of file ComputeLinear.cpp.

int getIndex void   )  const [virtual]
 

Returns an index identifying this object.

Implements ProcessingClass.

Definition at line 42 of file ComputeLinear.cpp.

virtual LinearCombList getLinearCombinations void   )  const [inline, virtual]
 

Returns the list of linear combinations to be computed.

Definition at line 189 of file ComputeLinear.hpp.

References gpstk::LinearCombList.

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 183 of file ComputeLinear.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 173 of file ComputeLinear.hpp.

satTypeValueMap & Process const DayTime time,
satTypeValueMap gData
throw (ProcessingException) [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 58 of file ComputeLinear.cpp.

References GPSTK_THROW.

virtual ComputeLinear& setLinearCombination const LinearCombList list  )  [inline, virtual]
 

Sets the list of linear combinations to be computed.

Parameters:
list List of linear combination definitions to compute.
Warning:
All previous linear combinations will be deleted.

Definition at line 215 of file ComputeLinear.hpp.

virtual ComputeLinear& setLinearCombination const gnssLinearCombination linear  )  [inline, virtual]
 

Sets a linear combinations to be computed.

Parameters:
linear Linear combination definition to compute.
Warning:
All previous linear combinations will be deleted.

Definition at line 204 of file ComputeLinear.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