Specialisation of covariance ellipsoids in two dimensions. More...
#include <covariance_ellipsoid.hpp>
Public Member Functions  
const ecl::linear_algebra::Matrix2d &  axes () 
Returns the ellipse axes/covariance eigen vectors. More...  
void  compute (const ecl::linear_algebra::Matrix2d &M) 
Computes the covariance ellipsoid for the specified matrix. More...  
CovarianceEllipsoid ()  
Default constructor, use with compute(). More...  
CovarianceEllipsoid (const ecl::linear_algebra::Matrix2d &M)  
Automatically generates ellipsoid information at construction. More...  
ecl::linear_algebra::Vector2d  intercepts () 
Specifies the intercepts of the ellipse with the cartesian axes. More...  
const ecl::linear_algebra::Vector2d &  lengths () 
Returns the precomputed ellipsoid minor/major axis lengths. More...  
double  rotation () 
Calculates the rotation of the ellipse. More...  
virtual  ~CovarianceEllipsoid () 
Private Attributes  
ecl::linear_algebra::Matrix2d  ellipse_axes 
ecl::linear_algebra::Vector2d  ellipse_lengths 
Specialisation of covariance ellipsoids in two dimensions.
This creates ellipsoids for 2x2 covariance matrices, i.e. the usual sort for mobile robot navigation. It uses lovely dirty cstyle code to work out the underlying eigen properties rather than Eigen's solver  tends to be a bit faster in only two dimensions.
Usage:
This class is also more conveniently typedef'd as CovarianceEllipsoid2d.
You can either instantiate directly through the constructor or by hand via the compute() method. Recomputing is also possible without having to construct an entirely new instance.
Once generated, the ellipse properties can easily be extracted.
There are a couple more methods that can be accessed for more detailed information about the ellipse, but the above two are usually sufficient for drawing your own ellipses.
Definition at line 320 of file covariance_ellipsoid.hpp.
ecl::CovarianceEllipsoid< double, 2 >::CovarianceEllipsoid  (  ) 
Default constructor, use with compute().
This constructor does not do anything  you must use it together with the compute() function. Sometimes useful when using this class with containers.
Definition at line 134 of file covariance_ellipsoid.cpp.
ecl::CovarianceEllipsoid< double, 2 >::CovarianceEllipsoid  (  const ecl::linear_algebra::Matrix2d &  M  ) 
Automatically generates ellipsoid information at construction.
Using the specified input covariance matrix, this constructor automatically generates (indirectly calls compute()) the full ellipse information, making it instantly ready for use.
M  : the input covariance matrix (must be symmetric positive definite). 
Definition at line 139 of file covariance_ellipsoid.cpp.

inlinevirtual 
Definition at line 341 of file covariance_ellipsoid.hpp.

inline 
Returns the ellipse axes/covariance eigen vectors.
This returns the ellipse axes (aka covariance eigen vectors) as columns of a matrix.
Definition at line 369 of file covariance_ellipsoid.hpp.
void ecl::CovarianceEllipsoid< double, 2 >::compute  (  const ecl::linear_algebra::Matrix2d &  M  ) 
Computes the covariance ellipsoid for the specified matrix.
This can either be called indirectly via the constructor or directly via this function. In either case, it resets the object and generates/computes the resulting ellipse from the specified input covariance matrix.
M  : the input covariance matrix (must be symmetric positive definite). 
Definition at line 142 of file covariance_ellipsoid.cpp.
Vector2d ecl::CovarianceEllipsoid< double, 2 >::intercepts  (  ) 
Specifies the intercepts of the ellipse with the cartesian axes.
This determines the distance from the origin to the ellipse boundary in the directions of the usual cartesian axes. Note that the intercepts here are given as a two dimensional vector and this is not the (x,y) pair of an intercept itself.
Rather this is both the x and y magnitudes for which the full set of four intercepts can be generated. These magnitudes are the distances from the centre of the ellipse to the boundary of the ellipse in both the x and y directions.
Definition at line 194 of file covariance_ellipsoid.cpp.

inline 
Returns the precomputed ellipsoid minor/major axis lengths.
Returns the precomputed ellipsoid minor/major axis lengths.
Definition at line 361 of file covariance_ellipsoid.hpp.
double ecl::CovarianceEllipsoid< double, 2 >::rotation  (  ) 
Calculates the rotation of the ellipse.
This determines the angle between the x axis and the major axis of the ellipse.
Definition at line 190 of file covariance_ellipsoid.cpp.

private 
Definition at line 401 of file covariance_ellipsoid.hpp.

private 
Definition at line 400 of file covariance_ellipsoid.hpp.