Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml	(revision 200)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml	(revision 214)
@@ -27,5 +27,5 @@
     <DoubleSpinBox value="0.006" name="j_pitch:"/>
     <DoubleSpinBox value="0.1" name="j_yaw:"/>
-   </Tab>
+   <SpinBox name="motor timeout:" value="100"/></Tab>
    <Tab name="us">
     <GroupBox name="position">
@@ -40,5 +40,5 @@
     </GroupBox>
     <DoubleSpinBox value="6" name="range:"/>
-   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.0400000000000000"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab>
    <Tab name="bottom camera">
     <GroupBox name="position">
Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml	(revision 200)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml	(revision 214)
@@ -16,5 +16,5 @@
     <DoubleSpinBox value="-1.2" name="z:"/>
     <SpinBox value="90" name="yaw (deg):"/>
-   <Vector3DSpinBox name="position" value_x="-1.50" value_y="0.00" value_z="-1.00"/></Tab>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab>
    <Tab name="model">
     <DoubleSpinBox value="1.6" name="mass (kg):"/>
@@ -31,5 +31,5 @@
     <DoubleSpinBox value="0.72" name="sigma:"/>
     <DoubleSpinBox value="1" name="S:"/>
-   </Tab>
+   <SpinBox name="motor timeout:" value="100"/></Tab>
    <Tab name="us">
     <GroupBox name="position">
@@ -44,5 +44,5 @@
     </GroupBox>
     <DoubleSpinBox value="6" name="range:"/>
-   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></Tab>
    <Tab name="bottom camera">
     <GroupBox name="position">
@@ -96,5 +96,5 @@
     <DoubleSpinBox value="0" name="z:"/>
     <SpinBox value="90" name="yaw (deg):"/>
-   <Vector3DSpinBox name="position" value_x="-1.50" value_y="1.00" value_z="0.00"/></Tab>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="1" value_z="0"/></Tab>
    <Tab name="model">
     <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
Index: trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
===================================================================
--- trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 200)
+++ trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 214)
@@ -24,4 +24,5 @@
 #include <MetaVrpnObject.h>
 #include <TrajectoryGenerator2DCircle.h>
+#include <Matrix.h>
 #include <cvmatrix.h>
 #include <cmath>
@@ -61,9 +62,9 @@
 
     circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle");
-    uavVrpn->xPlot()->AddCurve(circle->Matrix()->Element(0,0),DataPlot::Blue);
-    uavVrpn->yPlot()->AddCurve(circle->Matrix()->Element(0,1),DataPlot::Blue);
-    uavVrpn->VxPlot()->AddCurve(circle->Matrix()->Element(1,0),DataPlot::Blue);
-    uavVrpn->VyPlot()->AddCurve(circle->Matrix()->Element(1,1),DataPlot::Blue);
-    uavVrpn->XyPlot()->AddCurve(circle->Matrix()->Element(0,1),circle->Matrix()->Element(0,0),DataPlot::Blue,"circle");
+    uavVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),DataPlot::Blue);
+    uavVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),DataPlot::Blue);
+    uavVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),DataPlot::Blue);
+    uavVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),DataPlot::Blue);
+    uavVrpn->XyPlot()->AddCurve(circle->GetMatrix()->Element(0,1),circle->GetMatrix()->Element(0,0),DataPlot::Blue,"circle");
 
     uX=new Pid(setupLawTab->At(1,0),"u_x");
Index: trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
===================================================================
--- trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 200)
+++ trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 214)
@@ -22,5 +22,5 @@
 #include <LowPassFilter.h>
 #include <EulerDerivative.h>
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <GridLayout.h>
 #include <DataPlot1D.h>
@@ -65,7 +65,7 @@
   opticalFlowSpeedRaw=new OpticalFlowSpeed(opticalFlowCompensated,uav->GetAhrs(),uav->GetVerticalCamera()->GetLayout()->NewRow(),"vitesse du Flux Optique");
   //opticalFlowSpeed=vitesse de déplacement en pixels par seconde (moyenne sur tous les points et division par le delta T)
-  cvmatrix* twoByOneOFS=new cvmatrix((const Thread*)this,2,1,floatType);
-  cvmatrix* twoByOneOFAR=new cvmatrix((const Thread*)this,2,1,floatType);
-  cvmatrix* twoByOneOFA=new cvmatrix((const Thread*)this,2,1,floatType);
+  Matrix* twoByOneOFS=new Matrix((const Thread*)this,2,1,floatType);
+  Matrix* twoByOneOFAR=new Matrix((const Thread*)this,2,1,floatType);
+  Matrix* twoByOneOFA=new Matrix((const Thread*)this,2,1,floatType);
   opticalFlowSpeed=new LowPassFilter(opticalFlowSpeedRaw,uav->GetVerticalCamera()->GetLayout()->NewRow(),"Speed lowPass",twoByOneOFS);
   opticalFlowAccelerationRaw=new EulerDerivative(opticalFlowSpeed,uav->GetVerticalCamera()->GetLayout()->NewRow(),"derivative",twoByOneOFAR);
@@ -83,7 +83,7 @@
 
   xVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(0,0));
-  xVelocityPlot->AddCurve(opticalFlowSpeed->Matrix()->Element(0,0),DataPlot::Blue);
+  xVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(0,0),DataPlot::Blue);
   yVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(1,0));
-  yVelocityPlot->AddCurve(opticalFlowSpeed->Matrix()->Element(1,0),DataPlot::Blue);
+  yVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(1,0),DataPlot::Blue);
   xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(0,0));
   xFirstPointPlot->AddCurve(opticalFlowCompensated->GetFirstPointDisplacement()->Element(1,0),DataPlot::Blue);
@@ -107,7 +107,7 @@
   
   Tab* opticalFlowRealTab=new Tab(getFrameworkManager()->GetTabWidget(),"real speed");
-  opticalFlowRealSpeed=new cvmatrix((const Thread*)this,2,1,floatType);
-  opticalFlowReference=new cvmatrix((const Thread*)this,2,1,floatType);
-  opticalFlowRealAcceleration=new cvmatrix((const Thread*)this,2,1,floatType);
+  opticalFlowRealSpeed=new Matrix((const Thread*)this,2,1,floatType);
+  opticalFlowReference=new Matrix((const Thread*)this,2,1,floatType);
+  opticalFlowRealAcceleration=new Matrix((const Thread*)this,2,1,floatType);
   DataPlot1D* xRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->NewRow(),"x speed (m/s)",-2,2);
   DataPlot1D* yRealVelocityPlot=new DataPlot1D(opticalFlowRealTab->LastRowLastCol(),"y speed (m/s)",-2,2);
Index: trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h
===================================================================
--- trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h	(revision 200)
+++ trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h	(revision 214)
@@ -20,5 +20,5 @@
 namespace flair {
     namespace core {
-        class cvmatrix;
+        class Matrix;
     }
     namespace gui {
@@ -55,9 +55,9 @@
         flair::gui::GroupBox* opticalFlowGroupBox;
         flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed;
-        flair::core::cvmatrix *opticalFlowReference;
+        flair::core::Matrix *opticalFlowReference;
         flair::filter::Pid *u_x, *u_y;
         flair::filter::CvtColor* greyCameraImage;
         flair::core::AhrsData *customReferenceOrientation;
-        flair::core::cvmatrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
+        flair::core::Matrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
 
     private:
Index: trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
===================================================================
--- trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp	(revision 200)
+++ trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp	(revision 214)
@@ -29,4 +29,5 @@
 #include <PidThrust.h>
 #include <Euler.h>
+#include <Matrix.h>
 #include <cvmatrix.h>
 #include <AhrsData.h>
@@ -60,8 +61,8 @@
 
     circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle");
-    uavVrpn->xPlot()->AddCurve(circle->Matrix()->Element(0,0),0,0,255);
-    uavVrpn->yPlot()->AddCurve(circle->Matrix()->Element(0,1),0,0,255);
-    uavVrpn->VxPlot()->AddCurve(circle->Matrix()->Element(1,0),0,0,255);
-    uavVrpn->VyPlot()->AddCurve(circle->Matrix()->Element(1,1),0,0,255);
+    uavVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),0,0,255);
+    uavVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),0,0,255);
+    uavVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),0,0,255);
+    uavVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),0,0,255);
 
     xCircleCenter=new DoubleSpinBox(vrpnclient->GetLayout()->NewRow(),"x circle center"," m",-5,5,0.1,1,0);
Index: trunk/demos/Sinus/src/Loop.cpp
===================================================================
--- trunk/demos/Sinus/src/Loop.cpp	(revision 200)
+++ trunk/demos/Sinus/src/Loop.cpp	(revision 214)
@@ -24,5 +24,5 @@
 #include <PushButton.h>
 #include <DataPlot1D.h>
-#include <cvmatrix.h>
+#include <Matrix.h>
 
 using namespace std;
@@ -47,5 +47,5 @@
                                    "1st order lawpass filter");
   sinus->GetPlot()->AddCurve(
-      firstLowPass->Matrix()->Element(0),
+      firstLowPass->GetMatrix()->Element(0),
       DataPlot::Blue); // add output of the filter to signal's graph
 
@@ -54,5 +54,5 @@
       sinus, sinus->GetSetupLayout()->NewRow(), "3rd order lawpass filter", 3);
   sinus->GetPlot()->AddCurve(
-      thirdLowPass->Matrix()->Element(0),
+      thirdLowPass->GetMatrix()->Element(0),
       DataPlot::Yellow); // add output of the filter to signal's graph
 
Index: trunk/demos/Sinus/src/MeanFilter.cpp
===================================================================
--- trunk/demos/Sinus/src/MeanFilter.cpp	(revision 200)
+++ trunk/demos/Sinus/src/MeanFilter.cpp	(revision 214)
@@ -13,5 +13,5 @@
 
 #include "MeanFilter.h"
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <LayoutPosition.h>
 #include <GroupBox.h>
@@ -42,5 +42,5 @@
   desc->SetElementName(0, 0,
                        "mean filter"); // name will be used for graphs and logs
-  output = new cvmatrix(this, desc, floatType, name);
+  output = new Matrix(this, desc, floatType, name);
   delete desc;
 
@@ -52,5 +52,5 @@
 MeanFilter::~MeanFilter() {}
 
-cvmatrix *MeanFilter::GetMatrix() const { return output; }
+Matrix *MeanFilter::GetMatrix() const { return output; }
 
 float MeanFilter::GetValue(void) const { return output->Value(0, 0); }
@@ -64,6 +64,11 @@
 
   float result = 0;
-  // get input argument in a cvmatrix
-  cvmatrix *input = (cvmatrix *)data;
+  // get input argument in a matrix
+  const Matrix* input = dynamic_cast<const Matrix*>(data);
+  
+  if (!input) {
+      Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
+      return;
+  }
 
   // simple (and not efficent!) implementation of the filter
Index: trunk/demos/Sinus/src/MeanFilter.h
===================================================================
--- trunk/demos/Sinus/src/MeanFilter.h	(revision 200)
+++ trunk/demos/Sinus/src/MeanFilter.h	(revision 214)
@@ -25,5 +25,5 @@
 namespace flair {
 namespace core {
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -70,5 +70,5 @@
   * \return pointer to the output matrix
   */
-  core::cvmatrix *GetMatrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
   /*!
@@ -86,5 +86,5 @@
   gui::GroupBox *groupBox;
   gui::SpinBox *numberOfElements;
-  core::cvmatrix *output;
+  core::Matrix *output;
   float previousValues[MAX_NUMBER_OF_ELEMENTS]; // previous values storage
 };
Index: trunk/demos/Sinus/src/Sinus.cpp
===================================================================
--- trunk/demos/Sinus/src/Sinus.cpp	(revision 200)
+++ trunk/demos/Sinus/src/Sinus.cpp	(revision 214)
@@ -21,5 +21,5 @@
 #include <SpinBox.h>
 #include <DataPlot1D.h>
-#include <cvmatrix.h>
+#include <Matrix.h>
 #include <math.h>
 
@@ -41,5 +41,5 @@
   cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
   desc->SetElementName(0, 0, "value"); // name will be used for graphs and logs
-  output = new cvmatrix((IODevice *)this, desc, floatType, name);
+  output = new Matrix((IODevice *)this, desc, floatType, name);
   delete desc;
 
@@ -94,5 +94,5 @@
 }
 
-cvmatrix *Sinus::GetMatrix(void) const { return output; }
+Matrix *Sinus::GetMatrix(void) const { return output; }
 
 float Sinus::GetValue(void) const { return output->Value(0, 0); }
Index: trunk/demos/Sinus/src/Sinus.h
===================================================================
--- trunk/demos/Sinus/src/Sinus.h	(revision 200)
+++ trunk/demos/Sinus/src/Sinus.h	(revision 214)
@@ -23,5 +23,5 @@
 namespace core {
 class FrameworkManager;
-class cvmatrix;
+class Matrix;
 }
 namespace gui {
@@ -69,5 +69,5 @@
   * \return un pointeur vers la matrice de sortie
   */
-  core::cvmatrix *GetMatrix(void) const;
+  core::Matrix *GetMatrix(void) const;
 
   /*!
@@ -113,5 +113,5 @@
   void Run(void);
 
-  core::cvmatrix *output;
+  core::Matrix *output;
   gui::Tab *mainTab;
   gui::TabWidget *tabWidget;
