SRIFilter.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: SRIFilter.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002 
00003 //============================================================================
00004 //
00005 //  This file is part of GPSTk, the GPS Toolkit.
00006 //
00007 //  The GPSTk is free software; you can redistribute it and/or modify
00008 //  it under the terms of the GNU Lesser General Public License as published
00009 //  by the Free Software Foundation; either version 2.1 of the License, or
00010 //  any later version.
00011 //
00012 //  The GPSTk is distributed in the hope that it will be useful,
00013 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //  GNU Lesser General Public License for more details.
00016 //
00017 //  You should have received a copy of the GNU Lesser General Public
00018 //  License along with GPSTk; if not, write to the Free Software Foundation,
00019 //  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00020 //  
00021 //  Copyright 2004, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 
00025 //============================================================================
00026 //
00027 //This software developed by Applied Research Laboratories at the University of
00028 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00029 //Department of Defense. The U.S. Government retains all rights to use,
00030 //duplicate, distribute, disclose, or release this software. 
00031 //
00032 //Pursuant to DoD Directive 523024 
00033 //
00034 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00035 //                           release, distribution is unlimited.
00036 //
00037 //=============================================================================
00038 
00049 //------------------------------------------------------------------------------------
00050 #ifndef CLASS_SQUAREROOT_INFORMATION_FILTER_INCLUDE
00051 #define CLASS_SQUAREROOT_INFORMATION_FILTER_INCLUDE
00052 
00053 //------------------------------------------------------------------------------------
00054 // system
00055 #include <ostream>
00056 // GPSTk
00057 #include "Vector.hpp"
00058 #include "Matrix.hpp"
00059 #include "SRI.hpp"
00060 
00061 namespace gpstk
00062 {
00063 
00064 //------------------------------------------------------------------------------------
00093 class SRIFilter : public SRI {
00094 public:
00096    SRIFilter(void) throw();
00097 
00100    SRIFilter(const unsigned int N)
00101       throw();
00102 
00105    SRIFilter(const Namelist& NL)
00106       throw();
00107 
00113    SRIFilter(const Matrix<double>& R,
00114              const Vector<double>& Z,
00115              const Namelist& NL)
00116       throw(MatrixException);
00117 
00120    SRIFilter(const SRIFilter& right)
00121       throw()
00122       { *this = right; }
00123 
00126    SRIFilter& operator=(const SRIFilter& right)
00127       throw();
00128 
00135    void measurementUpdate(const Matrix<double>& H,
00136                          Vector<double>& D,
00137                          const Matrix<double>& CM=SRINullMatrix)
00138    throw(MatrixException,VectorException);
00139 
00223    void timeUpdate(Matrix<double>& PhiInv,
00224                    Matrix<double>& Rw,
00225                    Matrix<double>& G,
00226                    Vector<double>& zw,
00227                    Matrix<double>& Rwx)
00228       throw(MatrixException);
00229 
00291    void smootherUpdate(Matrix<double>& Phi,
00292                        Matrix<double>& Rw,
00293                        Matrix<double>& G,
00294                        Vector<double>& zw,
00295                        Matrix<double>& Rwx)
00296       throw(MatrixException);
00297 
00351    static void DMsmootherUpdate(Matrix<double>& P,
00352                                 Vector<double>& X,
00353                                 Matrix<double>& Phinv,
00354                                 Matrix<double>& Rw,
00355                                 Matrix<double>& G,
00356                                 Vector<double>& Zw,
00357                                 Matrix<double>& Rwx)
00358       throw(MatrixException);
00359 
00361    static void DMsmootherUpdateWithControl(Matrix<double>& P,
00362                                            Vector<double>& X,
00363                                            Matrix<double>& Phinv,
00364                                            Matrix<double>& Rw,
00365                                            Matrix<double>& G,
00366                                            Vector<double>& Zw,
00367                                            Matrix<double>& Rwx,
00368                                            Vector<double>& U)
00369       throw(MatrixException);
00370 
00373    void zeroAll(void);
00374 
00379    void Reset(const int N=0);
00380 
00381 private:
00383    template <class T>
00384    static void SrifTU(Matrix<T>& R,
00385                       Vector<T>& Z,
00386                       Matrix<T>& Phi,
00387                       Matrix<T>& Rw,
00388                       Matrix<T>& G,
00389                       Vector<T>& Zw,
00390                       Matrix<T>& Rwx)
00391       throw(MatrixException);
00392 
00394    template <class T>
00395    static void SrifSU(Matrix<T>& R,
00396                       Vector<T>& Z,
00397                       Matrix<T>& Phi,
00398                       Matrix<T>& Rw,
00399                       Matrix<T>& G,
00400                       Vector<T>& Zw,
00401                       Matrix<T>& Rwx)
00402       throw(MatrixException);
00403 
00406    template <class T>
00407    static void SrifSU_DM(Matrix<T>& P,
00408                          Vector<T>& X,
00409                          Matrix<T>& Phinv,
00410                          Matrix<T>& Rw,
00411                          Matrix<T>& G,
00412                          Vector<T>& Zw,
00413                          Matrix<T>& Rwx)
00414       throw(MatrixException);
00415 
00417    void defaults(void) throw()
00418    {
00419       //valid = false;
00420    }
00421 
00422    // private member data - inherits from SRI
00423       // inherit SRI Information matrix, an upper triangular (square) matrix
00424    //Matrix<double> R;
00425       // inherit SRI state vector, of length equal to dimension (row and col) of R.
00426    //Vector<double> Z;
00427       // inherit SRI Namelist parallel to R and Z, labelling elements of state vector.
00428    //Namelist names;
00429 
00430    // --------- private member data ------------
00431    // TD how to implement valid?
00432    // indicates if filter is valid - set false when inversion finds singularity.
00433    //bool valid;
00434 
00435 }; // end class SRIFilter
00436 
00437 } // end namespace gpstk
00438 
00439 //------------------------------------------------------------------------------------
00440 #endif

Generated on Fri May 24 03:31:13 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1