GCOP
1.0
|
00001 #ifndef GCOP_CORRECTOR_H 00002 #define GCOP_CORRECTOR_H 00003 00004 #include "sensor.h" 00005 #include "manifold.h" 00006 00007 namespace gcop { 00008 00009 template <typename T = VectorXd, 00010 int _nx = Dynamic, 00011 int _nu = Dynamic, 00012 int _np = Dynamic, 00013 typename Tz = VectorXd, 00014 int _nz = Dynamic> class Corrector { 00015 public: 00016 00017 typedef Matrix<double, _nx, 1> Vectornd; 00018 typedef Matrix<double, _nu, 1> Vectorcd; 00019 typedef Matrix<double, _np, 1> Vectormd; 00020 00021 typedef Matrix<double, _nx, _nx> Matrixnd; 00022 typedef Matrix<double, _nx, _nu> Matrixncd; 00023 typedef Matrix<double, _nu, _nx> Matrixcnd; 00024 typedef Matrix<double, _nu, _nu> Matrixcd; 00025 00026 typedef Matrix<double, _np, _np> Matrixmd; 00027 typedef Matrix<double, _nx, _np> Matrixnmd; 00028 typedef Matrix<double, _np, _nx> Matrixmnd; 00029 00030 00036 Corrector(Manifold<T, _nx> &X, 00037 Sensor<T, _nx, _nu, _np, Tz, _nz> &sensor); 00038 00039 virtual ~Corrector(); 00040 00052 virtual bool Correct(T& xb, double t, const T &xa, 00053 const Vectorcd &u, const Tz &z, 00054 const Vectormd *p = 0, bool cov = true) = 0; 00055 00056 Manifold<T, _nx> &X; 00057 Sensor<T, _nx, _nu, _np, Tz, _nz> &sensor; 00058 00059 }; 00060 00061 00062 template <typename T, int _nx, int _nu, int _np, typename Tz, int _nz> 00063 Corrector<T, _nx, _nu, _np, Tz, _nz>::Corrector( Manifold<T, _nx> &X, 00064 Sensor<T, _nx, _nu, _np, Tz, _nz> &sensor) : 00065 X(X), sensor(sensor) { 00066 } 00067 00068 template <typename T, int _nx, int _nu, int _np, typename Tz, int _nz> 00069 Corrector<T, _nx, _nu, _np, Tz, _nz>::~Corrector() { 00070 } 00071 00072 } 00073 00074 00075 #endif