Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GaussBell Class Reference

This class contains attributes and methods which are necessary for the fusion of Gauss-Bells. More...

#include <GaussBell.h>

Collaboration diagram for GaussBell:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GaussBell ()
 Constructor.

 ~GaussBell ()
Matrix2x2< double > getCovarianceMatrix ()
 Returns the covariance matrix of the Gaussbell.

Vector2< double > getPositionOfMaximum ()
 Returns the position of the GaussBell-Maximum.

double getValidity (Vector2< double > _position)
 Returns the validity-value at the position given in the argument.

double getValidityAtPositionOfMaximum ()
 Returns the validity.

unsigned int getTimeStamp ()
 Returns the time stamp.

void getSigmas (double &sigmaMaj, double &sigmaMin)
 Returns the sigmas.

double getAngle ()
 Returns the angle.

void setCovarianceMatrix (double _validity, double _angle)
 Sets the covarianceMatrix by the percepts of a player.

void setCovarianceMatrix (double _validity, double _deltaX, double _deltaY)
 like the previous method aber faster!

void setCovarianceMatrix (Matrix2x2< double > _covarianceMatrix)
 Sets the covarianceMatrix by another Matrix.

void setCovarianceMatrix (double _sigmaMaj, double _sigmaMin, double _deltaX, double _deltaY)
 Sets the covariance-matrix (sigmas and validity will be correctly set, too).

void setPositionOfMaximum (Vector2< double > _positionOfMaximum)
 Sets the position of one object one robot has percepted.

void setRotationAngle (double _rotationAngle)
 Sets the rotation-angle and updates the covariance-matrix.

void setValidity (double _validity)
 validity = _validity Error-correction included

void setSigmas (double _sigmaMaj, double _sigmaMin)
 Sets the sigma-values and updates the covariance-matrix and the validity.

void setTimeStamp (unsigned long _timeStampGaussBell)
 timeStamp = _timeStampGaussBell

void setTimeStamp ()
 set the time stamp to the actual system time

void updateValidity (double _validity)
 if a older percept should be merged the validity has to be decreased

void mergeBells (GaussBell _gaussBell1, GaussBell _gaussBell2)
 merges the bells _gaussBell1 and _gaussBell2


Private Member Functions

void transformSigmaToValidity ()
 Calculates the validity from the sigma-values.

void transformValidityToSigma ()
 calculates sigmaMaj and sigmaMin when only the validity is given

void updateSigmasAndAngle ()
 calculates sigmaMaj, sigamMin and rotationAngle form the covariance matrix

void updateCovarianceMatrix ()
 calculates the CovarianceMatrix from sigmaMaj, sigmaMin and the rotationAngle


Private Attributes

Matrix2x2< double > covarianceMatrix
Vector2< double > position
double sigmaMaj
 variance in maj

double sigmaMin
 variance in min

double rotationAngle
double validity
 the validity of the percept

unsigned long timeStampGaussBell
 The time when this GaussBell was active.


Static Private Attributes

const int phi [330]
 phi-table of the normalized gauss distribution (index: factor 100, array: factor 10000)

const int invProb [1000]
 inverted probability table of the normalized gauss distribution (index: factor 1000, array: factor 100)

const double radiusMaj = 300
 radius in maj-direction of the validity-ellipse

const double radiusMin = 150
 radius in min-direction of the validity-ellipse

const double factor = 1.0/1.78

Detailed Description

This class contains attributes and methods which are necessary for the fusion of Gauss-Bells.

The percepts from differnt robots will be interpreted as values which defines special Gauss-Bells.

Author:
Kai Engel

Definition at line 23 of file GaussBell.h.


Constructor & Destructor Documentation

GaussBell::GaussBell  ) 
 

Constructor.

standard initialization

Definition at line 188 of file GaussBell.cpp.

References rotationAngle, setTimeStamp(), sigmaMaj, sigmaMin, validity, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

GaussBell::~GaussBell  ) 
 

Definition at line 202 of file GaussBell.cpp.


Member Function Documentation

Matrix2x2< double > GaussBell::getCovarianceMatrix  ) 
 

Returns the covariance matrix of the Gaussbell.

Definition at line 210 of file GaussBell.cpp.

References covarianceMatrix.

Vector2< double > GaussBell::getPositionOfMaximum  ) 
 

Returns the position of the GaussBell-Maximum.

Definition at line 219 of file GaussBell.cpp.

double GaussBell::getValidity Vector2< double >  _position  ) 
 

Returns the validity-value at the position given in the argument.

Definition at line 228 of file GaussBell.cpp.

References validity.

double GaussBell::getValidityAtPositionOfMaximum  ) 
 

Returns the validity.

Definition at line 237 of file GaussBell.cpp.

References validity.

unsigned int GaussBell::getTimeStamp  ) 
 

Returns the time stamp.

Definition at line 249 of file GaussBell.cpp.

References timeStampGaussBell.

Referenced by mergeBells().

void GaussBell::getSigmas double &  sigmaMaj,
double &  sigmaMin
 

Returns the sigmas.

Definition at line 480 of file GaussBell.cpp.

References sigmaMaj, and sigmaMin.

double GaussBell::getAngle  ) 
 

Returns the angle.

(angle between x-axis and major-axis of bell).

Definition at line 474 of file GaussBell.cpp.

References rotationAngle.

void GaussBell::setCovarianceMatrix double  _validity,
double  _angle
 

Sets the covarianceMatrix by the percepts of a player.

Definition at line 304 of file GaussBell.cpp.

References rotationAngle, transformValidityToSigma(), updateCovarianceMatrix(), and validity.

Here is the call graph for this function:

void GaussBell::setCovarianceMatrix double  _validity,
double  _deltaX,
double  _deltaY
 

like the previous method aber faster!

Definition at line 316 of file GaussBell.cpp.

References rotationAngle, sqr, transformValidityToSigma(), updateCovarianceMatrix(), and validity.

Here is the call graph for this function:

void GaussBell::setCovarianceMatrix Matrix2x2< double >  _covarianceMatrix  ) 
 

Sets the covarianceMatrix by another Matrix.

Definition at line 293 of file GaussBell.cpp.

References covarianceMatrix, transformSigmaToValidity(), and updateSigmasAndAngle().

Here is the call graph for this function:

void GaussBell::setCovarianceMatrix double  _sigmaMaj,
double  _sigmaMin,
double  _deltaX,
double  _deltaY
 

Sets the covariance-matrix (sigmas and validity will be correctly set, too).

Definition at line 339 of file GaussBell.cpp.

References rotationAngle, sigmaMaj, sigmaMin, sqr, transformSigmaToValidity(), and updateCovarianceMatrix().

Here is the call graph for this function:

void GaussBell::setPositionOfMaximum Vector2< double >  _positionOfMaximum  ) 
 

Sets the position of one object one robot has percepted.

Definition at line 361 of file GaussBell.cpp.

void GaussBell::setRotationAngle double  _rotationAngle  ) 
 

Sets the rotation-angle and updates the covariance-matrix.

Definition at line 370 of file GaussBell.cpp.

References rotationAngle, and updateCovarianceMatrix().

Here is the call graph for this function:

void GaussBell::setValidity double  _validity  ) 
 

validity = _validity Error-correction included

Definition at line 281 of file GaussBell.cpp.

References transformValidityToSigma(), updateCovarianceMatrix(), and validity.

Here is the call graph for this function:

void GaussBell::setSigmas double  _sigmaMaj,
double  _sigmaMin
 

Sets the sigma-values and updates the covariance-matrix and the validity.

Definition at line 398 of file GaussBell.cpp.

References sigmaMaj, sigmaMin, transformSigmaToValidity(), and updateCovarianceMatrix().

Here is the call graph for this function:

void GaussBell::setTimeStamp unsigned long  _timeStampGaussBell  ) 
 

timeStamp = _timeStampGaussBell

Definition at line 380 of file GaussBell.cpp.

References timeStampGaussBell.

void GaussBell::setTimeStamp  ) 
 

set the time stamp to the actual system time

Definition at line 389 of file GaussBell.cpp.

References SystemCall::getCurrentSystemTime(), and timeStampGaussBell.

Referenced by GaussBell().

Here is the call graph for this function:

void GaussBell::updateValidity double  _validity  ) 
 

if a older percept should be merged the validity has to be decreased

This will be used in SensorFusionBallLocator.

Definition at line 411 of file GaussBell.cpp.

References transformValidityToSigma(), updateCovarianceMatrix(), and validity.

Here is the call graph for this function:

void GaussBell::mergeBells GaussBell  _gaussBell1,
GaussBell  _gaussBell2
 

merges the bells _gaussBell1 and _gaussBell2

Result is a gauss-bell,

Definition at line 258 of file GaussBell.cpp.

References covarianceMatrix, SystemCall::getCurrentSystemTime(), getTimeStamp(), position, timeStampGaussBell, transformSigmaToValidity(), and updateSigmasAndAngle().

Here is the call graph for this function:

void GaussBell::transformSigmaToValidity  )  [private]
 

Calculates the validity from the sigma-values.

Definition at line 440 of file GaussBell.cpp.

References phi, radiusMaj, radiusMin, sigmaMaj, sigmaMin, and validity.

Referenced by mergeBells(), setCovarianceMatrix(), and setSigmas().

void GaussBell::transformValidityToSigma  )  [private]
 

calculates sigmaMaj and sigmaMin when only the validity is given

Definition at line 425 of file GaussBell.cpp.

References factor, invProb, radiusMaj, radiusMin, sigmaMaj, sigmaMin, and validity.

Referenced by setCovarianceMatrix(), setValidity(), and updateValidity().

void GaussBell::updateSigmasAndAngle  )  [private]
 

calculates sigmaMaj, sigamMin and rotationAngle form the covariance matrix

Definition at line 512 of file GaussBell.cpp.

References Matrix2x2< V >::c, Matrix2x2< double >::c, covarianceMatrix, pi_4, rotationAngle, sigmaMaj, sigmaMin, Matrix2x2< V >::transpose(), Vector2< double >::x, and Vector2< double >::y.

Referenced by mergeBells(), and setCovarianceMatrix().

Here is the call graph for this function:

void GaussBell::updateCovarianceMatrix  )  [private]
 

calculates the CovarianceMatrix from sigmaMaj, sigmaMin and the rotationAngle

Definition at line 489 of file GaussBell.cpp.

References Matrix2x2< double >::c, Matrix2x2< V >::c, covarianceMatrix, rotationAngle, sigmaMaj, sigmaMin, Matrix2x2< V >::transpose(), Vector2< double >::x, and Vector2< double >::y.

Referenced by setCovarianceMatrix(), setRotationAngle(), setSigmas(), setValidity(), and updateValidity().

Here is the call graph for this function:


Member Data Documentation

Matrix2x2<double> GaussBell::covarianceMatrix [private]
 

Definition at line 70 of file GaussBell.h.

Referenced by getCovarianceMatrix(), mergeBells(), setCovarianceMatrix(), updateCovarianceMatrix(), and updateSigmasAndAngle().

Vector2<double> GaussBell::position [private]
 

Definition at line 71 of file GaussBell.h.

Referenced by mergeBells().

double GaussBell::sigmaMaj [private]
 

variance in maj

direction

Definition at line 73 of file GaussBell.h.

Referenced by GaussBell(), getSigmas(), setCovarianceMatrix(), setSigmas(), transformSigmaToValidity(), transformValidityToSigma(), updateCovarianceMatrix(), and updateSigmasAndAngle().

double GaussBell::sigmaMin [private]
 

variance in min

direction direction

Definition at line 73 of file GaussBell.h.

Referenced by GaussBell(), getSigmas(), setCovarianceMatrix(), setSigmas(), transformSigmaToValidity(), transformValidityToSigma(), updateCovarianceMatrix(), and updateSigmasAndAngle().

double GaussBell::rotationAngle [private]
 

Definition at line 75 of file GaussBell.h.

Referenced by GaussBell(), getAngle(), setCovarianceMatrix(), setRotationAngle(), updateCovarianceMatrix(), and updateSigmasAndAngle().

double GaussBell::validity [private]
 

the validity of the percept

Definition at line 76 of file GaussBell.h.

Referenced by GaussBell(), getValidity(), getValidityAtPositionOfMaximum(), setCovarianceMatrix(), setValidity(), transformSigmaToValidity(), transformValidityToSigma(), and updateValidity().

const int GaussBell::phi [static, private]
 

phi-table of the normalized gauss distribution (index: factor 100, array: factor 10000)

Definition at line 18 of file GaussBell.cpp.

Referenced by transformSigmaToValidity().

const int GaussBell::invProb [static, private]
 

inverted probability table of the normalized gauss distribution (index: factor 1000, array: factor 100)

Definition at line 59 of file GaussBell.cpp.

Referenced by transformValidityToSigma().

const double GaussBell::radiusMaj = 300 [static, private]
 

radius in maj-direction of the validity-ellipse

the validity is the probability that the real position lies within this ellipe

Definition at line 183 of file GaussBell.cpp.

Referenced by transformSigmaToValidity(), and transformValidityToSigma().

const double GaussBell::radiusMin = 150 [static, private]
 

radius in min-direction of the validity-ellipse

Definition at line 184 of file GaussBell.cpp.

Referenced by transformSigmaToValidity(), and transformValidityToSigma().

const double GaussBell::factor = 1.0/1.78 [static, private]
 

Definition at line 16 of file GaussBell.cpp.

Referenced by transformValidityToSigma().

unsigned long GaussBell::timeStampGaussBell [private]
 

The time when this GaussBell was active.

This attribut will be needed for merging history-Data into the fusion.

Definition at line 89 of file GaussBell.h.

Referenced by getTimeStamp(), mergeBells(), and setTimeStamp().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:06:24 2004 for GT2004 by doxygen 1.3.6