CodeKalmanSolver.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: CodeKalmanSolver.hpp 1848 2009-04-07 10:04:52Z architest $"
00002 
00008 #ifndef CODEKALMANSOLVER_HPP
00009 #define CODEKALMANSOLVER_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2008, 2009
00030 //
00031 //============================================================================
00032 
00033 
00034 #include "SolverLMS.hpp"
00035 #include "StochasticModel.hpp"
00036 #include "SimpleKalmanFilter.hpp"
00037 
00038 
00039 namespace gpstk
00040 {
00041 
00043 
00044 
00046 
00169    class CodeKalmanSolver : public SolverLMS
00170    {
00171    public:
00172 
00174       CodeKalmanSolver();
00175 
00176 
00182       CodeKalmanSolver(const gnssEquationDefinition& eqDef);
00183 
00184 
00202       virtual int Compute( const Vector<double>& prefitResiduals,
00203                            const Matrix<double>& designMatrix,
00204                            const Matrix<double>& weightMatrix )
00205          throw(InvalidSolver);
00206 
00207 
00226       virtual int Compute( const Vector<double>& prefitResiduals,
00227                            const Matrix<double>& designMatrix,
00228                            const Vector<double>& weightVector )
00229          throw(InvalidSolver);
00230 
00231 
00237       virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00238          throw(ProcessingException);
00239 
00240 
00246       virtual gnssRinex& Process(gnssRinex& gData)
00247          throw(ProcessingException);
00248 
00249 
00251       StochasticModel* getXCoordinatesModel() const
00252       { return pCoordXStoModel; };
00253 
00254 
00260       CodeKalmanSolver& setXCoordinatesModel(StochasticModel* pModel)
00261       { pCoordXStoModel = pModel; return (*this); };
00262 
00263 
00265       StochasticModel* getYCoordinatesModel() const
00266       { return pCoordYStoModel; };
00267 
00268 
00274       CodeKalmanSolver& setYCoordinatesModel(StochasticModel* pModel)
00275       { pCoordYStoModel = pModel; return (*this); };
00276 
00277 
00279       StochasticModel* getZCoordinatesModel() const
00280       { return pCoordZStoModel; };
00281 
00282 
00288       CodeKalmanSolver& setZCoordinatesModel(StochasticModel* pModel)
00289       { pCoordZStoModel = pModel; return (*this); };
00290 
00291 
00303       CodeKalmanSolver& setCoordinatesModel(StochasticModel* pModel);
00304 
00305 
00307       StochasticModel* getReceiverClockModel() const
00308       { return pClockStoModel; };
00309 
00310 
00316       CodeKalmanSolver& setReceiverClockModel(StochasticModel* pModel)
00317       { pClockStoModel = pModel; return (*this); };
00318 
00319 
00321       Matrix<double> getPhiMatrix() const
00322       { return phiMatrix; };
00323 
00324 
00334       CodeKalmanSolver& setPhiMatrix(const Matrix<double> & pMatrix)
00335       { phiMatrix = pMatrix; return (*this); };
00336 
00337 
00339       Matrix<double> getQMatrix() const
00340       { return qMatrix; };
00341 
00342 
00352       CodeKalmanSolver& setQMatrix(const Matrix<double> & pMatrix)
00353       { qMatrix = pMatrix; return (*this); };
00354 
00355 
00357       virtual int getIndex(void) const;
00358 
00359 
00361       virtual std::string getClassName(void) const;
00362 
00363 
00365       virtual ~CodeKalmanSolver() {};
00366 
00367 
00368    private:
00369 
00370 
00372       int numUnknowns;
00373 
00374 
00376       int numMeas;
00377 
00378 
00380       StochasticModel* pCoordXStoModel;
00381 
00382 
00384       StochasticModel* pCoordYStoModel;
00385 
00386 
00388       StochasticModel* pCoordZStoModel;
00389 
00390 
00392       StochasticModel* pClockStoModel;
00393 
00394 
00396       Matrix<double> phiMatrix;
00397 
00398 
00400       Matrix<double> qMatrix;
00401 
00402 
00404       Matrix<double> hMatrix;
00405 
00406 
00408       Matrix<double> rMatrix;
00409 
00410 
00412       Vector<double> measVector;
00413 
00414 
00416       SimpleKalmanFilter kFilter;
00417 
00418 
00420       void Init(void);
00421 
00422 
00424       StochasticModel constantModel;
00425 
00426 
00428       WhiteNoiseModel whitenoiseModel;
00429 
00430 
00432       static int classIndex;
00433 
00435       int index;
00436 
00438       void setIndex(void)
00439       { index = classIndex++; };
00440 
00441 
00442    }; // End of class 'CodeKalmanSolver'
00443 
00445 
00446 }  // End of namespace gpstk
00447 #endif   // CODEKALMANSOLVER_HPP

Generated on Tue May 22 03:30:56 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1