#include <SolverGeneral.hpp>
Inheritance diagram for SolverGeneral:


SolverGeneral is programmed using class "EquationSystem", that defines a set of rules to "tune" the solver to solve a specific problem. In turn, "EquationSystem" relies in other classes like "Variable" and "Equation", responsible of setting rules such as TypeID's, SourceID's, stochastic models, etc.
In this way, complex multi-station and/or hybrid GNSS-INS problems can be tackled with relatively few code lines, encouraging code reusability.
A typical way to use this class follows, showing how to set up a SolverGeneral object to perform "Precise Point Positioning" (PPP):
// SETTING THE RULES: DEFINE VARIABLES // Declare stochastic models to be used StochasticModel coordinatesModel; TropoRandomWalkModel tropoModel; PhaseAmbiguityModel ambiModel; // These variables are, by default, SourceID-indexed Variable dx( TypeID::dx, &coordinatesModel, true, false, 100.0 ); Variable dy( TypeID::dy, &coordinatesModel ); dy.setInitialVariance( 100.0 ); // Equivalent to 'dx' setup Variable dz( TypeID::dz, &coordinatesModel ); dz.setInitialVariance( 100.0 ); Variable cdt( TypeID::cdt ); cdt.setDefaultForced(true); // Force default coefficient (1.0) Variable tropo( TypeID::wetMap, &tropoModel ); tropo.setInitialVariance( 25.0 ); // The following variable is, SourceID and SatID-indexed Variable ambi( TypeID::BLC, &ambiModel, true, true ); ambi.setDefaultForced(true); // Force default coefficient (1.0) // This will be the independent term for code equation Variable prefitC( TypeID::prefitC ); // This will be the independent term for phase equation Variable prefitL( TypeID::prefitL ); // SETTING THE RULES: DESCRIBE EQUATIONS // Define Equation object for code equations, and add variables Equation equPC( prefitC ); equPC.addVariable(dx); equPC.addVariable(dy); equPC.addVariable(dz); equPC.addVariable(cdt); equPC.addVariable(tropo); // Define Equation object for phase equations, and add variables Equation equLC( prefitL ); equLC.addVariable(dx); equLC.addVariable(dy); equLC.addVariable(dz); equLC.addVariable(cdt); equLC.addVariable(tropo); equLC.addVariable(ambi); // This variable is for phase only // Phase equations should have higher relative weight equLC.setWeight(10000.0); // 100.0 * 100.0 // SETTING THE RULES: SETUP EQUATION SYSTEM // Create 'EquationSystem' object EquationSystem eqSystem; // Add equation descriptions eqSystem.addEquation(equPC); eqSystem.addEquation(equLC); // SETUP "SolverGeneral" OBJECT // Create 'SolverGeneral' object and add equation system SolverGeneral solver( eqSystem );
The "SolverGeneral" object is then ready to be fed with data encapsulated in an appropriate GDS. Take notice that for problems involving multiple epochs and/or multiple stations the recommended GDS is "gnssDataMap", which "SolverGeneral" fully supports.
"SolverGeneral" is based on an Extended Kalman filter, and Kalman filters are objets that store their internal state, so you MUST NOT use the SAME object to process DIFFERENT data streams.
Definition at line 168 of file SolverGeneral.hpp.
Public Member Functions | |
| SolverGeneral (const Equation &equation) | |
| Explicit constructor. | |
| SolverGeneral (const std::list< Equation > &equationList) | |
| Explicit constructor. | |
| SolverGeneral (const EquationSystem &equationSys) | |
| Explicit constructor. | |
| virtual EquationSystem | getEquationSystem () const |
| Get a copy of the equation system being solved. | |
| virtual SolverGeneral & | setEquationSystem (const EquationSystem &equationSys) |
| Set the equation system to be solved. | |
| virtual ConstraintSystem | getEquationSystemConstraints () const |
| Get a copy ConstraintSystem of the equation system being solved. | |
| virtual SolverGeneral & | setEquationSystemConstraints (const ConstraintSystem &constraintSys) |
| Set the ConstraintSystem of the equation system to be solved. | |
| virtual SolverGeneral & | addEquation (const Equation &equation) |
| Add a new equation to be managed. | |
| virtual SolverGeneral & | removeEquation (const Variable &indterm) |
| Remove an Equation being managed. | |
| virtual SolverGeneral & | clearEquations () |
| Remove all Equation objects currently defined. | |
| virtual SolverGeneral & | reset (void) |
| This method resets the filter, setting all variance values in covariance matrix to a very high level. | |
| virtual gnssSatTypeValue & | Process (gnssSatTypeValue &gData) throw (ProcessingException) |
| Returns a reference to a gnnsSatTypeValue object after solving the previously defined equation system. | |
| virtual gnssRinex & | Process (gnssRinex &gData) throw (ProcessingException) |
| Returns a reference to a gnnsRinex object after solving the previously defined equation system. | |
| virtual gnssDataMap & | Process (gnssDataMap &gdsMap) throw (ProcessingException) |
| Returns a reference to a gnssDataMap object after solving the previously defined equation system. | |
| virtual double | getSolution (const Variable &variable) const throw (InvalidRequest) |
| Returns the solution associated to a given Variable. | |
| virtual double | getSolution (const TypeID &type) const throw (InvalidRequest) |
| Returns the solution associated to a given TypeID. | |
| virtual double | getSolution (const TypeID &type, const SourceID &source) const throw (InvalidRequest) |
| Returns the solution associated to a given TypeID and SourceID. | |
| virtual double | getSolution (const TypeID &type, const SatID &sat) const throw (InvalidRequest) |
| Returns the solution associated to a given TypeID, SourceID and SatID. | |
| virtual double | getSolution (const TypeID &type, const SourceID &source, const SatID &sat) const throw (InvalidRequest) |
| Returns the solution associated to a given TypeID, SourceID and SatID. | |
| virtual double | getCovariance (const Variable &var1, const Variable &var2) const throw (InvalidRequest) |
| Returns the covariance associated to a given Variable. | |
| virtual double | getVariance (const Variable &variable) const throw (InvalidRequest) |
| Returns the variance associated to a given Variable. | |
| virtual double | getVariance (const TypeID &type) const throw (InvalidRequest) |
| Returns the variance associated to a given TypeID. | |
| virtual double | getVariance (const TypeID &type, const SourceID &source) const throw (InvalidRequest) |
| Returns the variance associated to a given TypeID. | |
| virtual double | getVariance (const TypeID &type, const SatID &sat) const throw (InvalidRequest) |
| Returns the variance associated to a given TypeID. | |
| virtual double | getVariance (const TypeID &type, const SourceID &source, const SatID &sat) const throw (InvalidRequest) |
| Returns the variance associated to a given TypeID. | |
| virtual Matrix< double > | getPhiMatrix (void) const |
| Get the State Transition Matrix (phiMatrix). | |
| virtual Matrix< double > | getQMatrix (void) const |
| Get the Noise covariance matrix (QMatrix). | |
| virtual int | getIndex (void) const |
| Returns an index identifying this object. | |
| virtual std::string | getClassName (void) const |
| Returns a string identifying this object. | |
| virtual | ~SolverGeneral () |
| Destructor. | |
Protected Member Functions | |
| virtual gnssDataMap & | preCompute (gnssDataMap &gdsMap) throw (ProcessingException) |
| Code to be executed before 'Compute()' method. | |
| virtual gnssDataMap & | postCompute (gnssDataMap &gdsMap) throw (ProcessingException) |
| Code to be executed after 'Compute()' method. | |
| virtual SolverGeneral & | setSolution (const Variable &variable, const double &val) throw (InvalidRequest) |
| Set the solution associated to a given Variable. | |
| virtual SolverGeneral & | setCovariance (const Variable &var1, const Variable &var2, const double &cov) throw (InvalidRequest) |
| Set the covariance associated to a given Variable. | |
Protected Attributes | |
| EquationSystem | equSystem |
| Equation system. | |
Friends | |
| class | GeneralConstraint |
|
|
Explicit constructor.
Definition at line 176 of file SolverGeneral.hpp. |
|
|
Explicit constructor.
Definition at line 57 of file SolverGeneral.cpp. References EquationSystem::addEquation(), and SolverGeneral::equSystem. |
|
|
Explicit constructor.
Definition at line 193 of file SolverGeneral.hpp. |
|
|
Destructor.
Definition at line 444 of file SolverGeneral.hpp. |
|
|
Add a new equation to be managed.
Definition at line 231 of file SolverGeneral.hpp. |
|
|
Remove all Equation objects currently defined.
Definition at line 254 of file SolverGeneral.hpp. |
|
|
Returns a string identifying this object.
Implements ProcessingClass. Definition at line 47 of file SolverGeneral.cpp. |
|
||||||||||||
|
Returns the covariance associated to a given Variable.
Definition at line 793 of file SolverGeneral.cpp. References GPSTK_THROW. Referenced by GeneralConstraint::changeState(), and GeneralConstraint::getCovariance(). |
|
|
Get a copy of the equation system being solved.
Definition at line 198 of file SolverGeneral.hpp. Referenced by GeneralConstraint::constraintToSolver(). |
|
|
Get a copy ConstraintSystem of the equation system being solved.
Definition at line 213 of file SolverGeneral.hpp. References EquationSystem::getConstraintSystem(). |
|
|
Returns an index identifying this object.
Definition at line 42 of file SolverGeneral.cpp. |
|
|
Get the State Transition Matrix (phiMatrix).
Definition at line 426 of file SolverGeneral.hpp. |
|
|
Get the Noise covariance matrix (QMatrix).
Definition at line 431 of file SolverGeneral.hpp. |
|
||||||||||||||||
|
Returns the solution associated to a given TypeID, SourceID and SatID.
Definition at line 758 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
||||||||||||
|
Returns the solution associated to a given TypeID, SourceID and SatID.
Definition at line 719 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
||||||||||||
|
Returns the solution associated to a given TypeID and SourceID.
Definition at line 681 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
|
Returns the solution associated to a given TypeID.
Definition at line 645 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
|
Returns the solution associated to a given Variable.
Definition at line 616 of file SolverGeneral.cpp. References GPSTK_THROW. Referenced by GeneralConstraint::changeState(), and GeneralConstraint::getSolution(). |
|
||||||||||||||||
|
Returns the variance associated to a given TypeID.
Definition at line 964 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
||||||||||||
|
Returns the variance associated to a given TypeID.
Definition at line 926 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
||||||||||||
|
Returns the variance associated to a given TypeID.
Definition at line 890 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
|
Returns the variance associated to a given TypeID.
Definition at line 854 of file SolverGeneral.cpp. References Matrix::begin(), and GPSTK_THROW. |
|
|
Returns the variance associated to a given Variable.
Definition at line 828 of file SolverGeneral.cpp. References GPSTK_THROW. |
|
|
Code to be executed after 'Compute()' method.
Definition at line 491 of file SolverGeneral.cpp. References Matrix::end(), GPSTK_THROW, and gpstk::VariableSet. Referenced by GeneralConstraint::constraintToSolver(). |
|
|
Code to be executed before 'Compute()' method.
Definition at line 203 of file SolverGeneral.cpp. References Vector::end(), Matrix::end(), GPSTK_THROW, and gpstk::VariableSet. |
|
|
Returns a reference to a gnssDataMap object after solving the previously defined equation system.
Definition at line 158 of file SolverGeneral.cpp. References GPSTK_THROW. |
|
|
Returns a reference to a gnnsRinex object after solving the previously defined equation system.
Implements ProcessingClass. Definition at line 118 of file SolverGeneral.cpp. References gnssDataMap::addGnssRinex(), gnssDataMap::getGnssRinex(), and GPSTK_THROW. |
|
|
Returns a reference to a gnnsSatTypeValue object after solving the previously defined equation system.
Implements ProcessingClass. Definition at line 77 of file SolverGeneral.cpp. References gnssData::body, GPSTK_THROW, and gnssRinex::header. Referenced by GeneralConstraint::process(). |
|
|
Remove an Equation being managed. In this case the equation is identified by its independent term.
Definition at line 244 of file SolverGeneral.hpp. |
|
|
This method resets the filter, setting all variance values in covariance matrix to a very high level.
Definition at line 260 of file SolverGeneral.hpp. |
|
||||||||||||||||
|
Set the covariance associated to a given Variable.
Definition at line 1024 of file SolverGeneral.cpp. References GPSTK_THROW. |
|
|
Set the equation system to be solved.
Definition at line 207 of file SolverGeneral.hpp. |
|
|
Set the ConstraintSystem of the equation system to be solved.
Definition at line 222 of file SolverGeneral.hpp. Referenced by GeneralConstraint::process(). |
|
||||||||||||
|
Set the solution associated to a given Variable.
Definition at line 999 of file SolverGeneral.cpp. References GPSTK_THROW. |
|
|
Definition at line 564 of file SolverGeneral.hpp. |
|
|
Equation system.
Definition at line 451 of file SolverGeneral.hpp. Referenced by SolverGeneral::SolverGeneral(). |
1.3.9.1