SuperKalmanFilter.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id:$"
00002 
00009 #ifndef GPSTK_SUPER_KALMANFILTER_HPP
00010 #define GPSTK_SUPER_KALMANFILTER_HPP
00011 
00012 //============================================================================
00013 //
00014 //  This file is part of GPSTk, the GPS Toolkit.
00015 //
00016 //  The GPSTk is free software; you can redistribute it and/or modify
00017 //  it under the terms of the GNU Lesser General Public License as published
00018 //  by the Free Software Foundation; either version 2.1 of the License, or
00019 //  any later version.
00020 //
00021 //  The GPSTk is distributed in the hope that it will be useful,
00022 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024 //  GNU Lesser General Public License for more details.
00025 //
00026 //  You should have received a copy of the GNU Lesser General Public
00027 //  License along with GPSTk; if not, write to the Free Software Foundation,
00028 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029 //
00030 //  Wei Yan - Chinese Academy of Sciences . 2009, 2010
00031 //
00032 //============================================================================
00033 
00034 
00035 
00036 #include "Exception.hpp"
00037 #include "Matrix.hpp"
00038 #include "Vector.hpp"
00039 #include "SolverBase.hpp"
00040 
00041 
00042 namespace gpstk
00043 {
00044 
00046 
00047 
00049 
00086    class SuperKalmanFilter
00087    {
00088    public:
00089 
00091       SuperKalmanFilter();
00092 
00093 
00101       SuperKalmanFilter( const Vector<double>& initialState,
00102                          const Matrix<double>& initialErrorCovariance );
00103 
00104 
00105 
00113       SuperKalmanFilter( const double& initialValue,
00114                          const double& initialErrorVariance );
00115 
00116 
00118       virtual ~SuperKalmanFilter() {};
00119 
00120 
00131       virtual void Reset( const Vector<double>& initialState,
00132                           const Matrix<double>& initialErrorCovariance );
00133 
00134 
00145       virtual void Reset( const double& initialValue,
00146                           const double& initialErrorVariance );
00147 
00148 
00166       virtual int Compute( const Matrix<double>& phiMatrix,
00167                            const Matrix<double>& controlMatrix,
00168                            const Vector<double>& controlInput,
00169                            const Matrix<double>& processNoiseCovariance,
00170                            const Vector<double>& measurements,
00171                            const Matrix<double>& measurementsMatrix,
00172                            const Matrix<double>& measurementsNoiseCovariance )
00173          throw(InvalidSolver);
00174 
00175 
00176 
00195       virtual int Compute( const Vector<double>& stateVector,
00196                            const Matrix<double>& phiMatrix,
00197                            const Matrix<double>& controlMatrix,
00198                            const Vector<double>& controlInput,
00199                            const Matrix<double>& processNoiseCovariance,
00200                            const Vector<double>& measurements,
00201                            const Matrix<double>& measurementsMatrix,
00202                            const Matrix<double>& measurementsNoiseCovariance )
00203          throw(InvalidSolver);
00204 
00205 
00222       virtual int Compute( const Matrix<double>& phiMatrix,
00223                            const Matrix<double>& processNoiseCovariance,
00224                            const Vector<double>& measurements,
00225                            const Matrix<double>& measurementsMatrix,
00226                            const Matrix<double>& measurementsNoiseCovariance )
00227          throw(InvalidSolver);
00228 
00229 
00247       virtual int Compute( const Vector<double>& stateVector,
00248                            const Matrix<double>& phiMatrix,
00249                            const Matrix<double>& processNoiseCovariance,
00250                            const Vector<double>& measurements,
00251                            const Matrix<double>& measurementsMatrix,
00252                            const Matrix<double>& measurementsNoiseCovariance )
00253          throw(InvalidSolver);
00254 
00255 
00272       virtual int Compute( const double& phiValue,
00273                            const double& controlGain,
00274                            const double& controlInput,
00275                            const double& processNoiseVariance,
00276                            const double& measurement,
00277                            const double& measurementsGain,
00278                            const double& measurementsNoiseVariance )
00279          throw(InvalidSolver);
00280 
00281 
00299       virtual int Compute( const double& stateValue,
00300                            const double& phiValue,
00301                            const double& controlGain,
00302                            const double& controlInput,
00303                            const double& processNoiseVariance,
00304                            const double& measurement,
00305                            const double& measurementsGain,
00306                            const double& measurementsNoiseVariance )
00307          throw(InvalidSolver);
00308 
00309 
00324       virtual int Compute( const double& phiValue,
00325                            const double& processNoiseVariance,
00326                            const double& measurement,
00327                            const double& measurementsGain,
00328                            const double& measurementsNoiseVariance )
00329          throw(InvalidSolver);
00330 
00331 
00346       virtual int Compute( const double& stateValue,
00347                            const double& phiValue,
00348                            const double& processNoiseVariance,
00349                            const double& measurement,
00350                            const double& measurementsGain,
00351                            const double& measurementsNoiseVariance )
00352          throw(InvalidSolver);
00353 
00354    public:
00355 
00357       Vector<double> xhat;
00358 
00359 
00361       Matrix<double> P;
00362 
00363 
00365       Vector<double> xhatminus;
00366 
00367 
00369       Matrix<double> Pminus;
00370 
00371 
00373       Matrix<double> weightFactor;
00374 
00375 
00376    protected:
00377 
00396       virtual int Predict( const Matrix<double>& phiMatrix,
00397                            const Vector<double>& previousState,
00398                            const Matrix<double>& previousErrorCovariance,
00399                            const Matrix<double>& controlMatrix,
00400                            const Vector<double>& controlInput,
00401                            const Matrix<double>& processNoiseCovariance )
00402          throw(InvalidSolver);
00403 
00404       
00421       virtual int Correct( const Vector<double>& measurements,
00422                            const Matrix<double>& measurementsMatrix,
00423                            const Matrix<double>& measurementsNoiseCovariance )
00424          throw(InvalidSolver);
00425 
00426 
00427    }; // End of class 'SuperKalmanFilter'
00428 
00430 
00431 }  // End of namespace gpstk
00432 
00433 #endif // GPSTK_SUPER_KALMANFILTER_HPP
00434 

Generated on Wed Jan 4 03:31:06 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1