SolverLMS Class Reference
[Mathematical algorithms]

#include <SolverLMS.hpp>

Inheritance diagram for SolverLMS:

Inheritance graph
[legend]
Collaboration diagram for SolverLMS:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class computes the Least Mean Squares Solution of a given equations set.

This class may be used either in a Vector- and Matrix-oriented way, or with GNSS data structure objects from "DataStructures" class.

A typical way to use this class with GNSS data structures follows:

      // Data stream
   RinexObsStream rin("ebre0300.02o");

      // More declarations here: Ionospheric and tropospheric models,
      // ephemeris, etc.

     // Declare a modeler object, setting all the parameters in
     // one pass
   ModelObs model( ionoStore,
                   mopsTM,
                   bceStore,
                   TypeID::C1 );

      // Set initial position (Bancroft method)
   model.Prepare();

      // Declare a SolverLMS object
   SolverLMS solver;

      // GDS object
   gnssRinex gRin;

   while(rin >> gRin)
   {
      gRin >> model >> solver;
   }

The "SolverLMS" object will extract all the data it needs from the GNSS data structure that is "gRin" and will try to solve the system of equations using the Least-Mean-Squares method. It will also insert back postfit residual data into "gRin" if it successfully solves the equation system.

By default, it will build the geometry matrix from the values of coefficients dx, dy, dz and cdt, and the independent vector will be composed of the code prefit residuals (TypeID::prefitC) values.

You may change the former by redefining the default equation definition to be used. For instance:

   TypeIDSet unknownsSet;
   unknownsSet.insert(TypeID::dLat);
   unknownsSet.insert(TypeID::dLon);
   unknownsSet.insert(TypeID::dH);
   unknownsSet.insert(TypeID::cdt);

      // Create a new equation definition
      // newEq(independent value, set of unknowns)
   gnssEquationDefinition newEq(TypeID::prefitC, unknownsSet);

      // Reconfigure solver
   solver.setDefaultEqDefinition(newEq);

See also:
SolverBase.hpp for base class.

Definition at line 114 of file SolverLMS.hpp.

Public Member Functions

 SolverLMS ()
 Default constructor.
 SolverLMS (const gnssEquationDefinition &eqDef)
 Explicit constructor.
virtual int Compute (const Vector< double > &prefitResiduals, const Matrix< double > &designMatrix) throw (InvalidSolver)
 Compute the Least Mean Squares Solution of the given equations set.
virtual satTypeValueMapProcess (satTypeValueMap &gData) throw (ProcessingException)
 Returns a reference to a satTypeValueMap object after solving the previously defined equation system.
virtual gnssSatTypeValueProcess (gnssSatTypeValue &gData) throw (ProcessingException)
 Returns a reference to a gnnsSatTypeValue object after solving the previously defined equation system.
virtual gnssRinexProcess (gnssRinex &gData) throw (ProcessingException)
 Returns a reference to a gnnsRinex object after solving the previously defined equation system.
virtual double getSolution (const TypeID &type) const throw (InvalidRequest)
 Returns the solution associated to a given TypeID.
virtual double getVariance (const TypeID &type) const throw (InvalidRequest)
 Returns the variance associated to a given TypeID.
virtual SolverLMSsetDefaultEqDefinition (const gnssEquationDefinition &eqDef)
 Method to set the default equation definition to be used when fed with GNSS data structures.
virtual gnssEquationDefinition getDefaultEqDefinition () const
 Method to get the default equation definition being used with GNSS data structures.
virtual int getIndex (void) const
 Returns an index identifying this object.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~SolverLMS ()
 Destructor.

Protected Attributes

gnssEquationDefinition defaultEqDef
 Default equation definition to be used when fed with GNSS data structures.


Constructor & Destructor Documentation

SolverLMS  ) 
 

Default constructor.

When fed with GNSS data structures, the default the equation definition to be used is the common GNSS code equation.

Definition at line 59 of file SolverLMS.cpp.

References gnssData::body, SolverLMS::defaultEqDef, gnssData::header, and gpstk::TypeIDSet.

SolverLMS const gnssEquationDefinition eqDef  )  [inline]
 

Explicit constructor.

Sets the default equation definition to be used when fed with GNSS data structures.

Parameters:
eqDef gnssEquationDefinition to be used

Definition at line 131 of file SolverLMS.hpp.

virtual ~SolverLMS  )  [inline, virtual]
 

Destructor.

Definition at line 222 of file SolverLMS.hpp.


Member Function Documentation

int Compute const Vector< double > &  prefitResiduals,
const Matrix< double > &  designMatrix
throw (InvalidSolver) [virtual]
 

Compute the Least Mean Squares Solution of the given equations set.

Parameters:
prefitResiduals Vector of prefit residuals
designMatrix Design matrix for the equation system
Returns:
0 if OK -1 if problems arose

Reimplemented in SolverWMS.

Definition at line 88 of file SolverLMS.cpp.

References GPSTK_THROW, gpstk::inverseChol(), and gpstk::transpose().

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Reimplemented in CodeKalmanSolver, SolverPPP, SolverPPPFB, and SolverWMS.

Definition at line 50 of file SolverLMS.cpp.

virtual gnssEquationDefinition getDefaultEqDefinition  )  const [inline, virtual]
 

Method to get the default equation definition being used with GNSS data structures.

Definition at line 209 of file SolverLMS.hpp.

int getIndex void   )  const [virtual]
 

Returns an index identifying this object.

Implements ProcessingClass.

Reimplemented in CodeKalmanSolver, SolverPPP, SolverPPPFB, and SolverWMS.

Definition at line 45 of file SolverLMS.cpp.

double getSolution const TypeID type  )  const throw (InvalidRequest) [virtual]
 

Returns the solution associated to a given TypeID.

Parameters:
type TypeID of the solution we are looking for.

Definition at line 197 of file SolverLMS.cpp.

References GPSTK_THROW.

double getVariance const TypeID type  )  const throw (InvalidRequest) [virtual]
 

Returns the variance associated to a given TypeID.

Parameters:
type TypeID of the variance we are looking for.

Definition at line 234 of file SolverLMS.cpp.

References GPSTK_THROW.

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

Returns a reference to a gnnsRinex object after solving the previously defined equation system.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Reimplemented in CodeKalmanSolver, SolverPPP, and SolverPPPFB.

Definition at line 175 of file SolverLMS.hpp.

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

Returns a reference to a gnnsSatTypeValue object after solving the previously defined equation system.

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Reimplemented in CodeKalmanSolver, SolverPPP, and SolverPPPFB.

Definition at line 165 of file SolverLMS.hpp.

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

Returns a reference to a satTypeValueMap object after solving the previously defined equation system.

Parameters:
gData Data object holding the data.

Reimplemented in SolverWMS.

Definition at line 145 of file SolverLMS.cpp.

References GPSTK_THROW.

virtual SolverLMS& setDefaultEqDefinition const gnssEquationDefinition eqDef  )  [inline, virtual]
 

Method to set the default equation definition to be used when fed with GNSS data structures.

Parameters:
eqDef gnssEquationDefinition to be used by default.

Definition at line 201 of file SolverLMS.hpp.

Referenced by CodeKalmanSolver::CodeKalmanSolver(), and SolverWMS::SolverWMS().


Member Data Documentation

gnssEquationDefinition defaultEqDef [protected]
 

Default equation definition to be used when fed with GNSS data structures.

Definition at line 231 of file SolverLMS.hpp.

Referenced by SolverLMS::SolverLMS().


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