SolverWMS Class Reference
[Mathematical algorithmsGPS solution algorithms and Tropospheric]

#include <SolverWMS.hpp>

Inheritance diagram for SolverWMS:

Inheritance graph
[legend]
Collaboration diagram for SolverWMS:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class computes the Weighted 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 the 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 SolverWMS object
   SolverWMS solverWMS;

      // This object will compute the appropriate MOPS weights
   ComputeMOPSWeights mopsW(nominalPos, bceStore);

      // GDS object
   gnssRinex gRin;

   while(rin >> gRin)
   {
      gRin >> model >> mopsW >> solverWMS;
   }

The "SolverWMS" 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 Weighted-Least-Mean-Squares method. It will also insert back postfit residual data into "gRin" if it successfully solves the equation system.

Please note it needs some weights assigned to each satellite. This can be achieved with objects from classes such as "ComputeIURAWeights", "ComputeMOPSWeights", etc., but in any case this is a mandatory step.

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
   solverWMS.setDefaultEqDefinition(newEq);

See also:
SolverBase.hpp and SolverLMS for base classes.

Definition at line 120 of file SolverWMS.hpp.

Public Member Functions

 SolverWMS ()
 Default constructor.
 SolverWMS (const gnssEquationDefinition &eqDef)
 Explicit constructor.
virtual int Compute (const Vector< double > &prefitResiduals, const Matrix< double > &designMatrix, const Matrix< double > &weightMatrix) throw (InvalidSolver)
 Compute the Weighted Least Mean Squares Solution of the given equations set.
virtual int Compute (const Vector< double > &prefitResiduals, const Matrix< double > &designMatrix, const Vector< double > &weightVector) throw (InvalidSolver)
 Compute the Weighted Least Mean Squares Solution of the given equations set.
virtual int Compute (const Vector< double > &prefitResiduals, const Matrix< double > &designMatrix) throw (InvalidSolver)
 Compute the Weighted 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 std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~SolverWMS ()
 Destructor.

Public Attributes

Matrix< double > covMatrixNoWeight
 Covariance matrix without weights.


Constructor & Destructor Documentation

SolverWMS  ) 
 

Default constructor.

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

Definition at line 48 of file SolverWMS.cpp.

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

SolverWMS const gnssEquationDefinition eqDef  ) 
 

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 72 of file SolverWMS.cpp.

References SolverLMS::setDefaultEqDefinition().

virtual ~SolverWMS  )  [inline, virtual]
 

Destructor.

Definition at line 205 of file SolverWMS.hpp.


Member Function Documentation

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

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

Parameters:
prefitResiduals Vector of prefit residuals
designMatrix Design matrix for the equation system

Reimplemented from SolverLMS.

Definition at line 180 of file SolverWMS.hpp.

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

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

Parameters:
prefitResiduals Vector of prefit residuals
designMatrix Design matrix for the equation system
weightVector Vector of weights assigned to each satellite.
Returns:
0 if OK -1 if problems arose

Definition at line 93 of file SolverWMS.cpp.

References GPSTK_THROW.

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

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

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

Definition at line 139 of file SolverWMS.cpp.

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

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Reimplemented from SolverLMS.

Definition at line 40 of file SolverWMS.cpp.

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 from SolverLMS.

Definition at line 224 of file SolverWMS.cpp.

References GPSTK_THROW.


Member Data Documentation

Matrix<double> covMatrixNoWeight
 

Covariance matrix without weights.

This must be used to compute DOP

Definition at line 197 of file SolverWMS.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 18 03:31:45 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1