Index: trunk/lib/FlairFilter/src/ButterworthLowPass.cpp
===================================================================
--- trunk/lib/FlairFilter/src/ButterworthLowPass.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/ButterworthLowPass.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "ButterworthLowPass.h"
 #include "ButterworthLowPass_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
@@ -48,5 +48,5 @@
 ButterworthLowPass::~ButterworthLowPass() { delete pimpl_; }
 
-cvmatrix *ButterworthLowPass::Matrix(void) const { return pimpl_->output; }
+Matrix *ButterworthLowPass::GetMatrix(void) const { return pimpl_->output; }
 
 float ButterworthLowPass::Output(void) const {
Index: trunk/lib/FlairFilter/src/ButterworthLowPass.h
===================================================================
--- trunk/lib/FlairFilter/src/ButterworthLowPass.h	(revision 206)
+++ trunk/lib/FlairFilter/src/ButterworthLowPass.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -91,5 +91,5 @@
   * \return filtered output
   */
-  core::cvmatrix *Matrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
   /*!
Index: trunk/lib/FlairFilter/src/ButterworthLowPass_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/ButterworthLowPass_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/ButterworthLowPass_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "ButterworthLowPass_impl.h"
 #include "ButterworthLowPass.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -29,5 +29,5 @@
 using namespace flair::filter;
 
-ButterworthLowPass_impl::ButterworthLowPass_impl(ButterworthLowPass *self,
+ButterworthLowPass_impl::ButterworthLowPass_impl(const ButterworthLowPass *self,
                                                  const LayoutPosition *position,
                                                  string name, uint32_t order,uint32_t nbRow,uint32_t nbCol) {
@@ -41,5 +41,5 @@
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(nbRow, nbCol);
   //desc->SetElementName(0, 0, "output");
-  output = new cvmatrix(self, desc, floatType, name);
+  output = new Matrix(self, desc, floatType, name);
   delete desc;
 
@@ -60,4 +60,5 @@
   this->nbRow=nbRow;
   this->nbCol=nbCol;
+  this->self=self;
 }
 
@@ -72,6 +73,11 @@
 
 void ButterworthLowPass_impl::UpdateFrom(const io_data *data) {
-  cvmatrix *input = (cvmatrix *)data;
   float delta_t;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
   
   if (T->ValueChanged() && T->Value() != 0) {
Index: trunk/lib/FlairFilter/src/ControlLaw.cpp
===================================================================
--- trunk/lib/FlairFilter/src/ControlLaw.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/ControlLaw.cpp	(revision 214)
@@ -17,5 +17,5 @@
 
 #include "ControlLaw.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <cvmatrix_descriptor.h>
 #include <DataPlot1D.h>
@@ -32,5 +32,5 @@
     : IODevice(parent, name) {
   if (nb_out == 1) {
-    output = new cvmatrix(this, nb_out, 1, floatType, name);
+    output = new Matrix(this, nb_out, 1, floatType, name);
   } else {
     cvmatrix_descriptor *desc = new cvmatrix_descriptor(nb_out, 1);
@@ -40,5 +40,5 @@
       desc->SetElementName(i, 0, ss.str());
     }
-    output = new cvmatrix(this, desc, floatType, name);
+    output = new Matrix(this, desc, floatType, name);
     delete desc;
   }
Index: trunk/lib/FlairFilter/src/ControlLaw.h
===================================================================
--- trunk/lib/FlairFilter/src/ControlLaw.h	(revision 206)
+++ trunk/lib/FlairFilter/src/ControlLaw.h	(revision 214)
@@ -21,5 +21,5 @@
 }
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 }
@@ -100,5 +100,5 @@
   *
   */
-  core::cvmatrix *input;
+  core::Matrix *input;
 
   /*!
@@ -109,5 +109,5 @@
   *
   */
-  core::cvmatrix *output;
+  core::Matrix *output;
 
 private:
Index: trunk/lib/FlairFilter/src/EulerDerivative.cpp
===================================================================
--- trunk/lib/FlairFilter/src/EulerDerivative.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/EulerDerivative.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "EulerDerivative.h"
 #include "EulerDerivative_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <LayoutPosition.h>
 
@@ -30,5 +30,5 @@
 EulerDerivative::EulerDerivative(const IODevice *parent,
                                  const LayoutPosition *position, string name,
-                                 const cvmatrix *init_value)
+                                 const Matrix *init_value)
     : IODevice(parent, name) {
   pimpl_ = new EulerDerivative_impl(this, position, name, init_value);
@@ -40,5 +40,5 @@
 EulerDerivative::~EulerDerivative() { delete pimpl_; }
 
-cvmatrix *EulerDerivative::Matrix(void) const { return pimpl_->output; }
+Matrix *EulerDerivative::GetMatrix(void) const { return pimpl_->output; }
 
 float EulerDerivative::Output(int row, int col) const {
Index: trunk/lib/FlairFilter/src/EulerDerivative.h
===================================================================
--- trunk/lib/FlairFilter/src/EulerDerivative.h	(revision 206)
+++ trunk/lib/FlairFilter/src/EulerDerivative.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -56,5 +56,5 @@
   EulerDerivative(const core::IODevice *parent,
                   const gui::LayoutPosition *position, std::string name,
-                  const core::cvmatrix *init_value = NULL);
+                  const core::Matrix *init_value = NULL);
 
   /*!
@@ -79,5 +79,5 @@
   * \return filtered output
   */
-  core::cvmatrix *Matrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
 private:
Index: trunk/lib/FlairFilter/src/EulerDerivative_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/EulerDerivative_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/EulerDerivative_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "EulerDerivative.h"
 #include "EulerDerivative_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -31,6 +31,7 @@
                                            const LayoutPosition *position,
                                            string name,
-                                           const cvmatrix *init_value) {
+                                           const Matrix *init_value) {
   first_update = true;
+  this->self = self;
   
   if (init_value != NULL) {
@@ -43,5 +44,5 @@
       }
     }
-    output = new cvmatrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
+    output = new Matrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
     delete desc;
     for (int i = 0; i < init_value->Rows(); i++) {
@@ -54,5 +55,5 @@
     cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     desc->SetElementName(0, 0, "output");
-    output = new cvmatrix(self, desc, floatType, name);
+    output = new Matrix(self, desc, floatType, name);
     delete desc;
   }
@@ -60,5 +61,5 @@
  
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(output->Rows(), output->Cols());
-  prev_value = new cvmatrix(self, desc, output->GetDataType().GetElementDataType(), name);
+  prev_value = new Matrix(self, desc, output->GetDataType().GetElementDataType(), name);
 
 
@@ -73,5 +74,10 @@
 void EulerDerivative_impl::UpdateFrom(const io_data *data) {
   float delta_t;
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   // on prend une fois pour toute les mutex et on fait des accès directs
Index: trunk/lib/FlairFilter/src/JoyReference.cpp
===================================================================
--- trunk/lib/FlairFilter/src/JoyReference.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/JoyReference.cpp	(revision 214)
@@ -20,5 +20,5 @@
 #include <Layout.h>
 #include <LayoutPosition.h>
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <AhrsData.h>
 #include <Euler.h>
Index: trunk/lib/FlairFilter/src/JoyReference_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/JoyReference_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/JoyReference_impl.cpp	(revision 214)
@@ -20,5 +20,5 @@
 #include <AhrsData.h>
 #include <Euler.h>
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -40,5 +40,5 @@
 
   ahrsData = new AhrsData(self);
-  input = new cvmatrix(self, 4, 1, floatType, name);
+  input = new Matrix(self, 4, 1, floatType, name);
 
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);
@@ -48,5 +48,5 @@
   desc->SetElementName(2, 0, "trim_roll");
   desc->SetElementName(3, 0, "trim_pitch");
-  output = new cvmatrix(self, desc, floatType, name);
+  output = new Matrix(self, desc, floatType, name);
   delete desc;
 
@@ -147,5 +147,10 @@
 
 void JoyReference_impl::UpdateFrom(const io_data *data) {
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   if (previous_time == 0)
Index: trunk/lib/FlairFilter/src/LowPassFilter.cpp
===================================================================
--- trunk/lib/FlairFilter/src/LowPassFilter.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/LowPassFilter.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "LowPassFilter.h"
 #include "LowPassFilter_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <LayoutPosition.h>
 
@@ -30,5 +30,5 @@
 LowPassFilter::LowPassFilter(const IODevice *parent,
                              const LayoutPosition *position, string name,
-                             const cvmatrix *init_value)
+                             const Matrix *init_value)
     : IODevice(parent, name) {
   pimpl_ = new LowPassFilter_impl(this, position, name, init_value);
@@ -40,5 +40,5 @@
 LowPassFilter::~LowPassFilter() { delete pimpl_; }
 
-cvmatrix *LowPassFilter::Matrix(void) const { return pimpl_->output; }
+Matrix *LowPassFilter::GetMatrix(void) const { return pimpl_->output; }
 
 float LowPassFilter::Output(int row, int col) const {
Index: trunk/lib/FlairFilter/src/LowPassFilter.h
===================================================================
--- trunk/lib/FlairFilter/src/LowPassFilter.h	(revision 206)
+++ trunk/lib/FlairFilter/src/LowPassFilter.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -56,5 +56,5 @@
   LowPassFilter(const core::IODevice *parent,
                 const gui::LayoutPosition *position, std::string name,
-                const core::cvmatrix *init_value = NULL);
+                const core::Matrix *init_value = NULL);
 
   /*!
@@ -79,5 +79,5 @@
   * \return filtered output
   */
-  core::cvmatrix *Matrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
 private:
Index: trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp	(revision 214)
@@ -18,10 +18,10 @@
 #include "LowPassFilter_impl.h"
 #include "LowPassFilter.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
 #include <SpinBox.h>
 #include <DoubleSpinBox.h>
-
+#include <typeinfo>
 #define PI ((float)3.14159265358979323846)
 
@@ -34,5 +34,5 @@
                                        const LayoutPosition *position,
                                        string name,
-                                       const cvmatrix *init_value) {
+                                       const Matrix *init_value) {
 
   if (init_value != NULL) {
@@ -45,5 +45,5 @@
       }
     }
-    output = new cvmatrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
+    output = new Matrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
     for (int i = 0; i < init_value->Rows(); i++) {
       for (int j = 0; j < init_value->Cols(); j++) {
@@ -56,5 +56,5 @@
     cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
     desc->SetElementName(0, 0, "output");
-    output = new cvmatrix(self, desc, floatType, name);
+    output = new Matrix(self, desc, floatType, name);
     delete desc;
   }
@@ -68,4 +68,5 @@
                            
   previous_time=GetTime();
+  this->self = self;
 }
 
@@ -74,5 +75,10 @@
 void LowPassFilter_impl::UpdateFrom(const io_data *data) {
   float delta_t;
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   // on prend une fois pour toute les mutex et on fait des accès directs
Index: trunk/lib/FlairFilter/src/NestedSat.cpp
===================================================================
--- trunk/lib/FlairFilter/src/NestedSat.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/NestedSat.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "NestedSat.h"
 #include "NestedSat_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
Index: trunk/lib/FlairFilter/src/NestedSat_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/NestedSat_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/NestedSat_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "NestedSat_impl.h"
 #include "NestedSat.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -34,5 +34,5 @@
 
   // init matrix
-  self->input = new cvmatrix(self, 3, 1, floatType, name);
+  self->input = new Matrix(self, 3, 1, floatType, name);
 
   GroupBox *reglages_groupbox = new GroupBox(position, name);
@@ -50,5 +50,10 @@
 void NestedSat_impl::UpdateFrom(const io_data *data) {
   float cons, dcons, law;
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   input->GetMutex();
Index: trunk/lib/FlairFilter/src/Pid.cpp
===================================================================
--- trunk/lib/FlairFilter/src/Pid.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/Pid.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "Pid.h"
 #include "Pid_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
Index: trunk/lib/FlairFilter/src/PidThrust.cpp
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "PidThrust.h"
 #include "PidThrust_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
Index: trunk/lib/FlairFilter/src/PidThrust_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/PidThrust_impl.cpp	(revision 214)
@@ -17,5 +17,5 @@
 #include "PidThrust_impl.h"
 #include "PidThrust.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -36,5 +36,5 @@
 
   // init matrix
-  self->input = new cvmatrix(self, 2, 1, floatType, name);
+  self->input = new Matrix(self, 2, 1, floatType, name);
 
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(5, 1);
@@ -44,5 +44,5 @@
   desc->SetElementName(3, 0, "p+i+d");
   desc->SetElementName(4, 0, "p+i+d+offset");
-  state = new cvmatrix(self, desc, floatType, name);
+  state = new Matrix(self, desc, floatType, name);
   delete desc;
 
@@ -76,5 +76,10 @@
   float p, d, total;
   float delta_t;
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   if (T->Value() == 0) {
Index: trunk/lib/FlairFilter/src/Pid_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/Pid_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/Pid_impl.cpp	(revision 214)
@@ -17,5 +17,5 @@
 #include "Pid_impl.h"
 #include "Pid.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -34,5 +34,5 @@
 
   // init matrix
-  self->input = new cvmatrix(self, 2, 1, floatType, name);
+  self->input = new Matrix(self, 2, 1, floatType, name);
 
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 1);
@@ -41,5 +41,5 @@
   desc->SetElementName(2, 0, "d");
   desc->SetElementName(3, 0, "p+i+d");
-  state = new cvmatrix(self, desc, floatType, name);
+  state = new Matrix(self, desc, floatType, name);
   delete desc;
 
@@ -71,5 +71,10 @@
   float p, d, total;
   float delta_t;
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   if (T->Value() == 0) {
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator1D.cpp
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator1D.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator1D.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "TrajectoryGenerator1D.h"
 #include "TrajectoryGenerator1D_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
@@ -39,5 +39,5 @@
 TrajectoryGenerator1D::~TrajectoryGenerator1D() { delete pimpl_; }
 
-cvmatrix *TrajectoryGenerator1D::Matrix(void) const { return pimpl_->output; }
+Matrix *TrajectoryGenerator1D::GetMatrix(void) const { return pimpl_->output; }
 
 void TrajectoryGenerator1D::StartTraj(float startPosition, float endPosition,float startVelocity) {
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator1D.h
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator1D.h	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator1D.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -152,5 +152,5 @@
   * \return matrix
   */
-  core::cvmatrix *Matrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
 private:
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "TrajectoryGenerator1D.h"
 #include "TrajectoryGenerator1D_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -63,5 +63,5 @@
   desc->SetElementName(0, 0, "pos");
   desc->SetElementName(1, 0, "vel");
-  output = new cvmatrix(self, desc, floatType, name);
+  output = new Matrix(self, desc, floatType, name);
   delete desc;
 
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.cpp
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "TrajectoryGenerator2DCircle.h"
 #include "TrajectoryGenerator2DCircle_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <LayoutPosition.h>
@@ -44,5 +44,5 @@
 }
 
-cvmatrix *TrajectoryGenerator2DCircle::Matrix(void) const {
+Matrix *TrajectoryGenerator2DCircle::GetMatrix(void) const {
   return pimpl_->output;
 }
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.h
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.h	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.h	(revision 214)
@@ -19,5 +19,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -131,5 +131,5 @@
   * \return matrix
   */
-  core::cvmatrix *Matrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
   /*!
Index: trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "TrajectoryGenerator2DCircle_impl.h"
 #include "TrajectoryGenerator2DCircle.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Layout.h>
 #include <GroupBox.h>
@@ -56,5 +56,5 @@
   desc->SetElementName(1, 0, "vel.x");
   desc->SetElementName(1, 1, "vel.y");
-  output = new cvmatrix(self, desc, floatType, name);
+  output = new Matrix(self, desc, floatType, name);
   delete desc;
 }
Index: trunk/lib/FlairFilter/src/UavMultiplex.cpp
===================================================================
--- trunk/lib/FlairFilter/src/UavMultiplex.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/UavMultiplex.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "UavMultiplex.h"
 #include "UavMultiplex_impl.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <FrameworkManager.h>
 #include <Tab.h>
Index: trunk/lib/FlairFilter/src/UavMultiplex_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/UavMultiplex_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/UavMultiplex_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "UavMultiplex_impl.h"
 #include "UavMultiplex.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <FrameworkManager.h>
 #include <TabWidget.h>
@@ -34,5 +34,5 @@
 
 UavMultiplex_impl::UavMultiplex_impl(UavMultiplex *self, std::string name) {
-  input = new cvmatrix(self, 7, 1, floatType);
+  input = new Matrix(self, 7, 1, floatType);
   multiplexcombobox = NULL;
   this->self = self;
Index: trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp
===================================================================
--- trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp	(revision 206)
+++ trunk/lib/FlairFilter/src/X4X8Multiplex_impl.cpp	(revision 214)
@@ -18,5 +18,5 @@
 #include "X4X8Multiplex_impl.h"
 #include "X4X8Multiplex.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <Tab.h>
 #include <GridLayout.h>
@@ -55,5 +55,5 @@
   }
 
-  output = new cvmatrix(self, desc, floatType);
+  output = new Matrix(self, desc, floatType);
   delete desc;
   self->AddDataToLog(output);
@@ -83,5 +83,10 @@
   float value[MAX_MOTORS];
 
-  cvmatrix *input = (cvmatrix *)data;
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   // on prend une fois pour toute le mutex et on fait des accès directs
Index: trunk/lib/FlairFilter/src/unexported/ButterworthLowPass_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/ButterworthLowPass_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/ButterworthLowPass_impl.h	(revision 214)
@@ -19,5 +19,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -120,10 +120,10 @@
 class ButterworthLowPass_impl {
 public:
-  ButterworthLowPass_impl(flair::filter::ButterworthLowPass *self,
+  ButterworthLowPass_impl(const flair::filter::ButterworthLowPass *self,
                           const flair::gui::LayoutPosition *position,
                           std::string name, uint32_t order,uint32_t nbRow,uint32_t nbCol);
   ~ButterworthLowPass_impl();
   void UpdateFrom(const flair::core::io_data *data);
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
 
 private:
@@ -135,4 +135,5 @@
   uint32_t order;
   uint32_t nbRow, nbCol;
+  const flair::filter::ButterworthLowPass *self;
 };
 
Index: trunk/lib/FlairFilter/src/unexported/EulerDerivative_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/EulerDerivative_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/EulerDerivative_impl.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -38,8 +38,8 @@
                        const flair::gui::LayoutPosition *position,
                        std::string name,
-                       const flair::core::cvmatrix *init_value = NULL);
+                       const flair::core::Matrix *init_value = NULL);
   ~EulerDerivative_impl();
   void UpdateFrom(const flair::core::io_data *data);
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
 
 private:
@@ -47,5 +47,6 @@
   flair::core::Time previous_time;
   bool first_update;
-  flair::core::cvmatrix *prev_value;
+  flair::core::Matrix *prev_value;
+  flair::filter::EulerDerivative *self;
 };
 
Index: trunk/lib/FlairFilter/src/unexported/JoyReference_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/JoyReference_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/JoyReference_impl.h	(revision 214)
@@ -25,5 +25,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 class io_data;
 class AhrsData;
@@ -65,9 +65,9 @@
   void Update(flair::core::Time time);
   void UpdateFrom(const flair::core::io_data *data);
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
   flair::core::AhrsData *ahrsData;
 
 private:
-  flair::core::cvmatrix *input;
+  flair::core::Matrix *input;
 
   flair::gui::GroupBox *reglages_groupbox;
Index: trunk/lib/FlairFilter/src/unexported/LowPassFilter_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/LowPassFilter_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/LowPassFilter_impl.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -36,12 +36,13 @@
                      const flair::gui::LayoutPosition *position,
                      std::string name,
-                     const flair::core::cvmatrix *init_value = NULL);
+                     const flair::core::Matrix *init_value = NULL);
   ~LowPassFilter_impl();
   void UpdateFrom(const flair::core::io_data *data);
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
 
 private:
   flair::core::Time previous_time;
   flair::gui::DoubleSpinBox *freq, *T;
+  const flair::filter::LowPassFilter *self;
 };
 
Index: trunk/lib/FlairFilter/src/unexported/PidThrust_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/PidThrust_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/PidThrust_impl.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 class io_data;
 }
@@ -50,5 +50,5 @@
 
   // matrix
-  flair::core::cvmatrix *state;
+  flair::core::Matrix *state;
 
   flair::gui::DoubleSpinBox *T, *kp, *ki, *kd, *sat, *sati;
Index: trunk/lib/FlairFilter/src/unexported/Pid_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/Pid_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/Pid_impl.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 class io_data;
 }
@@ -49,5 +49,5 @@
 
   // matrix
-  flair::core::cvmatrix *state;
+  flair::core::Matrix *state;
 
   flair::gui::DoubleSpinBox *T, *kp, *ki, *kd, *sat, *sati;
Index: trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator1D_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator1D_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator1D_impl.h	(revision 214)
@@ -16,5 +16,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -39,5 +39,5 @@
   void Reset(void);
   float GetPercentageOfCompletion(void) const;
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
   float pos_off, vel_off;
   bool is_finished, is_started;
Index: trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator2DCircle_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator2DCircle_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator2DCircle_impl.h	(revision 214)
@@ -19,5 +19,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 class io_data;
 }
@@ -46,5 +46,5 @@
   void FinishTraj(void);
   bool is_running;
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
   flair::core::Vector2Df pos_off, vel_off;
 
Index: trunk/lib/FlairFilter/src/unexported/UavMultiplex_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/UavMultiplex_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/UavMultiplex_impl.h	(revision 214)
@@ -20,5 +20,5 @@
 namespace core {
 class FrameworkManager;
-class cvmatrix;
+class Matrix;
 class io_data;
 }
@@ -56,5 +56,5 @@
   ~UavMultiplex_impl();
 
-  flair::core::cvmatrix *input;
+  flair::core::Matrix *input;
   void SetMultiplexComboBox(std::string name, int index);
   int MultiplexValue(int index) const;
Index: trunk/lib/FlairFilter/src/unexported/X4X8Multiplex_impl.h
===================================================================
--- trunk/lib/FlairFilter/src/unexported/X4X8Multiplex_impl.h	(revision 206)
+++ trunk/lib/FlairFilter/src/unexported/X4X8Multiplex_impl.h	(revision 214)
@@ -18,5 +18,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 class io_data;
 }
@@ -44,5 +44,5 @@
 
 private:
-  flair::core::cvmatrix *output;
+  flair::core::Matrix *output;
   flair::gui::ComboBox *pas;
   flair::gui::DataPlot1D *plots[4];
