Index: trunk/demos/CMakeLists.txt
===================================================================
--- trunk/demos/CMakeLists.txt	(revision 404)
+++ trunk/demos/CMakeLists.txt	(revision 405)
@@ -5,8 +5,8 @@
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CircleFollower/)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/TwoWheelRobotCircleFollower)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Gps/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/DemoGps/)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/HelloWorld/)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/MixedReality/)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/OpticalFlow/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/DemoOpticalFlow/)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/PidStandalone/)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/SimpleFleet/)
Index: trunk/demos/DemoGps/CMakeLists.txt
===================================================================
--- trunk/demos/DemoGps/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoGps/CMakeLists.txt	(revision 405)
@@ -0,0 +1,6 @@
+PROJECT(DemoGps)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simulator)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/uav)
Index: trunk/demos/DemoGps/simulator/CMakeLists.txt
===================================================================
--- trunk/demos/DemoGps/simulator/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoGps/simulator/CMakeLists.txt	(revision 405)
@@ -0,0 +1,16 @@
+PROJECT(DemoGps_simulator)
+cmake_minimum_required(VERSION 2.8)
+
+SET(FLAIR_USE_SIMULATOR TRUE)
+SET(FLAIR_USE_SIMULATOR_GL TRUE)
+
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+SET(SRC_FILES
+	src/main.cpp
+)
+
+FLAIR_DEMO_HOST_CXX(${PROJECT_NAME} "${SRC_FILES}"
+           DEST_DIR DemoGps
+           COPY_RESOURCES
+)
Index: trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.sh
===================================================================
--- trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.sh	(revision 405)
+++ trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoGps_simulator_rt
+else
+	EXEC=./DemoGps_simulator_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x4_0 -t x4 -p 9000 -a 127.0.0.1 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
Index: trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.xml
===================================================================
--- trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.xml	(revision 405)
+++ trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x4.xml	(revision 405)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x4_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-3.5" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </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>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="1" name="y:"/>
+    <DoubleSpinBox value="0" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <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):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+</Tab>
+  </TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.sh
===================================================================
--- trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.sh	(revision 405)
+++ trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoGps_simulator_rt
+else
+	EXEC=./DemoGps_simulator_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x8_0 -t x8 -p 9000 -a 127.0.0.1 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
Index: trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.xml
===================================================================
--- trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.xml	(revision 405)
+++ trunk/demos/DemoGps/simulator/resources/core2-64/simulator_x8.xml	(revision 405)
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x8_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <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>
+   <Tab name="model">
+    <DoubleSpinBox value="1.6" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0" name="position G (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+    <DoubleSpinBox value="0" name="j_r:"/>
+    <DoubleSpinBox value="0.72" name="sigma:"/>
+    <DoubleSpinBox value="1" name="S:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </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>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="0" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <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>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/DemoGps/simulator/src/main.cpp
===================================================================
--- trunk/demos/DemoGps/simulator/src/main.cpp	(revision 405)
+++ trunk/demos/DemoGps/simulator/src/main.cpp	(revision 405)
@@ -0,0 +1,129 @@
+//  created:    2012/04/18
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 6599
+//
+//  version:    $Id: $
+//
+//  purpose:    main simulateur
+//
+//
+/*********************************************************************/
+
+#include <tclap/CmdLine.h>
+#include <Simulator.h>
+#include <X4.h>
+#include <X8.h>
+#include <SimuImu.h>
+#include <SimuGps.h>
+#ifdef GL
+#include <Parser.h>
+#include <Man.h>
+#include <SimuUsGL.h>
+#endif
+
+using namespace TCLAP;
+using namespace std;
+using namespace flair::simulator;
+using namespace flair::sensor;
+
+int port;
+int opti_time;
+string xml_file;
+string media_path;
+string scene_file;
+string type;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv)
+{
+  try {
+    CmdLine cmd("Command description message", ' ', "0.1");
+
+    ValueArg<string> nameArg("n", "name", "uav name, also used for vrpn", true, "x4", "string");
+    cmd.add(nameArg);
+
+    ValueArg<string> xmlArg("x", "xml", "xml file", true, "./reglages.xml", "string");
+    cmd.add(xmlArg);
+
+    ValueArg<int> portArg("p", "port", "ground station port", true, 9002, "int");
+    cmd.add(portArg);
+
+    ValueArg<string> addressArg("a", "address", "ground station address", true, "127.0.0.1", "string");
+    cmd.add(addressArg);
+
+    ValueArg<string> typeArg("t", "type", "uav type, x4 or x8", true, "x4", "string");
+    cmd.add(typeArg);
+
+    ValueArg<int> optiArg("o", "opti", "optitrack time ms", false, 0, "int");
+    cmd.add(optiArg);
+
+#ifdef GL
+    ValueArg<string> mediaArg("m", "media", "path to media files", true, "./", "string");
+    cmd.add(mediaArg);
+
+    ValueArg<string> sceneArg("s", "scene", "path to scene file", true, "./voliere.xml", "string");
+    cmd.add(sceneArg);
+#endif
+
+    cmd.parse(argc, argv);
+
+    // Get the value parsed by each arg.
+    port = portArg.getValue();
+    xml_file = xmlArg.getValue();
+    opti_time = optiArg.getValue();
+    type = typeArg.getValue();
+    name = nameArg.getValue();
+    address = addressArg.getValue();
+#ifdef GL
+    media_path = mediaArg.getValue();
+    scene_file = sceneArg.getValue();
+#endif
+
+  } catch(ArgException& e) {
+    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+    exit(EXIT_FAILURE);
+  }
+}
+
+int main(int argc, char* argv[])
+{
+  Simulator* simu;
+  Model* drone;
+  SimuImu* imu;
+  SimuGps* gps;
+#ifdef GL
+  SimuUsGL* us_gl;
+  Parser* gui;
+#endif
+  parseOptions(argc, argv);
+
+  simu = new Simulator("simulator", opti_time, 0);
+  simu->SetupConnection(address, port);
+  simu->SetupUserInterface(xml_file);
+
+#ifdef GL
+  gui = new Parser(1024, 768, 1024, 768, media_path, scene_file);
+#endif
+
+  if(type == "x4") {
+    drone = new X4(name, 0);
+  } else {
+    drone = new X8(name, 0);
+  }
+
+  imu = new SimuImu(drone, "imu", 0,0);
+
+#ifdef GL
+  us_gl = new SimuUsGL(drone, "us", 0,0);
+#endif
+  gps = new SimuGps(drone, "gps", 0,0);
+
+  simu->RunSimu();
+
+  delete simu;
+
+  return 0;
+}
Index: trunk/demos/DemoGps/uav/CMakeLists.txt
===================================================================
--- trunk/demos/DemoGps/uav/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoGps/uav/CMakeLists.txt	(revision 405)
@@ -0,0 +1,18 @@
+PROJECT(DemoGps)
+cmake_minimum_required(VERSION 2.8)
+
+SET(FLAIR_USE_FILTER TRUE)
+SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
+SET(FLAIR_USE_META TRUE)
+
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+SET(SRC_FILES
+	src/main.cpp
+	src/DemoGps.cpp
+)
+
+FLAIR_DEMO(${PROJECT_NAME} "${SRC_FILES}"
+           DEST_DIR DemoGps
+           COPY_RESOURCES
+)
Index: trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.sh
===================================================================
--- trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.sh	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.sh	(revision 405)
@@ -0,0 +1,1 @@
+./DemoGps_nrt -a 192.168.42.24 -p 9000 -l /tmp -x Gps_bebop.xml -n Drone_0 -t bebop
Index: trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.xml
===================================================================
--- trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.xml	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.xml	(revision 405)
@@ -0,0 +1,268 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="x4-multiplex">
+      <TabWidget name="UavMultiplex">
+        <Tab name="Setup">
+          <GroupBox name="x4 multiplex">
+            <ComboBox name="front left blade pitch:" value="0"/>
+          </GroupBox>
+          <GroupBox name="motor attribution">
+            <ComboBox name="front left" value="0"/>
+            <ComboBox name="front rigth" value="1"/>
+            <ComboBox name="rear left" value="3"/>
+            <ComboBox name="rear rigth" value="2"/>
+          </GroupBox>
+          <GroupBox name="bldc">
+            <Label name="flight time"/>
+            <DoubleSpinBox name="min value:" value="0"/>
+            <DoubleSpinBox name="max value:" value="1"/>
+            <DoubleSpinBox name="test value:" value="0.4"/>
+            <PushButton name="test motor 0"/>
+            <PushButton name="test motor 1"/>
+            <PushButton name="test motor 2"/>
+            <PushButton name="test motor 3"/>
+          </GroupBox>
+          <GroupBox name="battery">
+            <Label name="battery"/>
+            <DoubleSpinBox name="threshold" value="10.5"/>
+            <SpinBox name="threshold time" value="10"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Values">
+          <DataPlot1D name="front left" period="100" enabled="0"/>
+          <DataPlot1D name="front right" period="100" enabled="0"/>
+          <DataPlot1D name="rear left" period="100" enabled="0"/>
+          <DataPlot1D name="rear right" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="Speeds">
+          <DataPlot1D name="front left" period="100" enabled="0"/>
+          <DataPlot1D name="front right" period="100" enabled="0"/>
+          <DataPlot1D name="rear left" period="100" enabled="0"/>
+          <DataPlot1D name="rear right" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="bebop-us">
+      <TabWidget name="bebop-us">
+        <Tab name="Reglages">
+          <GroupBox name="bebop-us"/>
+          <GroupBox name="Passe bas">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="5"/>
+          </GroupBox>
+          <GroupBox name="Vz">
+            <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+          </GroupBox>
+          <GroupBox name="Passe bas v">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="5"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Mesures">
+          <DataPlot1D name="bebop-us" period="100" enabled="1"/>
+          <DataPlot1D name="vz" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="bebop-imu">
+      <TabWidget name="bebop-imu">
+        <Tab name="Reglages">
+          <GroupBox name="bebop-imu"/>
+          <GroupBox name="post rotation">
+            <DoubleSpinBox name="value" value="180"/>
+            <ComboBox name="axis" value="0"/>
+          </GroupBox>
+          <DoubleSpinBox name="ka[0]:" value="0.5"/>
+          <DoubleSpinBox name="ka[1]:" value="0.5"/>
+          <DoubleSpinBox name="ka[2]:" value="0"/>
+          <DoubleSpinBox name="kb[0]:" value="0.01"/>
+          <DoubleSpinBox name="kb[1]:" value="0.01"/>
+          <DoubleSpinBox name="kb[2]:" value="0.01"/>
+        </Tab>
+        <Tab name="AHRS">
+          <DataPlot1D name="roll" period="100" enabled="1"/>
+          <DataPlot1D name="pitch" period="100" enabled="0"/>
+          <DataPlot1D name="yaw" period="100" enabled="0"/>
+          <DataPlot1D name="w_x" period="100" enabled="1"/>
+          <DataPlot1D name="w_y" period="100" enabled="0"/>
+          <DataPlot1D name="w_z" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="Quaternion">
+          <DataPlot1D name="q0" period="100" enabled="0"/>
+          <DataPlot1D name="q1" period="100" enabled="0"/>
+          <DataPlot1D name="q2" period="100" enabled="0"/>
+          <DataPlot1D name="q3" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="IMU">
+          <DataPlot1D name="acc_x" period="100" enabled="0"/>
+          <DataPlot1D name="acc_y" period="100" enabled="0"/>
+          <DataPlot1D name="acc_z" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_x" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_y" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_z" period="100" enabled="0"/>
+          <DataPlot1D name="mag_x" period="100" enabled="0"/>
+          <DataPlot1D name="mag_y" period="100" enabled="0"/>
+          <DataPlot1D name="mag_z" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="Dualshock3">
+      <TabWidget name="Dualshock3">
+        <Tab name="Reglages">
+          <GroupBox name="consignes joy">
+            <DoubleSpinBox name="debattement roll" value="-15"/>
+            <DoubleSpinBox name="debattement pitch" value="-15"/>
+            <DoubleSpinBox name="debattement wz" value="90"/>
+            <DoubleSpinBox name="debattement dz" value="-0.5"/>
+            <DoubleSpinBox name="trim" value="0.01"/>
+            <Label name="trim roll"/>
+            <PushButton name="reset roll trim"/>
+            <Label name="trim pitch"/>
+            <PushButton name="reset pitch trim"/>
+          </GroupBox>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="uav">
+      <GridLayout name="buttons">
+        <PushButton name="kill"/>
+        <PushButton name="start_log"/>
+        <PushButton name="stop_log"/>
+        <PushButton name="take_off"/>
+        <PushButton name="land"/>
+        <PushButton name="start_circle"/>
+        <PushButton name="stop_circle"/>
+        <PushButton name="position hold"/>
+      </GridLayout>
+      <GroupBox name="takeoff/landing">
+        <DoubleSpinBox name="desired takeoff altitude" value="0.5"/>
+        <DoubleSpinBox name="desired landing altitude" value="0"/>
+      </GroupBox>
+      <GroupBox name="alt cons">
+        <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+        <DoubleSpinBox name="velocity max (absolute):" value="1"/>
+        <DoubleSpinBox name="acceleration (absolute):" value="1"/>
+      </GroupBox>
+    </Tab>
+    <Tab name="control laws">
+      <TabWidget name="laws">
+        <Tab name="Setup">
+          <GroupBox name="u_roll">
+            <DoubleSpinBox name="sat ref:" value="20"/>
+            <DoubleSpinBox name="kp:" value="15.00"/>
+            <DoubleSpinBox name="sat dref:" value="1000"/>
+            <DoubleSpinBox name="kd:" value="0.04"/>
+            <DoubleSpinBox name="sat u:" value="0.5"/>
+          </GroupBox>
+          <GroupBox name="u_pitch">
+            <DoubleSpinBox name="sat ref:" value="20"/>
+            <DoubleSpinBox name="kp:" value="15"/>
+            <DoubleSpinBox name="sat dref:" value="1000"/>
+            <DoubleSpinBox name="kd:" value="0.05"/>
+            <DoubleSpinBox name="sat u:" value="0.5"/>
+          </GroupBox>
+          <GroupBox name="u_yaw">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.6"/>
+            <DoubleSpinBox name="ki:" value="0"/>
+            <DoubleSpinBox name="sat i:" value="0"/>
+            <DoubleSpinBox name="kd:" value="0.15"/>
+            <DoubleSpinBox name="sat:" value="0.5"/>
+          </GroupBox>
+          <GroupBox name="u_z">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.3"/>
+            <DoubleSpinBox name="ki:" value="0.2"/>
+            <DoubleSpinBox name="sat i:" value="0.4"/>
+            <DoubleSpinBox name="kd:" value="0.15"/>
+            <DoubleSpinBox name="offset g:" value="0.37"/>
+            <DoubleSpinBox name="sat:" value="1"/>
+            <DoubleSpinBox name="offset step:" value="0.0002"/>
+          </GroupBox>
+          <GroupBox name="u_x">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0"/>
+            <DoubleSpinBox name="ki:" value="0"/>
+            <DoubleSpinBox name="sat i:" value="0"/>
+            <DoubleSpinBox name="kd:" value="0"/>
+            <DoubleSpinBox name="sat:" value="0"/>
+          </GroupBox>
+          <GroupBox name="u_y">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0"/>
+            <DoubleSpinBox name="ki:" value="0"/>
+            <DoubleSpinBox name="sat i:" value="0"/>
+            <DoubleSpinBox name="kd:" value="0"/>
+            <DoubleSpinBox name="sat:" value="0"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Graphes">
+          <DataPlot1D name="u_roll" period="100" enabled="0"/>
+          <DataPlot1D name="u_pitch" period="100" enabled="0"/>
+          <DataPlot1D name="u_yaw" period="100" enabled="0"/>
+          <DataPlot1D name="u_z" period="100" enabled="0"/>
+          <DataPlot1D name="u_x" period="100" enabled="0"/>
+          <DataPlot1D name="u_y" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="vrpn">
+      <TabWidget name="vrpn">
+        <Tab name="Reglages">
+          <GroupBox name="post rotation 1">
+            <DoubleSpinBox name="value" value="0"/>
+            <ComboBox name="axis" value="0"/>
+          </GroupBox>
+          <GroupBox name="post rotation 2">
+            <DoubleSpinBox name="value" value="0"/>
+            <ComboBox name="axis" value="0"/>
+          </GroupBox>
+          <GroupBox name="Drone_0 Passe bas">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="1"/>
+          </GroupBox>
+          <GroupBox name="Drone_0_euler">
+            <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+          </GroupBox>
+          <GroupBox name="target Passe bas">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="1"/>
+          </GroupBox>
+          <GroupBox name="target_euler">
+            <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+          </GroupBox>
+          <GroupBox name="circle">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="R" value="0"/>
+            <DoubleSpinBox name="velocity" value="0"/>
+            <DoubleSpinBox name="acceleration (absolute)" value="0"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Mesures Drone_0">
+          <DataPlot1D name="x" period="100" enabled="0"/>
+          <DataPlot1D name="y" period="100" enabled="0"/>
+          <DataPlot1D name="z" period="100" enabled="0"/>
+          <DataPlot1D name="vx" period="100" enabled="0"/>
+          <DataPlot1D name="vy" period="100" enabled="0"/>
+          <DataPlot1D name="vz" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="Mesures (xy) Drone_0">
+          <DataPlot2D name="xy" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="Mesures target">
+          <DataPlot1D name="x" period="100" enabled="0"/>
+          <DataPlot1D name="y" period="100" enabled="0"/>
+          <DataPlot1D name="z" period="100" enabled="0"/>
+          <DataPlot1D name="vx" period="100" enabled="0"/>
+          <DataPlot1D name="vy" period="100" enabled="0"/>
+          <DataPlot1D name="vz" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="Mesures (xy) target">
+          <DataPlot2D name="xy" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <PushButton name="save config on target (Drone_0)" value="1"/>
+</root>
Index: trunk/demos/DemoGps/uav/resources/core2-64/setup_x4.xml
===================================================================
--- trunk/demos/DemoGps/uav/resources/core2-64/setup_x4.xml	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/core2-64/setup_x4.xml	(revision 405)
@@ -0,0 +1,361 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interfac">
+<TabWidget name="Main_TabWidget">
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    <DoubleSpinBox name="debattement wz" value="90"/></GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="0" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  <Tab name="Currents"><DataPlot1D name="front left" period="100" enabled="0"/><DataPlot1D name="front right" period="100" enabled="0"/><DataPlot1D name="rear left" period="100" enabled="0"/><DataPlot1D name="rear right" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  <Tab name="Quaternion"><DataPlot1D name="q0" period="100" enabled="1"/><DataPlot1D name="q1" period="100" enabled="1"/><DataPlot1D name="q2" period="100" enabled="1"/><DataPlot1D name="q3" period="100" enabled="1"/></Tab><Tab name="IMU"><DataPlot1D name="acc_x" period="100" enabled="0"/><DataPlot1D name="acc_y" period="100" enabled="0"/><DataPlot1D name="acc_z" period="100" enabled="0"/><DataPlot1D name="gyr_x" period="100" enabled="0"/><DataPlot1D name="gyr_y" period="100" enabled="0"/><DataPlot1D name="gyr_z" period="100" enabled="0"/><DataPlot1D name="mag_x" period="100" enabled="0"/><DataPlot1D name="mag_y" period="100" enabled="0"/><DataPlot1D name="mag_z" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x4_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x4_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x4_0">
+    <DataPlot1D name="x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x4_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="land"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  </GridLayout>
+  <GroupBox name="takeoff/landing">
+   <DoubleSpinBox value="1" name="desired takeoff altitude"/>
+   <DoubleSpinBox value="0" name="desired landing altitude"/>
+  </GroupBox>
+  <GroupBox name="alt cons">
+   <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+   <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+   <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+<Tab name="Dualshock3"><TabWidget name="Dualshock3"><Tab name="Reglages"><GroupBox name="consignes joy"><DoubleSpinBox name="debattement roll" value="-30"/><DoubleSpinBox name="debattement pitch" value="-30"/><DoubleSpinBox name="debattement wz" value="0"/><DoubleSpinBox name="debattement dz" value="0"/><DoubleSpinBox name="trim" value="0"/><Label name="trim roll"/><PushButton name="reset roll trim"/><Label name="trim pitch"/><PushButton name="reset pitch trim"/></GroupBox></Tab></TabWidget></Tab><Tab name="gps"><TabWidget name="gps"><Tab name="Setup"><GroupBox name="gps"><PushButton name="set ref"/><Label name="nb_sat"/><Label name="fix"/><SpinBox name="data rate" value="5"/><DoubleSpinBox name="latitude ref" value="49.402313"/><DoubleSpinBox name="longitude ref" value="2.795463"/><DoubleSpinBox name="altitude ref" value="0"/><SpinBox name="fix quality" value="1"/><SpinBox name="number of satellites" value="5"/></GroupBox><GroupBox name="circle"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="R" value="0"/><DoubleSpinBox name="velocity" value="0"/><DoubleSpinBox name="acceleration (absolute)" value="0"/></GroupBox></Tab><Tab name="Mesures"><DataPlot1D name="e" period="100" enabled="0"/><DataPlot1D name="n" period="100" enabled="0"/><DataPlot1D name="u" period="100" enabled="0"/><DataPlot1D name="ve" period="100" enabled="1"/><DataPlot1D name="vn" period="100" enabled="1"/></Tab><Tab name="carte"><Map name="map" period="100" enabled="1" long0="1.532034873962402" lat0="49.35582442393555"/></Tab></TabWidget></Tab></TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x4_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (x4_0)" value="1"/></root>
Index: trunk/demos/DemoGps/uav/resources/core2-64/setup_x8.xml
===================================================================
--- trunk/demos/DemoGps/uav/resources/core2-64/setup_x8.xml	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/core2-64/setup_x8.xml	(revision 405)
@@ -0,0 +1,342 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x8 multiplex">
+     <ComboBox value="0" name="top front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="top front left"/>
+     <ComboBox value="1" name="top front rigth"/>
+     <ComboBox value="2" name="top rear left"/>
+     <ComboBox value="3" name="top rear rigth"/>
+     <ComboBox value="4" name="bottom front left"/>
+     <ComboBox value="5" name="bottom front rigth"/>
+     <ComboBox value="6" name="bottom rear left"/>
+     <ComboBox value="7" name="bottom rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+     <PushButton value="0" name="test motor 4"/>
+     <PushButton value="0" name="test motor 5"/>
+     <PushButton value="0" name="test motor 6"/>
+     <PushButton value="0" name="test motor 7"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x8_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x8_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x8_0">
+    <DataPlot1D name="x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x8_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="landing"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  <PushButton name="land"/></GridLayout>
+ <GroupBox name="takeoff/landing"><DoubleSpinBox name="desired takeoff altitude" value="1"/><DoubleSpinBox name="desired landing altitude" value="0"/></GroupBox><GroupBox name="alt cons"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="velocity max (absolute):" value="0.5"/><DoubleSpinBox name="acceleration (absolute):" value="0.2"/></GroupBox></Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15.00" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15.00" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x8_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (x8_0)" value="1"/></root>
Index: trunk/demos/DemoGps/uav/resources/core2-64/x4.sh
===================================================================
--- trunk/demos/DemoGps/uav/resources/core2-64/x4.sh	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/core2-64/x4.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoGps_rt
+else
+	EXEC=./DemoGps_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
Index: trunk/demos/DemoGps/uav/resources/core2-64/x8.sh
===================================================================
--- trunk/demos/DemoGps/uav/resources/core2-64/x8.sh	(revision 405)
+++ trunk/demos/DemoGps/uav/resources/core2-64/x8.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./Gps_rt
+else
+	EXEC=./Gps_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: trunk/demos/DemoGps/uav/src/DemoGps.cpp
===================================================================
--- trunk/demos/DemoGps/uav/src/DemoGps.cpp	(revision 405)
+++ trunk/demos/DemoGps/uav/src/DemoGps.cpp	(revision 405)
@@ -0,0 +1,212 @@
+//  created:    2016/07/01
+//  filename:   DemoGps.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo GPS
+//
+//
+/*********************************************************************/
+
+#include "DemoGps.h"
+#include <TargetController.h>
+#include <Uav.h>
+#include <GridLayout.h>
+#include <PushButton.h>
+#include <DataPlot1D.h>
+#include <DataPlot2D.h>
+#include <MetaDualShock3.h>
+#include <FrameworkManager.h>
+#include <TrajectoryGenerator2DCircle.h>
+#include <cmath>
+#include <Tab.h>
+#include <Pid.h>
+#include <Ahrs.h>
+#include <AhrsData.h>
+#include <RTDM_SerialPort.h>
+#include <Imu.h>
+#include <NmeaGps.h>
+
+using namespace std;
+using namespace flair::core;
+using namespace flair::gui;
+using namespace flair::sensor;
+using namespace flair::filter;
+using namespace flair::meta;
+
+DemoGps::DemoGps(TargetController* controller)
+    : UavStateMachine(controller)
+    , behaviourMode(BehaviourMode_t::Default) {
+  Uav* uav = GetUav();
+  startCircle = new PushButton(GetButtonsLayout()->NewRow(), "start_circle");
+  stopCircle = new PushButton(GetButtonsLayout()->LastRowLastCol(), "stop_circle");
+
+  circle = new TrajectoryGenerator2DCircle(uav->GetGps()->GetLayout()->NewRow(), "circle");
+  // todo: add graphs in gps plot
+  /*
+  uav->GetVrpnObject()->xPlot()->AddCurve(circle->Matrix()->Element(0,0),DataPlot::Blue);
+  uav->GetVrpnObject()->yPlot()->AddCurve(circle->Matrix()->Element(0,1),DataPlot::Blue);
+  uav->GetVrpnObject()->VxPlot()->AddCurve(circle->Matrix()->Element(1,0),DataPlot::Blue);
+  uav->GetVrpnObject()->VyPlot()->AddCurve(circle->Matrix()->Element(1,1),DataPlot::Blue);
+  uav->GetVrpnObject()->XyPlot()->AddCurve(circle->Matrix()->Element(0,1),circle->Matrix()->Element(0,0),DataPlot::Blue,"circle");*/
+
+  uX = new Pid(setupLawTab->At(1, 0), "u_x");
+  uX->UseDefaultPlot(graphLawTab->NewRow());
+  uY = new Pid(setupLawTab->At(1, 1), "u_y");
+  uY->UseDefaultPlot(graphLawTab->LastRowLastCol());
+
+  customReferenceOrientation = new AhrsData(this, "reference");
+  uav->GetAhrs()->AddPlot(customReferenceOrientation, DataPlot::Yellow);
+  AddDataToControlLawLog(customReferenceOrientation);
+
+  customOrientation = new AhrsData(this, "orientation");
+}
+
+DemoGps::~DemoGps() {
+}
+
+AhrsData* DemoGps::GetReferenceOrientation(void) {
+  Vector2Df pos_err, vel_err; // in Uav coordinate system
+  float yaw_ref;
+  Euler refAngles;
+
+  PositionValues(pos_err, vel_err, yaw_ref);
+
+  refAngles.yaw = yaw_ref;
+
+  uX->SetValues(pos_err.x, vel_err.x);
+  uX->Update(GetTime());
+  refAngles.pitch = uX->Output();
+
+  uY->SetValues(pos_err.y, vel_err.y);
+  uY->Update(GetTime());
+  refAngles.roll = -uY->Output();
+
+  customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(), Vector3Df(0, 0, 0));
+
+  return customReferenceOrientation;
+}
+
+void DemoGps::PositionValues(Vector2Df& pos_error, Vector2Df& vel_error, float& yaw_ref) {
+  Vector3Df uav_pos, uav_vel;
+  Vector2Df uav_2Dpos, uav_2Dvel;
+
+  // TODO GPS position and circle center
+  // GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+  // GetUav()->GetVrpnObject()->GetSpeed(uav_vel);
+
+  uav_pos.To2Dxy(uav_2Dpos);
+  uav_vel.To2Dxy(uav_2Dvel);
+
+  if(behaviourMode == BehaviourMode_t::PositionHold) {
+    pos_error = uav_2Dpos - posHold;
+    vel_error = uav_2Dvel;
+    yaw_ref = yawHold;
+  } else { // Circle
+    Vector2Df circle_pos, circle_vel;
+    Vector2Df target_2Dpos;
+
+    circle->SetCenter(target_2Dpos);
+
+    // circle reference
+    circle->Update(GetTime());
+    circle->GetPosition(circle_pos);
+    circle->GetSpeed(circle_vel);
+
+    // error in optitrack frame
+    pos_error = uav_2Dpos - circle_pos;
+    vel_error = uav_2Dvel - circle_vel;
+    yaw_ref = atan2(target_2Dpos.y - uav_pos.y, target_2Dpos.x - uav_pos.x);
+  }
+
+  // error in uav frame
+  Quaternion currentQuaternion = GetCurrentQuaternion();
+  Euler currentAngles; // in vrpn frame
+  currentQuaternion.ToEuler(currentAngles);
+  pos_error.Rotate(-currentAngles.yaw);
+  vel_error.Rotate(-currentAngles.yaw);
+}
+
+void DemoGps::SignalEvent(Event_t event) {
+  UavStateMachine::SignalEvent(event);
+  switch(event) {
+  case Event_t::TakingOff:
+    behaviourMode = BehaviourMode_t::Default;
+    break;
+  case Event_t::EnteringControlLoop:
+    if((behaviourMode == BehaviourMode_t::Circle) && (!circle->IsRunning())) {
+      GpsPositionHold();
+    }
+    break;
+  case Event_t::EnteringFailSafeMode:
+    behaviourMode = BehaviourMode_t::Default;
+    break;
+  }
+}
+
+void DemoGps::ExtraSecurityCheck(void) {
+}
+
+void DemoGps::ExtraCheckPushButton(void) {
+  if(startCircle->Clicked() && (behaviourMode != BehaviourMode_t::Circle)) {
+    StartCircle();
+  }
+  if(stopCircle->Clicked() && (behaviourMode == BehaviourMode_t::Circle)) {
+    StopCircle();
+  }
+}
+
+void DemoGps::ExtraCheckJoystick(void) {
+  // R1 and Circle
+  if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) &&
+     (behaviourMode != BehaviourMode_t::Circle)) {
+    StartCircle();
+  }
+
+  // R1 and Cross
+  if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) &&
+     (behaviourMode == BehaviourMode_t::Circle)) {
+    StopCircle();
+  }
+}
+
+void DemoGps::StartCircle(void) {
+  if(SetOrientationMode(OrientationMode_t::Custom)) {
+    Thread::Info("DemoGps: start circle\n");
+  } else {
+    Thread::Warn("DemoGps: could not start circle\n");
+    return;
+  }
+  Vector3Df uav_pos;
+  Vector2Df uav_2Dpos, target_2Dpos;
+
+  circle->SetCenter(target_2Dpos);
+
+  // todo get uav and circle pos by gps
+  uav_pos.To2Dxy(uav_2Dpos);
+  circle->StartTraj(uav_2Dpos);
+
+  uX->Reset();
+  uY->Reset();
+  behaviourMode = BehaviourMode_t::Circle;
+}
+
+void DemoGps::StopCircle(void) {
+  circle->FinishTraj();
+  // GetJoystick()->Rumble(0x70);
+  Thread::Info("DemoGps: finishing circle\n");
+}
+
+void DemoGps::GpsPositionHold(void) {
+
+  // tood set yawHold and posHold
+
+  uX->Reset();
+  uY->Reset();
+  behaviourMode = BehaviourMode_t::PositionHold;
+  SetOrientationMode(OrientationMode_t::Custom);
+  Thread::Info("DemoGps: holding position\n");
+}
Index: trunk/demos/DemoGps/uav/src/DemoGps.h
===================================================================
--- trunk/demos/DemoGps/uav/src/DemoGps.h	(revision 405)
+++ trunk/demos/DemoGps/uav/src/DemoGps.h	(revision 405)
@@ -0,0 +1,65 @@
+//  created:    2016/07/01
+//  filename:   DemoGps.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo GPS
+//
+//
+/*********************************************************************/
+
+#ifndef DEMOGPS_H
+#define DEMOGPS_H
+
+#include <UavStateMachine.h>
+
+namespace flair {
+    namespace gui {
+        class PushButton;
+    }
+    namespace filter {
+        class TrajectoryGenerator2DCircle;
+    }
+    namespace sensor {
+        class TargetController;
+    }
+}
+
+class DemoGps : public flair::meta::UavStateMachine {
+    public:
+        DemoGps(flair::sensor::TargetController *controller);
+        ~DemoGps();
+
+    private:
+        enum class BehaviourMode_t {
+            Default,
+            PositionHold,
+            Circle
+        };
+
+        BehaviourMode_t behaviourMode;
+
+        void GpsPositionHold(void);
+        void StartCircle(void);
+        void StopCircle(void);
+        void ExtraSecurityCheck(void);
+        void ExtraCheckPushButton(void);
+        void ExtraCheckJoystick(void);
+        void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
+        flair::core::AhrsData *GetReferenceOrientation(void);
+        void SignalEvent(Event_t event);
+
+        flair::filter::Pid *uX, *uY;
+
+        flair::core::Vector2Df posHold;
+        float yawHold;
+
+        flair::gui::PushButton *startCircle,*stopCircle;
+        flair::filter::TrajectoryGenerator2DCircle *circle;
+        flair::core::AhrsData *customReferenceOrientation,*customOrientation;
+};
+
+#endif // DEMOGPS_H
Index: trunk/demos/DemoGps/uav/src/main.cpp
===================================================================
--- trunk/demos/DemoGps/uav/src/main.cpp	(revision 405)
+++ trunk/demos/DemoGps/uav/src/main.cpp	(revision 405)
@@ -0,0 +1,98 @@
+//  created:    2011/05/01
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    exemple de code uav
+//
+//
+/*********************************************************************/
+
+#include "DemoGps.h"
+#include <UavFactory.h>
+#include <FrameworkManager.h>
+#include <stdio.h>
+#include <tclap/CmdLine.h>
+#include <TargetEthController.h>
+
+using namespace TCLAP;
+using namespace std;
+using namespace flair::core;
+using namespace flair::meta;
+using namespace flair::sensor;
+
+string uav_type;
+string log_path;
+int port;
+int ds3port;
+string xml_file;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv);
+
+
+int main(int argc, char* argv[]) {
+    parseOptions(argc,argv);
+
+    FrameworkManager *manager;
+    manager= new FrameworkManager(name);
+    manager->SetupConnection(address,port);
+    manager->SetupUserInterface(xml_file);
+    manager->SetupLogger(log_path);
+
+    Uav* drone=CreateUav(name,uav_type,"use_gps=true");
+    TargetEthController *controller=new TargetEthController("Dualshock3",ds3port);
+    DemoGps* demo=new DemoGps(controller);
+
+    demo->Start();
+    demo->Join();
+
+    delete manager;
+}
+
+void parseOptions(int argc, char** argv) {
+	try {
+
+        CmdLine cmd("Command description message", ' ', "0.1");
+
+        ValueArg<string> nameArg("n","name","uav name, also used for vrpn",true,"x4","string");
+        cmd.add( nameArg );
+
+        ValueArg<string> typeArg("t","type","uav type: ardrone2, hds_x4, hds_x8, hds_xufo, x4_simu, x8_simu or x4_simux (with x the number of the simulated uav)",true,"hds_x4","string");
+        cmd.add( typeArg );
+
+        ValueArg<string> xmlArg("x","xml","fichier xml",true,"./reglages.xml","string");
+        cmd.add( xmlArg );
+
+        ValueArg<string> logsArg("l","logs","repertoire des logs",true,"/media/ram","string");
+        cmd.add( logsArg );
+
+        ValueArg<int> portArg("p","port","port pour station sol",true,9000,"int");
+        cmd.add( portArg );
+
+        ValueArg<string> addressArg("a","address","addresse station sol",true,"127.0.0.1","string");
+        cmd.add( addressArg );
+
+        ValueArg<int> ds3portArg("d","ds3_port","port pour ds3",false,20000,"int");
+        cmd.add( ds3portArg );
+
+        cmd.parse( argc, argv );
+
+        // Get the value parsed by each arg.
+        log_path = logsArg.getValue();
+        port=portArg.getValue();
+        ds3port=ds3portArg.getValue();
+        xml_file = xmlArg.getValue();
+        name=nameArg.getValue();
+        uav_type=typeArg.getValue();
+        address=addressArg.getValue();
+
+	} catch (ArgException &e) { // catch any exceptions
+        cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+        exit(EXIT_FAILURE);
+	}
+}
Index: trunk/demos/DemoOpticalFlow/CMakeLists.txt
===================================================================
--- trunk/demos/DemoOpticalFlow/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoOpticalFlow/CMakeLists.txt	(revision 405)
@@ -0,0 +1,16 @@
+PROJECT(DemoOpticalFlow)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+if(NOT "${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "armv5te")
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simulator)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/uav)
+
+else()
+    if(DEFINED CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE)
+        warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture")
+    else()
+        warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
+    endif()
+endif()
Index: trunk/demos/DemoOpticalFlow/simulator/CMakeLists.txt
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/CMakeLists.txt	(revision 405)
@@ -0,0 +1,16 @@
+PROJECT(DemoOpticalFlow_simulator)
+cmake_minimum_required(VERSION 2.8)
+
+SET(FLAIR_USE_SIMULATOR TRUE)
+SET(FLAIR_USE_SIMULATOR_GL TRUE)
+
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+SET(SRC_FILES
+	src/main.cpp
+)
+
+FLAIR_DEMO_HOST_CXX(${PROJECT_NAME} "${SRC_FILES}"
+           DEST_DIR DemoOpticalFlow
+           COPY_RESOURCES
+)
Index: trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.sh
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.sh	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoOpticalFlow_simulator_rt
+else
+	EXEC=./DemoOpticalFlow_simulator_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
Index: trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.xml
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.xml	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x4.xml	(revision 405)
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x4_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-3.5" name="z:"/>
+    <SpinBox value="0" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </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>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+  </TabWidget>
+ </Tab>
+  </TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.sh
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.sh	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoOpticalFlow_simulator_rt
+else
+	EXEC=./DemoOpticalFlow_simulator_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
Index: trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.xml
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.xml	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/resources/core2-64/simulator_x8.xml	(revision 405)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x8_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-1.2" name="z:"/>
+    <SpinBox value="20" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.6" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0" name="position G (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+    <DoubleSpinBox value="0" name="j_r:"/>
+    <DoubleSpinBox value="0.72" name="sigma:"/>
+    <DoubleSpinBox value="1" name="S:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </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>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/DemoOpticalFlow/simulator/src/main.cpp
===================================================================
--- trunk/demos/DemoOpticalFlow/simulator/src/main.cpp	(revision 405)
+++ trunk/demos/DemoOpticalFlow/simulator/src/main.cpp	(revision 405)
@@ -0,0 +1,129 @@
+//  created:    2012/04/18
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 6599
+//
+//  version:    $Id: $
+//
+//  purpose:    main simulateur
+//
+//
+/*********************************************************************/
+
+#include <tclap/CmdLine.h>
+#include <Simulator.h>
+#include <X4.h>
+#include <X8.h>
+#include <SimuImu.h>
+#ifdef GL
+#include <SimuCameraGL.h>
+#include <Parser.h>
+#include <SimuUsGL.h>
+#endif
+
+using namespace TCLAP;
+using namespace std;
+using namespace flair::simulator;
+using namespace flair::sensor;
+
+int port;
+int opti_time;
+string xml_file;
+string media_path;
+string scene_file;
+string type;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv)
+{
+  try {
+    CmdLine cmd("Command description message", ' ', "0.1");
+
+    ValueArg<string> nameArg("n", "name", "uav name, also used for vrpn", true, "x4", "string");
+    cmd.add(nameArg);
+
+    ValueArg<string> xmlArg("x", "xml", "xml file", true, "./reglages.xml", "string");
+    cmd.add(xmlArg);
+
+    ValueArg<int> portArg("p", "port", "ground station port", true, 9002, "int");
+    cmd.add(portArg);
+
+    ValueArg<string> addressArg("a", "address", "ground station address", true, "127.0.0.1", "string");
+    cmd.add(addressArg);
+
+    ValueArg<string> typeArg("t", "type", "uav type, x4 or x8", true, "x4", "string");
+    cmd.add(typeArg);
+
+    ValueArg<int> optiArg("o", "opti", "optitrack time ms", false, 0, "int");
+    cmd.add(optiArg);
+
+#ifdef GL
+    ValueArg<string> mediaArg("m", "media", "path to media files", true, "./", "string");
+    cmd.add(mediaArg);
+
+    ValueArg<string> sceneArg("s", "scene", "path to scene file", true, "./voliere.xml", "string");
+    cmd.add(sceneArg);
+#endif
+
+    cmd.parse(argc, argv);
+
+    // Get the value parsed by each arg.
+    port = portArg.getValue();
+    xml_file = xmlArg.getValue();
+    opti_time = optiArg.getValue();
+    type = typeArg.getValue();
+    name = nameArg.getValue();
+    address = addressArg.getValue();
+#ifdef GL
+    media_path = mediaArg.getValue();
+    scene_file = sceneArg.getValue();
+#endif
+
+  } catch(ArgException& e) // catch any exceptions
+  {
+    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+    exit(EXIT_FAILURE);
+  }
+}
+
+int main(int argc, char* argv[])
+{
+  Simulator* simu;
+  Model* drone;
+  SimuImu* imu;
+#ifdef GL
+  SimuUsGL* us_gl;
+
+  SimuCameraGL* cam_bas;
+  Parser* gui;
+#endif
+  parseOptions(argc, argv);
+
+  simu = new Simulator("simulator", opti_time, 90);
+  simu->SetupConnection(address, port);
+  simu->SetupUserInterface(xml_file);
+
+#ifdef GL
+  gui = new Parser(960, 480, 640, 480, media_path, scene_file);
+#endif
+
+  if(type == "x4") {
+    drone = new X4(name, 0);
+  } else {
+    drone = new X8(name, 0);
+  }
+  imu = new SimuImu(drone, "imu", 0,0);
+
+#ifdef GL
+  us_gl = new SimuUsGL(drone, "us", 0,0);
+  cam_bas = new SimuCameraGL(drone, "bottom camera", 320, 240, 640, 0, 0,0);
+#endif
+
+  simu->RunSimu();
+
+  delete simu;
+
+  return 0;
+}
Index: trunk/demos/DemoOpticalFlow/uav/CMakeLists.txt
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/CMakeLists.txt	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/CMakeLists.txt	(revision 405)
@@ -0,0 +1,28 @@
+PROJECT(DemoOpticalFlow)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
+
+if(NOT "${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "armv5te")
+
+SET(FLAIR_USE_FILTER TRUE)
+SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
+SET(FLAIR_USE_VISION_FILTER TRUE)
+SET(FLAIR_USE_META TRUE)
+
+SET(SRC_FILES
+	src/main.cpp
+	src/DemoOpticalFlow.cpp
+)
+
+FLAIR_DEMO(${PROJECT_NAME} "${SRC_FILES}"
+           DEST_DIR DemoOpticalFlow
+           COPY_RESOURCES
+)
+
+else()
+    if(DEFINED CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE)
+        warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture")
+    else()
+        warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
+    endif()
+endif()
Index: trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.sh
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.sh	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.sh	(revision 405)
@@ -0,0 +1,1 @@
+./DemoOpticalFlow_nrt -a 192.168.147.217 -p 9000 -l /tmp -x OpticalFlow_ardrone2.xml -n Drone_0 -t ardrone2 -v ./dspcv_dsp.out
Index: trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.xml
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.xml	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.xml	(revision 405)
@@ -0,0 +1,267 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="x4-multiplex">
+      <TabWidget name="UavMultiplex">
+        <Tab name="Setup">
+          <GroupBox name="x4 multiplex">
+            <ComboBox name="front left blade pitch:" value="1"/>
+          </GroupBox>
+          <GroupBox name="motor attribution">
+            <ComboBox name="front left" value="0"/>
+            <ComboBox name="front rigth" value="1"/>
+            <ComboBox name="rear left" value="2"/>
+            <ComboBox name="rear rigth" value="3"/>
+          </GroupBox>
+          <GroupBox name="bldc">
+            <Label name="flight time"/>
+            <DoubleSpinBox name="min value:" value="0.4"/>
+            <DoubleSpinBox name="max value:" value="1"/>
+            <DoubleSpinBox name="test value:" value="0.2"/>
+            <PushButton name="test motor 0"/>
+            <PushButton name="test motor 1"/>
+            <PushButton name="test motor 2"/>
+            <PushButton name="test motor 3"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Values">
+          <DataPlot1D name="front left" period="100" enabled="0"/>
+          <DataPlot1D name="front right" period="100" enabled="0"/>
+          <DataPlot1D name="rear left" period="100" enabled="0"/>
+          <DataPlot1D name="rear right" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="parrot-us">
+      <TabWidget name="parrot-us">
+        <Tab name="Reglages">
+          <GroupBox name="parrot-us"/>
+          <GroupBox name="Passe bas">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="5"/>
+          </GroupBox>
+          <GroupBox name="Vz">
+            <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+          <DoubleSpinBox name="saturation, -1 to disable:" value="-1"/></GroupBox>
+          <GroupBox name="Passe bas v">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="cutoff frequency" value="10"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Mesures">
+          <DataPlot1D name="parrot-us" period="100" enabled="0"/>
+          <DataPlot1D name="vz" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="parrot-imu">
+      <TabWidget name="parrot-imu">
+        <Tab name="Reglages">
+          <GroupBox name="parrot-imu"><CheckBox name="enable magnetometer (send 0 if unchecked):" value="0"/><Vector3DSpinBox name="magnetic offset (uT)" value_x="0" value_y="0" value_z="0"/><GroupBox name="magnetometers transformation"><DoubleSpinBox name="0,0" value="1"/><DoubleSpinBox name="0,1" value="0"/><DoubleSpinBox name="0,2" value="0"/><DoubleSpinBox name="1,0" value="0"/><DoubleSpinBox name="1,1" value="1"/><DoubleSpinBox name="1,2" value="0"/><DoubleSpinBox name="2,0" value="0"/><DoubleSpinBox name="2,1" value="0"/><DoubleSpinBox name="2,2" value="1"/></GroupBox></GroupBox>
+          <GroupBox name="post rotation">
+            <DoubleSpinBox name="value" value="0"/>
+            <ComboBox name="axis" value="0"/>
+          </GroupBox>
+          <DoubleSpinBox name="k_a[0]:" value="0.5"/>
+          <DoubleSpinBox name="k_a[1]:" value="0.5"/>
+          <DoubleSpinBox name="k_a[2]:" value="0"/>
+          <DoubleSpinBox name="k_b[0]:" value="0.01"/>
+          <DoubleSpinBox name="k_b[1]:" value="0.01"/>
+          <DoubleSpinBox name="k_b[2]:" value="0.01"/>
+        <DoubleSpinBox name="ka[0]:" value="0.5"/><DoubleSpinBox name="ka[1]:" value="0.5"/><DoubleSpinBox name="ka[2]:" value="0"/><DoubleSpinBox name="kb[0]:" value="0.01"/><DoubleSpinBox name="kb[1]:" value="0.01"/><DoubleSpinBox name="kb[2]:" value="0.01"/><DoubleSpinBox name="km[0]:" value="0.01"/><DoubleSpinBox name="km[1]:" value="0.01"/><DoubleSpinBox name="km[2]:" value="0.01"/><Vector3DSpinBox name="ref magnetic field (uT)" value_x="20.5324001312256" value_y="0.236699998378754" value_z="43.6682014465332"/></Tab>
+        <Tab name="AHRS">
+          <DataPlot1D name="roll" period="100" enabled="0"/>
+          <DataPlot1D name="pitch" period="100" enabled="0"/>
+          <DataPlot1D name="yaw" period="100" enabled="0"/>
+          <DataPlot1D name="w_x" period="100" enabled="0"/>
+          <DataPlot1D name="w_y" period="100" enabled="0"/>
+          <DataPlot1D name="w_z" period="100" enabled="0"/>
+        </Tab>
+        <Tab name="IMU">
+          <DataPlot1D name="acc_x" period="100" enabled="0"/>
+          <DataPlot1D name="acc_y" period="100" enabled="0"/>
+          <DataPlot1D name="acc_z" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_x" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_y" period="100" enabled="0"/>
+          <DataPlot1D name="gyr_z" period="100" enabled="0"/>
+          <DataPlot1D name="mag_x" period="100" enabled="0"/>
+          <DataPlot1D name="mag_y" period="100" enabled="0"/>
+          <DataPlot1D name="mag_z" period="100" enabled="0"/>
+        </Tab>
+      <Tab name="Quaternion"><DataPlot1D name="q0" period="100" enabled="0"/><DataPlot1D name="q1" period="100" enabled="0"/><DataPlot1D name="q2" period="100" enabled="0"/><DataPlot1D name="q3" period="100" enabled="0"/></Tab></TabWidget>
+    </Tab>
+    <Tab name="battery">
+      <GroupBox name="battery">
+        <Label name="battery"/>
+        <DoubleSpinBox name="threshold" value="10.5"/>
+      <SpinBox name="threshold time" value="10"/></GroupBox>
+    </Tab>
+    <Tab name="camv">
+      <TabWidget name="camv">
+        <Tab name="Setup">
+          <GroupBox name="camv">
+            <DoubleSpinBox name="gain:" value="0.5"/>
+            <DoubleSpinBox name="exposure:" value="0.5"/>
+            <DoubleSpinBox name="bright:" value="0.5"/>
+            <DoubleSpinBox name="contrast:" value="0.5"/>
+            <DoubleSpinBox name="hue:" value="0.5"/>
+            <DoubleSpinBox name="sharpness:" value="0.5"/>
+            <DoubleSpinBox name="saturation:" value="0.5"/>
+            <CheckBox name="autogain:" value="1"/>
+            <CheckBox name="autoexposure:" value="1"/>
+            <CheckBox name="awb:" value="1"/>
+          <Label name="fps"/></GroupBox>
+          <GridLayout name="setup">
+            <GroupBox name="flux optique">
+              <GroupBox name="post rotation">
+                <DoubleSpinBox name="value" value="90"/>
+                <ComboBox name="axis" value="2"/>
+              </GroupBox>
+              <SpinBox name="max features:" value="64"/>
+            </GroupBox>
+            <GroupBox name="passe bas">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="2"/>
+            </GroupBox>
+            <GroupBox name="sobel along x">
+              <SpinBox name="dx:" value="1"/>
+              <SpinBox name="dy:" value="0"/>
+            </GroupBox>
+            <GroupBox name="threshold">
+              <SpinBox name="threshold:" value="127"/>
+            </GroupBox>
+            <GroupBox name="houghlines">
+              <SpinBox name="full rho step:" value="4"/>
+              <DoubleSpinBox name="full theta step:" value="4"/>
+              <SpinBox name="tracking rho step:" value="4"/>
+              <DoubleSpinBox name="tracking theta step:" value="1"/>
+              <DoubleSpinBox name="tracking delta theta:" value="10"/>
+              <SpinBox name="nb points:" value="100"/>
+            </GroupBox>
+          <GroupBox name="flux optique compense"><SpinBox name="gyro delay (in video frames):" value="2"/><DoubleSpinBox name="gyro gain:" value="300"/></GroupBox><GroupBox name="vitesse du Flux Optique"><DoubleSpinBox name="optical flow quality:" value="5"/><CheckBox name="Weighted average" value="1"/><CheckBox name="Time multiplication" value="1"/></GroupBox><GroupBox name="Speed lowPass"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="1"/></GroupBox><GroupBox name="derivative"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="saturation, -1 to disable:" value="-1"/></GroupBox><GroupBox name="Acceleration lowPass"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="1"/></GroupBox></GridLayout>
+        </Tab>
+        <Tab name="Picture">
+          <Picture name="camv" period="500" enabled="0"/>
+          <Picture name="sobel along x" period="500" enabled="0"/>
+          <Picture name="threshold" period="500" enabled="0"/>
+          <GridLayout name="hough">
+            <DataPlot1D name="distance" period="100" enabled="1"/>
+            <DataPlot1D name="orientation" period="100" enabled="1"/>
+            <DataPlot1D name="line detected" period="100" enabled="1"/>
+          </GridLayout>
+        <DataPlot1D name="distance" period="100" enabled="1"/><DataPlot1D name="orientation" period="100" enabled="1"/><DataPlot1D name="line detected" period="100" enabled="1"/></Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="uav">
+      <GridLayout name="buttons">
+        <PushButton name="kill"/>
+        <PushButton name="start_log"/>
+        <PushButton name="stop_log"/>
+        <PushButton name="take_off"/>
+        <PushButton name="land"/>
+      <PushButton name="start optical flow"/></GridLayout>
+      <GroupBox name="takeoff/landing">
+        <DoubleSpinBox name="desired takeoff altitude" value="0.7"/>
+        <DoubleSpinBox name="desired landing altitude" value="0"/>
+      </GroupBox>
+      <GroupBox name="alt cons">
+        <DoubleSpinBox name="period, 0 for auto:" value="0"/>
+        <DoubleSpinBox name="velocity max (absolute):" value="1"/>
+        <DoubleSpinBox name="acceleration (absolute):" value="0.8"/>
+      </GroupBox>
+    </Tab>
+    <Tab name="control laws">
+      <TabWidget name="laws">
+        <Tab name="Setup">
+          <GroupBox name="u_roll">
+            <DoubleSpinBox name="sat ref:" value="20"/>
+            <DoubleSpinBox name="kp:" value="12"/>
+            <DoubleSpinBox name="sat dref:" value="1000"/>
+            <DoubleSpinBox name="kd:" value="0.2"/>
+            <DoubleSpinBox name="sat u:" value="0.4"/>
+          </GroupBox>
+          <GroupBox name="u_pitch">
+            <DoubleSpinBox name="sat ref:" value="20"/>
+            <DoubleSpinBox name="kp:" value="12"/>
+            <DoubleSpinBox name="sat dref:" value="1000"/>
+            <DoubleSpinBox name="kd:" value="0.2"/>
+            <DoubleSpinBox name="sat u:" value="0.4"/>
+          </GroupBox>
+          <GroupBox name="u_yaw">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.6"/>
+            <DoubleSpinBox name="ki:" value="0.1"/>
+            <DoubleSpinBox name="sat i:" value="0.2"/>
+            <DoubleSpinBox name="kd:" value="0.2"/>
+            <DoubleSpinBox name="sat:" value="0.5"/>
+          </GroupBox>
+          <GroupBox name="u_z">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.6"/>
+            <DoubleSpinBox name="ki:" value="0.2"/>
+            <DoubleSpinBox name="sat i:" value="0.4"/>
+            <DoubleSpinBox name="kd:" value="0.4"/>
+            <DoubleSpinBox name="offset g:" value="0.6"/>
+            <DoubleSpinBox name="sat:" value="1"/>
+            <DoubleSpinBox name="offset step:" value="0.0002"/>
+          </GroupBox>
+          <GroupBox name="u_x">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.015"/>
+            <DoubleSpinBox name="ki:" value="0.02"/>
+            <DoubleSpinBox name="sat i:" value="0.15"/>
+            <DoubleSpinBox name="kd:" value="0"/>
+            <DoubleSpinBox name="sat:" value="0.3"/>
+          </GroupBox>
+          <GroupBox name="u_y">
+            <DoubleSpinBox name="period, 0 for auto" value="0"/>
+            <DoubleSpinBox name="kp:" value="0.015"/>
+            <DoubleSpinBox name="ki:" value="0.02"/>
+            <DoubleSpinBox name="sat i:" value="0.15"/>
+            <DoubleSpinBox name="kd:" value="0"/>
+            <DoubleSpinBox name="sat:" value="0.3"/>
+          </GroupBox>
+        </Tab>
+        <Tab name="Graphes">
+          <DataPlot1D name="u_roll" period="100" enabled="0"/>
+          <DataPlot1D name="u_pitch" period="100" enabled="0"/>
+          <DataPlot1D name="u_yaw" period="100" enabled="0"/>
+          <DataPlot1D name="u_z" period="100" enabled="1"/>
+          <DataPlot1D name="u_x" period="100" enabled="1"/>
+          <DataPlot1D name="u_y" period="100" enabled="0"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="Dualshock3">
+      <TabWidget name="Dualshock3">
+        <Tab name="Reglages">
+          <GroupBox name="consignes joy">
+            <DoubleSpinBox name="debattement roll" value="-15"/>
+            <DoubleSpinBox name="debattement pitch" value="-15"/>
+            <DoubleSpinBox name="debattement wz" value="90"/>
+            <DoubleSpinBox name="debattement dz" value="-0.5"/>
+            <DoubleSpinBox name="trim" value="0.02"/>
+            <Label name="trim roll"/>
+            <PushButton name="reset roll trim"/>
+            <Label name="trim pitch"/>
+            <PushButton name="reset pitch trim"/>
+          </GroupBox>
+          <GroupBox name="consignes fo">
+            <DoubleSpinBox name="debattement x" value="0"/>
+            <DoubleSpinBox name="debattement y" value="0"/>
+            <DoubleSpinBox name="speed step" value="5"/>
+          </GroupBox>
+        </Tab>
+      </TabWidget>
+    </Tab>
+    <Tab name="flux optique">
+      <DataPlot1D name="x_velocity" period="100" enabled="1"/>
+      <DataPlot1D name="y_velocity" period="100" enabled="1"/>
+    <DataPlot1D name="x speed (px/s)" period="100" enabled="0"/><DataPlot1D name="y speed (px/s)" period="100" enabled="0"/></Tab>
+  <Tab name="parrot-pressure"><TabWidget name="parrot-pressure"><Tab name="Setup"><GroupBox name="parrot-pressure"/></Tab><Tab name="Mesures"><DataPlot1D name="parrot-pressure" period="100" enabled="0"/></Tab></TabWidget></Tab><Tab name="camh"><TabWidget name="camh"><Tab name="Setup"><GroupBox name="camh"><DoubleSpinBox name="gain:" value="0.50"/><DoubleSpinBox name="exposure:" value="0.50"/><DoubleSpinBox name="bright:" value="0.50"/><DoubleSpinBox name="contrast:" value="0.50"/><DoubleSpinBox name="hue:" value="0.50"/><DoubleSpinBox name="sharpness:" value="0.50"/><DoubleSpinBox name="saturation:" value="0.50"/><CheckBox name="autogain:" value="0"/><CheckBox name="autoexposure:" value="0"/><CheckBox name="awb:" value="0"/><Label name="fps"/></GroupBox><GridLayout name="setup"/></Tab></TabWidget></Tab><Tab name="real speed"><DataPlot1D name="x speed (m/s)" period="100" enabled="0"/><DataPlot1D name="y speed (m/s)" period="100" enabled="0"/><DataPlot1D name="x acceleration (m/s2)" period="100" enabled="0"/><DataPlot1D name="y acceleration (m/s2)" period="100" enabled="0"/></Tab></TabWidget>
+  <TabWidget name="App_TabWidget">
+    <Tab name="demo_line">
+      <PushButton name="save config on target" value="1"/>
+    </Tab>
+  <Tab name="Drone_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget>
+<PushButton name="save config on target (Drone_0)" value="1"/></root>
Index: trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x4.xml
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x4.xml	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x4.xml	(revision 405)
@@ -0,0 +1,287 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="Dualshock3">
+  <TabWidget name="Dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-10" name="debattement roll"/>
+     <DoubleSpinBox value="-10" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement wz"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   <GroupBox name="consignes fo"><DoubleSpinBox name="debattement x" value="-1"/><DoubleSpinBox name="debattement y" value="1"/></GroupBox></Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="0" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  <Tab name="Quaternion"><DataPlot1D name="q0" period="100" enabled="0"/><DataPlot1D name="q1" period="100" enabled="0"/><DataPlot1D name="q2" period="100" enabled="0"/><DataPlot1D name="q3" period="100" enabled="0"/></Tab><Tab name="IMU"><DataPlot1D name="acc_x" period="100" enabled="0"/><DataPlot1D name="acc_y" period="100" enabled="0"/><DataPlot1D name="acc_z" period="100" enabled="0"/><DataPlot1D name="gyr_x" period="100" enabled="0"/><DataPlot1D name="gyr_y" period="100" enabled="0"/><DataPlot1D name="gyr_z" period="100" enabled="0"/><DataPlot1D name="mag_x" period="100" enabled="0"/><DataPlot1D name="mag_y" period="100" enabled="0"/><DataPlot1D name="mag_z" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="0" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup">
+     <GroupBox name="flux optique">
+      <SpinBox value="64" name="max features:"/>
+     <GroupBox name="post rotation"><DoubleSpinBox name="value" value="90"/><ComboBox name="axis" value="2"/></GroupBox></GroupBox>
+     <GroupBox name="passe bas">
+      <DoubleSpinBox value="0" name="period, 0 for auto"/>
+      <DoubleSpinBox value="1" name="cutoff frequency"/>
+     </GroupBox>
+    <GroupBox name="derivative"><DoubleSpinBox name="period, 0 for auto:" value="0.02"/></GroupBox><GroupBox name="Speed lowPass"><DoubleSpinBox name="period, 0 for auto" value="0.02"/><DoubleSpinBox name="cutoff frequency" value="2"/></GroupBox><GroupBox name="Acceleration lowPass"><DoubleSpinBox name="period, 0 for auto" value="0.02"/><DoubleSpinBox name="cutoff frequency" value="2"/></GroupBox><GroupBox name="flux optique compens&#xE9;"><SpinBox name="gyro delay (in video frames):" value="2"/></GroupBox></GridLayout>
+   </Tab>
+   <Tab name="Picture">
+    <Picture name="simu_cam_v" period="200" enabled="0">
+     <Setup period="50" enabled="1"/>
+    </Picture>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="1" name="take_off"/>
+   <PushButton value="0" name="land"/>
+  <PushButton name="start optical flow"/></GridLayout>
+  <GroupBox name="takeoff/landing">
+   <DoubleSpinBox value="1" name="desired takeoff altitude"/>
+   <DoubleSpinBox value="0" name="desired landing altitude"/>
+  </GroupBox>
+  <GroupBox name="alt cons">
+   <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+   <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+   <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="1" name="sat i:"/>
+     <DoubleSpinBox value="0.005" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="1" name="sat i:"/>
+     <DoubleSpinBox value="0.005" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="flux optique">
+  <DataPlot1D name="x_velocity" period="100" enabled="1">
+   <Setup period="100" enabled="1"/>
+  </DataPlot1D>
+  <DataPlot1D name="y_velocity" period="100" enabled="1">
+   <Setup period="100" enabled="1"/>
+  </DataPlot1D>
+ <DataPlot1D name="x_velocity_derivative" period="100" enabled="1"/><DataPlot1D name="y_velocity_derivative" period="100" enabled="1"/><DataPlot1D name="x_acceleration" period="100" enabled="1"/><DataPlot1D name="y_acceleration" period="100" enabled="1"/><DataPlot1D name="x speed (px/s)" period="100" enabled="1"/><DataPlot1D name="y speed (px/s)" period="100" enabled="1"/><DataPlot1D name="x movement first point" period="100" enabled="0"/><DataPlot1D name="y movement first point" period="100" enabled="0"/></Tab>
+  <Tab name="real speed"><DataPlot1D name="x speed (m/s)" period="100" enabled="1"/><DataPlot1D name="y speed (m/s)" period="100" enabled="1"/><DataPlot1D name="x acceleration (m/s2)" period="100" enabled="0"/><DataPlot1D name="y acceleration (m/s2)" period="100" enabled="0"/></Tab></TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x4_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (x4_0)" value="1"/></root>
Index: trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x8.xml
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x8.xml	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/core2-64/setup_x8.xml	(revision 405)
@@ -0,0 +1,287 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="Dualshock3">
+  <TabWidget name="Dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement wz"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   <GroupBox name="consignes fo"><DoubleSpinBox name="debattement x" value="-1"/><DoubleSpinBox name="debattement y" value="1"/></GroupBox></Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="0" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    <ComboBox name="top front left" value="0"/><ComboBox name="top front rigth" value="1"/><ComboBox name="top rear left" value="2"/><ComboBox name="top rear rigth" value="3"/><ComboBox name="bottom front left" value="4"/><ComboBox name="bottom front rigth" value="5"/><ComboBox name="bottom rear left" value="6"/><ComboBox name="bottom rear rigth" value="7"/></GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    <PushButton name="test motor 4"/><PushButton name="test motor 5"/><PushButton name="test motor 6"/><PushButton name="test motor 7"/></GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   <GroupBox name="x8 multiplex"><ComboBox name="top front left blade pitch:" value="0"/></GroupBox></Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="0" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup">
+     <GroupBox name="flux optique">
+      <SpinBox value="64" name="max features:"/>
+     <GroupBox name="post rotation"><DoubleSpinBox name="value" value="90"/><ComboBox name="axis" value="2"/></GroupBox></GroupBox>
+     <GroupBox name="passe bas">
+      <DoubleSpinBox value="0" name="period, 0 for auto"/>
+      <DoubleSpinBox value="1" name="cutoff frequency"/>
+     </GroupBox>
+    </GridLayout>
+   </Tab>
+   <Tab name="Picture">
+    <Picture name="simu_cam_v">
+     <Setup period="50" enabled="1"/>
+    </Picture>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="1" name="take_off"/>
+   <PushButton value="0" name="land"/>
+  </GridLayout>
+  <GroupBox name="takeoff/landing">
+   <DoubleSpinBox value="1" name="desired takeoff altitude"/>
+   <DoubleSpinBox value="0" name="desired landing altitude"/>
+  </GroupBox>
+  <GroupBox name="alt cons">
+   <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+   <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+   <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.03" name="kp:"/>
+     <DoubleSpinBox value="0.020" name="ki:"/>
+     <DoubleSpinBox value="0.2" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.03" name="kp:"/>
+     <DoubleSpinBox value="0.020" name="ki:"/>
+     <DoubleSpinBox value="0.2" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="flux optique">
+  <DataPlot1D name="x_velocity" period="100" enabled="1">
+   <Setup period="100" enabled="1"/>
+  </DataPlot1D>
+  <DataPlot1D name="y_velocity" period="100" enabled="1">
+   <Setup period="100" enabled="1"/>
+  </DataPlot1D>
+ </Tab>
+  </TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x4_0"><PushButton name="save config on target" value="1"/></Tab><Tab name="x8_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x4.sh
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x4.sh	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x4.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoOpticalFlow_rt
+else
+	EXEC=./DemoOpticalFlow_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu -v dsp_stub
Index: trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x8.sh
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x8.sh	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/resources/core2-64/x8.sh	(revision 405)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./DemoOpticalFlow_rt
+else
+	EXEC=./DemoOpticalFlow_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x8.xml -t x8_simu -v dsp_stub
Index: trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.cpp
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 405)
@@ -0,0 +1,200 @@
+//  created:    2011/05/01
+//  filename:   DemoOpticalFlow.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo optical flow
+//
+//
+/*********************************************************************/
+
+#include "DemoOpticalFlow.h"
+#include <Uav.h>
+#include <Camera.h>
+#include <V4LCamera.h>
+#include <CvtColor.h>
+#include <OpticalFlow.h>
+#include <OpticalFlowCompensated.h>
+#include <OpticalFlowSpeed.h>
+#include <LowPassFilter.h>
+#include <EulerDerivative.h>
+#include <Matrix.h>
+#include <GridLayout.h>
+#include <DataPlot1D.h>
+#include <Tab.h>
+#include <TabWidget.h>
+#include <GroupBox.h>
+#include <DoubleSpinBox.h>
+#include <PushButton.h>
+#include <FrameworkManager.h>
+#include <MetaDualShock3.h>
+#include <Vector2D.h>
+#include <AhrsData.h>
+#include <Ahrs.h>
+#include <Pid.h>
+
+#include <stdio.h>
+
+using namespace std;
+using namespace flair::core;
+using namespace flair::gui;
+using namespace flair::filter;
+using namespace flair::meta;
+using namespace flair::sensor;
+
+DemoOpticalFlow::DemoOpticalFlow(TargetController *controller): UavStateMachine(controller) {
+    Uav* uav=GetUav();
+	if (uav->GetVerticalCamera() == NULL) {
+				Err("no vertical camera found\n");
+        exit(1);
+    }
+	
+	startOpticalflow=new PushButton(GetButtonsLayout()->NewRow(),"start optical flow");
+
+	greyCameraImage=new CvtColor(uav->GetVerticalCamera(),"gray",CvtColor::Conversion_t::ToGray);
+
+	uav->GetVerticalCamera()->UseDefaultPlot(greyCameraImage->Output());
+
+	//optical flow stack
+  //opticalFlow= matrice de déplacements en pixels entre 2 images consécutives
+  opticalFlow=new OpticalFlow(greyCameraImage,uav->GetVerticalCamera()->GetLayout()->NewRow(),"flux optique");
+  opticalFlowCompensated=new OpticalFlowCompensated(opticalFlow,uav->GetAhrs(),uav->GetVerticalCamera()->GetLayout()->NewRow(),"flux optique compense");
+  opticalFlowSpeedRaw=new OpticalFlowSpeed(opticalFlowCompensated,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)
+  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);
+  opticalFlowAcceleration=new LowPassFilter(opticalFlowAccelerationRaw,uav->GetVerticalCamera()->GetLayout()->NewRow(),"Acceleration lowPass",twoByOneOFA);
+  
+  getFrameworkManager()->AddDeviceToLog(opticalFlowSpeedRaw);
+
+  Tab* opticalFlowTab=new Tab(getFrameworkManager()->GetTabWidget(),"flux optique");
+  DataPlot1D* xVelocityPlot=new DataPlot1D(opticalFlowTab->NewRow(),"x speed (px/s)",-250,250);
+  DataPlot1D* yVelocityPlot=new DataPlot1D(opticalFlowTab->LastRowLastCol(),"y speed (px/s)",-250,250);
+  
+  xVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(0,0));
+  xVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(0,0),DataPlot::Blue);
+  yVelocityPlot->AddCurve(opticalFlowSpeedRaw->Output()->Element(1,0));
+  yVelocityPlot->AddCurve(opticalFlowSpeed->GetMatrix()->Element(1,0),DataPlot::Blue);
+  
+  u_x=new Pid(setupLawTab->At(1,0),"u_x");
+  u_x->UseDefaultPlot(graphLawTab->NewRow());
+  u_y=new Pid(setupLawTab->At(1,1),"u_y");
+  u_y->UseDefaultPlot(graphLawTab->LastRowLastCol());
+
+  opticalFlowGroupBox=new GroupBox(GetTargetController()->GetTab()->NewRow(),"consignes fo");
+  maxXSpeed=new DoubleSpinBox(opticalFlowGroupBox->NewRow(),"debattement x"," m/s",-5,5,0.1,1);
+  maxYSpeed=new DoubleSpinBox(opticalFlowGroupBox->LastRowLastCol(),"debattement y"," m/s",-5,5,0.1,1);
+  
+  Tab* opticalFlowRealTab=new Tab(getFrameworkManager()->GetTabWidget(),"real speed");
+  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);
+  DataPlot1D* xRealAccelerationPlot=new DataPlot1D(opticalFlowRealTab->NewRow(),"x acceleration (m/s2)",-2,2);
+  DataPlot1D* yRealAccelerationPlot=new DataPlot1D(opticalFlowRealTab->LastRowLastCol(),"y acceleration (m/s2)",-2,2);
+  xRealVelocityPlot->AddCurve(opticalFlowRealSpeed->Element(0));
+  xRealVelocityPlot->AddCurve(opticalFlowReference->Element(0),DataPlot::Blue,"consigne");
+  yRealVelocityPlot->AddCurve(opticalFlowRealSpeed->Element(1));
+  yRealVelocityPlot->AddCurve(opticalFlowReference->Element(1),DataPlot::Blue,"consigne");
+  xRealAccelerationPlot->AddCurve(opticalFlowRealAcceleration->Element(0));
+  yRealAccelerationPlot->AddCurve(opticalFlowRealAcceleration->Element(1));
+
+  customReferenceOrientation= new AhrsData(this,"reference");
+  uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow);
+  AddDataToControlLawLog(customReferenceOrientation);
+  
+  flagCameraLost=false;
+}
+
+void DemoOpticalFlow::SignalEvent(Event_t event) {
+    UavStateMachine::SignalEvent(event);
+    switch(event) {
+    case Event_t::EnteringControlLoop:
+        opticalFlowReference->SetValue(0,0,GetTargetController()->GetAxisValue(1)*maxXSpeed->Value());//joy axis 0 maps to x displacement
+        opticalFlowReference->SetValue(1,0,GetTargetController()->GetAxisValue(0)*maxYSpeed->Value());//joy axis 1 maps to y displacement
+        float focal=271.76;
+        float z,dz;
+        AltitudeValues(z, dz);
+        float scale=z/focal;
+        opticalFlowRealSpeed->SetValue(0,0,opticalFlowSpeed->Output(0,0)*scale);
+        opticalFlowRealSpeed->SetValue(1,0,opticalFlowSpeed->Output(1,0)*scale);
+        opticalFlowRealAcceleration->SetValue(0,0,opticalFlowAcceleration->Output(0,0)*scale);
+        opticalFlowRealAcceleration->SetValue(1,0,opticalFlowAcceleration->Output(1,0)*scale);
+        break;
+    }
+}
+
+void DemoOpticalFlow::StartOpticalFlow(void) {
+	if (SetOrientationMode(OrientationMode_t::Custom)) {
+			Thread::Info("(Re)entering optical flow mode\n");
+			u_x->Reset();
+			u_y->Reset();
+	} else {
+			Thread::Warn("Could not enter optical flow mode\n");
+	}
+}
+
+void DemoOpticalFlow::ExtraCheckPushButton(void) {
+	if(startOpticalflow->Clicked()) {
+            StartOpticalFlow();
+	}
+}
+
+void DemoOpticalFlow::ExtraCheckJoystick(void) {
+    static bool wasOpticalFlowModeButtonPressed=false;
+    // controller button R1 enters optical flow mode
+    if(GetTargetController()->IsButtonPressed(9)) { // R1
+        if (!wasOpticalFlowModeButtonPressed) {
+            wasOpticalFlowModeButtonPressed=true;
+            StartOpticalFlow();
+        }
+    } else {
+        wasOpticalFlowModeButtonPressed=false;
+    }
+}
+
+const AhrsData *DemoOpticalFlow::GetReferenceOrientation(void) {
+    Euler refAngles=GetDefaultReferenceOrientation()->GetQuaternion().ToEuler();//to keep default yaw reference
+
+    // /!\ in this demo, the target value is a speed (in m/s). As a consequence the error is the difference between the current speed and the target speed
+    Vector2Df error, errorVariation; // in Uav coordinate system
+
+    error.x=opticalFlowRealSpeed->Value(0,0)-opticalFlowReference->Value(0,0);
+    error.y=opticalFlowRealSpeed->Value(1,0)-opticalFlowReference->Value(1,0);
+    errorVariation.x=opticalFlowRealAcceleration->Value(0,0);
+    errorVariation.y=opticalFlowRealAcceleration->Value(1,0);
+//Printf("Altitude=%f, Error=(%f,%f)\n",z,error.x,error.y);
+
+    u_x->SetValues(error.x, errorVariation.x);
+    u_x->Update(GetTime());
+    refAngles.pitch=u_x->Output();
+
+    u_y->SetValues(error.y, errorVariation.y);
+    u_y->Update(GetTime());
+    refAngles.roll=-u_y->Output();
+
+    customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(),Vector3Df(0,0,0));
+
+    return customReferenceOrientation;
+}
+
+void DemoOpticalFlow::ExtraSecurityCheck(void) {
+  if(GetUav()->GetType()=="hds_x8") {
+    if(((V4LCamera*)GetUav()->GetVerticalCamera())->HasProblems() && !flagCameraLost) {
+      flagCameraLost = true;
+      Thread::Err("Camera lost\n");
+      SafeStop();
+      Land();
+    }
+  }
+}
+
+DemoOpticalFlow::~DemoOpticalFlow() {
+}
Index: trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.h
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.h	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/src/DemoOpticalFlow.h	(revision 405)
@@ -0,0 +1,75 @@
+//  created:    2011/05/01
+//  filename:   DemoOpticalFlow.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo optical flow
+//
+//
+/*********************************************************************/
+//------------
+
+#ifndef DEMOOPTICALFLOW_H
+#define DEMOOPTICALFLOW_H
+
+#include <UavStateMachine.h>
+
+namespace flair {
+    namespace core {
+        class Matrix;
+    }
+    namespace gui {
+        class GroupBox;
+        class DoubleSpinBox;
+        class PushButton;
+    }
+    namespace filter {
+        class OpticalFlow;
+        class OpticalFlowCompensated;
+        class OpticalFlowSpeed;
+        class LowPassFilter;
+        class EulerDerivative;
+        class CvtColor;
+    }
+    namespace sensor {
+        class TargetController;
+    }
+}
+
+class DemoOpticalFlow : public flair::meta::UavStateMachine {
+
+    public:
+        DemoOpticalFlow(flair::sensor::TargetController *controller);
+        ~DemoOpticalFlow();
+
+    protected:
+        void SignalEvent(Event_t event);
+        void ExtraCheckJoystick(void);
+    void ExtraCheckPushButton(void);
+    void ExtraSecurityCheck(void);
+        const flair::core::AhrsData *GetReferenceOrientation(void);
+
+        flair::gui::GroupBox* opticalFlowGroupBox;
+        flair::gui::DoubleSpinBox *maxXSpeed,*maxYSpeed;
+        flair::core::Matrix *opticalFlowReference;
+        flair::filter::Pid *u_x, *u_y;
+        flair::filter::CvtColor* greyCameraImage;
+        flair::core::AhrsData *customReferenceOrientation;
+        flair::core::Matrix *opticalFlowRealSpeed,*opticalFlowRealAcceleration;
+
+    private:
+        flair::filter::OpticalFlow *opticalFlow;
+        flair::filter::OpticalFlowCompensated *opticalFlowCompensated;
+        flair::filter::OpticalFlowSpeed *opticalFlowSpeedRaw;
+        flair::filter::EulerDerivative *opticalFlowAccelerationRaw;
+        flair::gui::PushButton *startOpticalflow,*stopOpticalflow;
+        void StartOpticalFlow(void);
+        flair::filter::LowPassFilter* opticalFlowSpeed;
+        flair::filter::LowPassFilter* opticalFlowAcceleration;
+        bool flagCameraLost;
+};
+
+#endif // DEMOOPTICALFLOW_H
Index: trunk/demos/DemoOpticalFlow/uav/src/main.cpp
===================================================================
--- trunk/demos/DemoOpticalFlow/uav/src/main.cpp	(revision 405)
+++ trunk/demos/DemoOpticalFlow/uav/src/main.cpp	(revision 405)
@@ -0,0 +1,112 @@
+//  created:    2011/05/01
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    exemple de code x4
+//
+//
+/*********************************************************************/
+
+#include "DemoOpticalFlow.h"
+#include <UavFactory.h>
+#include <FrameworkManager.h>
+#include <stdio.h>
+#include <tclap/CmdLine.h>
+#include <TargetEthController.h>
+#include <VisionFilter.h>
+
+using namespace TCLAP;
+using namespace std;
+using namespace flair::core;
+using namespace flair::meta;
+using namespace flair::sensor;
+
+string uav_type;
+string dsp_file;
+string log_path;
+int port;
+int ds3port;
+string xml_file;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv);
+
+
+int main(int argc, char* argv[]) {
+    parseOptions(argc,argv);
+
+		if(!InitVisionFilter("file="+dsp_file)) {
+			exit(1);
+		}
+		
+    FrameworkManager *manager;
+    manager= new FrameworkManager(name);
+    manager->SetupConnection(address,port);
+    manager->SetupUserInterface(xml_file);
+    manager->SetupLogger(log_path);
+
+    Uav* drone=CreateUav(name,uav_type);
+    TargetEthController *controller=new TargetEthController("Dualshock3",ds3port);
+    DemoOpticalFlow* demo=new DemoOpticalFlow(controller);
+
+    demo->Start();
+    demo->Join();
+
+    delete manager;
+
+    CloseVisionFilter();
+}
+
+void parseOptions(int argc, char** argv)
+{
+	try
+	{
+
+        CmdLine cmd("Command description message", ' ', "0.1");
+
+        ValueArg<string> nameArg("n","name","uav name",true,"x4","string");
+        cmd.add( nameArg );
+
+        ValueArg<string> typeArg("t","type","uav type: ardrone2, hds_x4, hds_x8, hds_xufo, hds_simu or hds_simux (with x the number of the simulated uav)",true,"hds_x4","string");
+        cmd.add( typeArg );
+
+        ValueArg<string> dspArg("v","dsp","executable dsp",true,"./dspcv_dsp.out","string");
+        cmd.add( dspArg );
+
+        ValueArg<string> xmlArg("x","xml","fichier xml",true,"./reglages.xml","string");
+        cmd.add( xmlArg );
+
+        ValueArg<string> logsArg("l","logs","repertoire des logs",true,"/media/ram","string");
+        cmd.add( logsArg );
+
+        ValueArg<int> portArg("p","port","port pour station sol",true,9000,"int");
+        cmd.add( portArg );
+
+        ValueArg<string> addressArg("a","address","addresse station sol",true,"127.0.0.1","string");
+        cmd.add( addressArg );
+
+        ValueArg<int> ds3portArg("d","ds3_port","port pour ds3",false,20000,"int");
+        cmd.add( ds3portArg );
+
+        cmd.parse( argc, argv );
+
+        // Get the value parsed by each arg.
+        uav_type=typeArg.getValue();
+        dsp_file = dspArg.getValue();
+        log_path = logsArg.getValue();
+        port=portArg.getValue();
+        ds3port=ds3portArg.getValue();
+        xml_file = xmlArg.getValue();
+        name=nameArg.getValue();
+        address=addressArg.getValue();
+
+	} catch (ArgException &e) {
+        cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+        exit(EXIT_FAILURE);
+    }
+}
Index: trunk/demos/Sinus/resources/armv5te/Sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/armv5te/Sinus.xml	(revision 404)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0"?>
-<root name="FrameworkManager">
-  <TabWidget name="Main_TabWidget">
-    <Tab name="Loop">
-      <PushButton name="kill"/>
-      <PushButton name="start_log"/>
-      <PushButton name="stop_log"/>
-      <SpinBox name="period thread:" value="10"/>
-    </Tab>
-    <Tab name="sinus">
-      <TabWidget name="sinus">
-        <Tab name="Settings">
-          <GroupBox name="sinus">
-            <DoubleSpinBox name="frequence:" value="1.00"/>
-            <DoubleSpinBox name="amplitude:" value="1.00"/>
-            <DoubleSpinBox name="offset:" value="8.00"/>
-          </GroupBox>
-          <SpinBox name="period thread:" value="10"/>
-          <GridLayout name="setup">
-            <GroupBox name="1st order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="3rd order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="Mean filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-            <GroupBox name="Mean filter on 1st order lawpass filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-          </GridLayout>
-        </Tab>
-        <Tab name="Graph">
-          <DataPlot1D name="Sinus" period="100" enabled="1"/>
-        </Tab>
-      </TabWidget>
-    </Tab>
-  </TabWidget>
-  <PushButton name="save config on target (Sinus)" value="1"/>
-</root>
Index: trunk/demos/Sinus/resources/armv5te/sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/armv5te/sinus.xml	(revision 405)
+++ trunk/demos/Sinus/resources/armv5te/sinus.xml	(revision 405)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="Loop">
+      <PushButton name="kill"/>
+      <PushButton name="start_log"/>
+      <PushButton name="stop_log"/>
+      <SpinBox name="period thread:" value="10"/>
+    </Tab>
+    <Tab name="sinus">
+      <TabWidget name="sinus">
+        <Tab name="Settings">
+          <GroupBox name="sinus">
+            <DoubleSpinBox name="frequence:" value="1.00"/>
+            <DoubleSpinBox name="amplitude:" value="1.00"/>
+            <DoubleSpinBox name="offset:" value="8.00"/>
+          </GroupBox>
+          <SpinBox name="period thread:" value="10"/>
+          <GridLayout name="setup">
+            <GroupBox name="1st order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="3rd order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="Mean filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+            <GroupBox name="Mean filter on 1st order lawpass filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+          </GridLayout>
+        </Tab>
+        <Tab name="Graph">
+          <DataPlot1D name="Sinus" period="100" enabled="1"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <PushButton name="save config on target (Sinus)" value="1"/>
+</root>
Index: trunk/demos/Sinus/resources/armv7a-neon/Sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/armv7a-neon/Sinus.xml	(revision 404)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0"?>
-<root name="FrameworkManager">
-  <TabWidget name="Main_TabWidget">
-    <Tab name="Loop">
-      <PushButton name="kill"/>
-      <PushButton name="start_log"/>
-      <PushButton name="stop_log"/>
-      <SpinBox name="period thread:" value="10"/>
-    </Tab>
-    <Tab name="sinus">
-      <TabWidget name="sinus">
-        <Tab name="Settings">
-          <GroupBox name="sinus">
-            <DoubleSpinBox name="frequence:" value="1.00"/>
-            <DoubleSpinBox name="amplitude:" value="1.00"/>
-            <DoubleSpinBox name="offset:" value="8.00"/>
-          </GroupBox>
-          <SpinBox name="period thread:" value="10"/>
-          <GridLayout name="setup">
-            <GroupBox name="1st order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="3rd order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="Mean filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-            <GroupBox name="Mean filter on 1st order lawpass filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-          </GridLayout>
-        </Tab>
-        <Tab name="Graph">
-          <DataPlot1D name="Sinus" period="100" enabled="1"/>
-        </Tab>
-      </TabWidget>
-    </Tab>
-  </TabWidget>
-  <PushButton name="save config on target (Sinus)" value="1"/>
-</root>
Index: trunk/demos/Sinus/resources/armv7a-neon/sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/armv7a-neon/sinus.xml	(revision 405)
+++ trunk/demos/Sinus/resources/armv7a-neon/sinus.xml	(revision 405)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="Loop">
+      <PushButton name="kill"/>
+      <PushButton name="start_log"/>
+      <PushButton name="stop_log"/>
+      <SpinBox name="period thread:" value="10"/>
+    </Tab>
+    <Tab name="sinus">
+      <TabWidget name="sinus">
+        <Tab name="Settings">
+          <GroupBox name="sinus">
+            <DoubleSpinBox name="frequence:" value="1.00"/>
+            <DoubleSpinBox name="amplitude:" value="1.00"/>
+            <DoubleSpinBox name="offset:" value="8.00"/>
+          </GroupBox>
+          <SpinBox name="period thread:" value="10"/>
+          <GridLayout name="setup">
+            <GroupBox name="1st order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="3rd order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="Mean filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+            <GroupBox name="Mean filter on 1st order lawpass filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+          </GridLayout>
+        </Tab>
+        <Tab name="Graph">
+          <DataPlot1D name="Sinus" period="100" enabled="1"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <PushButton name="save config on target (Sinus)" value="1"/>
+</root>
Index: trunk/demos/Sinus/resources/core2-64/Sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/core2-64/Sinus.xml	(revision 404)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0"?>
-<root name="FrameworkManager">
-  <TabWidget name="Main_TabWidget">
-    <Tab name="Loop">
-      <PushButton name="kill"/>
-      <PushButton name="start_log"/>
-      <PushButton name="stop_log"/>
-      <SpinBox name="period thread:" value="10"/>
-    </Tab>
-    <Tab name="sinus">
-      <TabWidget name="sinus">
-        <Tab name="Settings">
-          <GroupBox name="sinus">
-            <DoubleSpinBox name="frequence:" value="1.00"/>
-            <DoubleSpinBox name="amplitude:" value="1.00"/>
-            <DoubleSpinBox name="offset:" value="8.00"/>
-          </GroupBox>
-          <SpinBox name="period thread:" value="10"/>
-          <GridLayout name="setup">
-            <GroupBox name="1st order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="3rd order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="Mean filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-            <GroupBox name="Mean filter on 1st order lawpass filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-          </GridLayout>
-        </Tab>
-        <Tab name="Graph">
-          <DataPlot1D name="Sinus" period="100" enabled="1"/>
-        </Tab>
-      </TabWidget>
-    </Tab>
-  </TabWidget>
-  <PushButton name="save config on target (Sinus)" value="1"/>
-</root>
Index: trunk/demos/Sinus/resources/core2-64/sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/core2-64/sinus.xml	(revision 405)
+++ trunk/demos/Sinus/resources/core2-64/sinus.xml	(revision 405)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="Loop">
+      <PushButton name="kill"/>
+      <PushButton name="start_log"/>
+      <PushButton name="stop_log"/>
+      <SpinBox name="period thread:" value="10"/>
+    </Tab>
+    <Tab name="sinus">
+      <TabWidget name="sinus">
+        <Tab name="Settings">
+          <GroupBox name="sinus">
+            <DoubleSpinBox name="frequence:" value="1.00"/>
+            <DoubleSpinBox name="amplitude:" value="1.00"/>
+            <DoubleSpinBox name="offset:" value="8.00"/>
+          </GroupBox>
+          <SpinBox name="period thread:" value="10"/>
+          <GridLayout name="setup">
+            <GroupBox name="1st order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="3rd order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="Mean filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+            <GroupBox name="Mean filter on 1st order lawpass filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+          </GridLayout>
+        </Tab>
+        <Tab name="Graph">
+          <DataPlot1D name="Sinus" period="100" enabled="1"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <PushButton name="save config on target (Sinus)" value="1"/>
+</root>
Index: trunk/demos/Sinus/resources/cortexa7thf-neon-vfpv4/Sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/cortexa7thf-neon-vfpv4/Sinus.xml	(revision 404)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0"?>
-<root name="FrameworkManager">
-  <TabWidget name="Main_TabWidget">
-    <Tab name="Loop">
-      <PushButton name="kill"/>
-      <PushButton name="start_log"/>
-      <PushButton name="stop_log"/>
-      <SpinBox name="period thread:" value="10"/>
-    </Tab>
-    <Tab name="sinus">
-      <TabWidget name="sinus">
-        <Tab name="Settings">
-          <GroupBox name="sinus">
-            <DoubleSpinBox name="frequence:" value="1.00"/>
-            <DoubleSpinBox name="amplitude:" value="1.00"/>
-            <DoubleSpinBox name="offset:" value="8.00"/>
-          </GroupBox>
-          <SpinBox name="period thread:" value="10"/>
-          <GridLayout name="setup">
-            <GroupBox name="1st order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="3rd order lawpass filter">
-              <DoubleSpinBox name="period, 0 for auto" value="0"/>
-              <DoubleSpinBox name="cutoff frequency" value="1"/>
-            </GroupBox>
-            <GroupBox name="Mean filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-            <GroupBox name="Mean filter on 1st order lawpass filter">
-              <SpinBox name="numberOfElements:" value="10"/>
-            </GroupBox>
-          </GridLayout>
-        </Tab>
-        <Tab name="Graph">
-          <DataPlot1D name="Sinus" period="100" enabled="1"/>
-        </Tab>
-      </TabWidget>
-    </Tab>
-  </TabWidget>
-  <PushButton name="save config on target (Sinus)" value="1"/>
-</root>
Index: trunk/demos/Sinus/resources/cortexa7thf-neon-vfpv4/sinus.xml
===================================================================
--- trunk/demos/Sinus/resources/cortexa7thf-neon-vfpv4/sinus.xml	(revision 405)
+++ trunk/demos/Sinus/resources/cortexa7thf-neon-vfpv4/sinus.xml	(revision 405)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<root name="FrameworkManager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="Loop">
+      <PushButton name="kill"/>
+      <PushButton name="start_log"/>
+      <PushButton name="stop_log"/>
+      <SpinBox name="period thread:" value="10"/>
+    </Tab>
+    <Tab name="sinus">
+      <TabWidget name="sinus">
+        <Tab name="Settings">
+          <GroupBox name="sinus">
+            <DoubleSpinBox name="frequence:" value="1.00"/>
+            <DoubleSpinBox name="amplitude:" value="1.00"/>
+            <DoubleSpinBox name="offset:" value="8.00"/>
+          </GroupBox>
+          <SpinBox name="period thread:" value="10"/>
+          <GridLayout name="setup">
+            <GroupBox name="1st order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="3rd order lawpass filter">
+              <DoubleSpinBox name="period, 0 for auto" value="0"/>
+              <DoubleSpinBox name="cutoff frequency" value="1"/>
+            </GroupBox>
+            <GroupBox name="Mean filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+            <GroupBox name="Mean filter on 1st order lawpass filter">
+              <SpinBox name="numberOfElements:" value="10"/>
+            </GroupBox>
+          </GridLayout>
+        </Tab>
+        <Tab name="Graph">
+          <DataPlot1D name="Sinus" period="100" enabled="1"/>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <PushButton name="save config on target (Sinus)" value="1"/>
+</root>
Index: trunk/demos/Sinus/src/main.cpp
===================================================================
--- trunk/demos/Sinus/src/main.cpp	(revision 404)
+++ trunk/demos/Sinus/src/main.cpp	(revision 405)
@@ -65,5 +65,5 @@
 
     // setup xml file, ./Sinus.xml by default
-    ValueArg<string> xmlArg("x", "xml", "xml file", false, "./Sinus.xml",
+    ValueArg<string> xmlArg("x", "xml", "xml file", false, "./sinus.xml",
                             "string");
     cmd.add(xmlArg);
Index: trunk/scripts/clone_demo.sh
===================================================================
--- trunk/scripts/clone_demo.sh	(revision 404)
+++ trunk/scripts/clone_demo.sh	(revision 405)
@@ -63,10 +63,10 @@
 fi
 
+if [ -d ${2} ];then
+    err "output ${2} directory already exists"
+fi
+
 echo cloning ${1} to ${2}
-
-warn "erasing output for debug"
-rm -rf ./${2}
 cp -r ${1} ./${2}
-
 cd ./${2}
 
