analyticmeasurementmodel_gaussianuncertainty.cpp
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2002 Klaas Gadeyne <first dot last at gmail dot com>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation; either version 2.1 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
20 
21 namespace BFL
22 {
23 
24  using namespace MatrixWrapper;
25 
26  // Constructor
28  (AnalyticConditionalGaussian* Measurementpdf)
30  {}
31 
32  // Destructor
34  {}
35 
36 
37  Matrix
38  AnalyticMeasurementModelGaussianUncertainty::df_dxGet(const ColumnVector& u, const ColumnVector& x)
39  {
40  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
41  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
42  return dynamic_cast<AnalyticConditionalGaussian *>(MeasurementPdfGet())->dfGet(0);
43  }
44 
45 
46  ColumnVector
47  AnalyticMeasurementModelGaussianUncertainty::PredictionGet(const ColumnVector& u, const ColumnVector& x)
48  {
49  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
50  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
51  return MeasurementPdfGet()->ExpectedValueGet();
52  }
53 
54 
55  SymmetricMatrix
56  AnalyticMeasurementModelGaussianUncertainty::CovarianceGet(const ColumnVector& u, const ColumnVector& x)
57  {
58  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
59  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
60  return dynamic_cast<AnalyticConditionalGaussian *>(MeasurementPdfGet())->CovarianceGet();
61  }
62 
63 }
virtual MatrixWrapper::Matrix df_dxGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns H-matrix.
AnalyticMeasurementModelGaussianUncertainty(AnalyticConditionalGaussian *Measurementpdf=NULL)
Constructor.
virtual MatrixWrapper::ColumnVector PredictionGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns estimation of measurement.
virtual MatrixWrapper::SymmetricMatrix CovarianceGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns covariance on the measurement.
Abstract Class representing all FULL Analytical Conditional gaussians.


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Feb 28 2022 21:56:33