pose_ekf
FaultDetection.hpp
Go to the documentation of this file.
1 
2 #ifndef FaultDetection_HPP
3 #define FaultDetection_HPP
4 #include <Eigen/Core>
5 #include <Eigen/Geometry>
6 //#include <iostream>
7 namespace pose_ekf{
8 
9 
10 class ChiSquared
11 {
12  public:
13 
17  template <unsigned int DEGREE_OF_FREEDOM>
18  bool rejectData(Eigen::Matrix< double, DEGREE_OF_FREEDOM, 1 > innovation,
19  Eigen::Matrix< double, DEGREE_OF_FREEDOM, DEGREE_OF_FREEDOM > innovation_covariance,
20  float threshold)
21  {
22 
23  // std::cout << " CHI " << (innovation.transpose() * innovation_covariance * innovation)[0] << std::endl;
24  if ( (innovation.transpose() * innovation_covariance * innovation)[0] <= threshold )
25  return false;
26  else
27  return true;
28 
29 
30  }
31 
32 };
33 
34 }
35 #endif
Definition: EKFPosYawBiasT.hpp:11
Definition: FaultDetection.hpp:10
bool rejectData(Eigen::Matrix< double, DEGREE_OF_FREEDOM, 1 > innovation, Eigen::Matrix< double, DEGREE_OF_FREEDOM, DEGREE_OF_FREEDOM > innovation_covariance, float threshold)
Definition: FaultDetection.hpp:18