SRIMatrix.hpp File Reference


Detailed Description

Template routines for efficient manipulation of square root matricies, used for least squares estimation and the SRI form of the Kalman filter.

Definition in file SRIMatrix.hpp.

#include "Vector.hpp"
#include "Matrix.hpp"
#include "StringUtils.hpp"

Include dependency graph for SRIMatrix.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  gpstk

Functions

template<class T>
void SrifMU (Matrix< T > &R, Vector< T > &Z, Matrix< T > &A, unsigned int M=0) throw (MatrixException)
 Square root information measurement update, with new data in the form of a single matrix concatenation of H and D: A = H || D.
template<class T>
void SrifMU (Matrix< T > &R, Vector< T > &Z, const Matrix< T > &H, Vector< T > &D, unsigned int M=0) throw (MatrixException)
 Square root information filter (Srif) measurement update (MU).
template<class T>
Matrix< T > lowerCholesky (const Matrix< T > &A) throw (MatrixException)
 Compute lower triangular square root of a symmetric positive definite matrix (Cholesky decomposition) Crout algorithm.
template<class T>
Matrix< T > upperCholesky (const Matrix< T > &A) throw (MatrixException)
 Compute upper triangular square root of a symmetric positive definite matrix (Cholesky decomposition) Crout algorithm; that is A = transpose(U)*U.
template<class T>
Matrix< T > inverseCholesky (const Matrix< T > &A) throw (MatrixException)
 Compute inverse of a symmetric positive definite matrix using Cholesky decomposition.
template<class T>
Matrix< T > inverseUT (const Matrix< T > &UT, T *ptrSmall=NULL, T *ptrBig=NULL) throw (MatrixException)
 Compute inverse of upper triangular matrix, returning smallest and largest eigenvalues.
template<class T>
Matrix< T > UTtimesTranspose (const Matrix< T > &UT) throw (MatrixException)
 Compute the product of an upper triangular matrix and its transpose.


Function Documentation

Matrix<T> inverseCholesky const Matrix< T > &  A  )  throw (MatrixException)
 

Compute inverse of a symmetric positive definite matrix using Cholesky decomposition.

Parameters:
A Matrix to be inverted; symmetric and positive definite, unchanged
Returns:
Matrix inverse of input matrix
Exceptions:
MatrixException if input Matrix is not square
SingularMatrixException if input Matrix is singular

Definition at line 306 of file SRIMatrix.hpp.

References GPSTK_RETHROW, gpstk::inverseUT(), gpstk::lowerCholesky(), gpstk::transpose(), and gpstk::UTtimesTranspose().

Matrix<T> inverseUT const Matrix< T > &  UT,
T *  ptrSmall = NULL,
T *  ptrBig = NULL
throw (MatrixException)
 

Compute inverse of upper triangular matrix, returning smallest and largest eigenvalues.

Parameters:
UT upper triangular matrix to be inverted
ptrS pointer to <t> small, on output *ptrS contains smallest eigenvalue.
ptrB pointer to <t> small, on output *ptrB contains largest eigenvalue.
Returns:
inverse of input matrix.
Exceptions:
MatrixException if input is not square (assumed upper triangular also).
SingularMatrixException if input is singular.

Definition at line 336 of file SRIMatrix.hpp.

References GPSTK_THROW, Matrix::rows(), and gpstk::sum().

Referenced by SRI::getStateAndCovariance(), and gpstk::inverseCholesky().

Matrix<T> lowerCholesky const Matrix< T > &  A  )  throw (MatrixException)
 

Compute lower triangular square root of a symmetric positive definite matrix (Cholesky decomposition) Crout algorithm.

Parameters:
A Matrix to be decomposed; symmetric and positive definite, unchanged
Returns:
Matrix lower triangular square root of input matrix
Exceptions:
MatrixException if input Matrix is not square
MatrixException if input Matrix is not positive definite

Definition at line 250 of file SRIMatrix.hpp.

References GPSTK_THROW, and Matrix::rows().

Referenced by gpstk::inverseCholesky(), and gpstk::upperCholesky().

void SrifMU Matrix< T > &  R,
Vector< T > &  Z,
const Matrix< T > &  H,
Vector< T > &  D,
unsigned int  M = 0
throw (MatrixException)
 

Square root information filter (Srif) measurement update (MU).

Use the Householder transformation to combine the information stored in the square root information (SRI) covariance matrix R and state Z with new information in the given partials matrix and data vector to produce an updated SRI {R,Z}. Measurement noise associated with the new information (H and D) is assumed to be white with unit covariance. If necessary, the data may be 'whitened' by multiplying H and D by the inverse of the lower triangular square root of the covariance matrix; that is, compute L = Cholesky(Measurement covariance) and let H = L*H, D = L*D.

Parameters:
R Upper triangluar apriori SRI covariance matrix of dimension N
Z A priori SRI state vector of length N
H Partials matrix of dimension MxN, unchanged on output.
D Data vector of length M; on output contains the residuals of fit.
M If H and D have dimension M' > M, then call with M = data length; otherwise M = 0 (the default) and is ignored.
Exceptions:
MatrixException if the input has inconsistent dimensions.

Definition at line 208 of file SRIMatrix.hpp.

References ConstMatrixBase< T, Matrix< T > >::colCopy(), Matrix::cols(), and GPSTK_RETHROW.

Referenced by SRI::addAPrioriInformation(), SRI::measurementUpdate(), SRI::permute(), and SRI::transform().

void SrifMU Matrix< T > &  R,
Vector< T > &  Z,
Matrix< T > &  A,
unsigned int  M = 0
throw (MatrixException)
 

Square root information measurement update, with new data in the form of a single matrix concatenation of H and D: A = H || D.

See doc for the overloaded SrifMU().

Definition at line 125 of file SRIMatrix.hpp.

References gpstk::beta(), GPSTK_THROW, and gpstk::sum().

Referenced by SRIleastSquares::dataUpdate(), and SRIFilter::measurementUpdate().

Matrix<T> upperCholesky const Matrix< T > &  A  )  throw (MatrixException)
 

Compute upper triangular square root of a symmetric positive definite matrix (Cholesky decomposition) Crout algorithm; that is A = transpose(U)*U.

Note that this result will be equal to transpose(lowerCholesky(A)) == transpose(Ch.L from class Cholesky), NOT Ch.U; class Cholesky computes L,U where A = L*LT = U*UT [while A=UT*U here].

Parameters:
A Matrix to be decomposed; symmetric and positive definite, unchanged
Returns:
Matrix upper triangular square root of input matrix
Exceptions:
MatrixException if input Matrix is not square
MatrixException if input Matrix is not positive definite

Definition at line 294 of file SRIMatrix.hpp.

References gpstk::lowerCholesky(), and gpstk::transpose().

Matrix<T> UTtimesTranspose const Matrix< T > &  UT  )  throw (MatrixException)
 

Compute the product of an upper triangular matrix and its transpose.

Parameters:
UT upper triangular matrix
Returns:
product UT * transpose(UT)
Exceptions:
MatrixException if input is not square (assumed upper triangular also).

Definition at line 399 of file SRIMatrix.hpp.

References GPSTK_THROW, Matrix::rows(), and gpstk::sum().

Referenced by SRI::getStateAndCovariance(), and gpstk::inverseCholesky().


Generated on Wed Feb 8 03:31:20 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1