Index: trunk/ReleaseNotes
===================================================================
--- trunk/ReleaseNotes	(revision 33)
+++ trunk/ReleaseNotes	(revision 33)
@@ -0,0 +1,10 @@
+* Actual Version:
+
+- tool/FlairGCS: added rx rate display
+- demos/SimpleFleet: new demo, 2 UAVs coordination
+
+-----------------------------------------------------------
+* Tag 0.0.1:
+
+-original commit
+
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh	(revision 32)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh	(revision 33)
@@ -1,5 +1,5 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh	(revision 32)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh	(revision 33)
@@ -1,5 +1,5 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
Index: trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh	(revision 32)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh	(revision 33)
@@ -1,10 +1,10 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
-	EXEC=./demo_optitrack_rt
+	EXEC=./CircleFollower_rt
 else
-	EXEC=./demo_optitrack_nrt
+	EXEC=./CircleFollower_nrt
 fi
 
Index: trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh	(revision 32)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh	(revision 33)
@@ -1,11 +1,11 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
-	EXEC=./demo_optitrack_rt
+	EXEC=./CircleFollower_rt
 else
-	EXEC=./demo_optitrack_nrt
+	EXEC=./CircleFollower_nrt
 fi
 
-$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x8.xml -t x8_simu
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 32)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 33)
@@ -1,5 +1,5 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 32)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 33)
@@ -1,5 +1,5 @@
 #! /bin/bash
 
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
Index: trunk/demos/SimpleFleet/simulator/CMakeLists.txt
===================================================================
--- trunk/demos/SimpleFleet/simulator/CMakeLists.txt	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/CMakeLists.txt	(revision 33)
@@ -0,0 +1,35 @@
+PROJECT(SimpleFleet_simulator)
+cmake_minimum_required(VERSION 2.8)
+
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+SET(FLAIR_USE_SIMULATOR TRUE)
+SET(FLAIR_USE_SIMULATOR_GL TRUE)
+
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+include(${FLAIR_USE_FILE})
+
+SET(SRC_FILES
+	${CMAKE_SOURCE_DIR}/src/main.cpp
+)
+
+LINK_DIRECTORIES (
+	${FLAIR_LIBRARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(
+	${FLAIR_INCLUDE_DIR}
+)
+
+#real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_rt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_rt ${FLAIR_LIBRARIES_RT})
+
+#non real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_nrt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_nrt ${FLAIR_LIBRARIES_NRT})
Index: trunk/demos/SimpleFleet/simulator/build
===================================================================
--- trunk/demos/SimpleFleet/simulator/build	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/build	(revision 33)
@@ -0,0 +1,1 @@
+link build_x86_64
Index: trunk/demos/SimpleFleet/simulator/build_i686/bin/setup_x8.xml
===================================================================
--- trunk/demos/SimpleFleet/simulator/build_i686/bin/setup_x8.xml	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/build_i686/bin/setup_x8.xml	(revision 33)
@@ -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.50" name="x:"/>
+    <DoubleSpinBox value="0.0" name="y:"/>
+    <DoubleSpinBox value="-1.2" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="1.5" 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" value_y="0" value_z="0.0399999991059303"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></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:"/>
+   </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:"/>
+   </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="0" name="yaw (deg):"/>
+   </Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+<Tab name="x8_1"><TabWidget name="tabs"><Tab name="sampling"><DoubleSpinBox name="Tech (s):" value="0.001"/></Tab><Tab name="optitrack"><CheckBox name="enabled" value="1"/></Tab><Tab name="init"><DoubleSpinBox name="x:" value="1.50"/><DoubleSpinBox name="y:" value="0.0"/><DoubleSpinBox name="z:" value="-1.2"/><SpinBox name="yaw (deg):" value="-90"/><Vector3DSpinBox name="position" value_x="-1.5" value_y="0.00" value_z="-1.00"/></Tab><Tab name="model"><DoubleSpinBox name="mass (kg):" value="1.6"/><DoubleSpinBox name="arm length (m):" value="0.2"/><DoubleSpinBox name="position G (m):" value="0"/><DoubleSpinBox name="k_mot:" value="0.001"/><DoubleSpinBox name="c_mot:" value="0.001"/><DoubleSpinBox name="f_air_vert:" value="0.01"/><DoubleSpinBox name="f_air_lat:" value="0.4"/><DoubleSpinBox name="j_roll:" value="0.006"/><DoubleSpinBox name="j_pitch:" value="0.006"/><DoubleSpinBox name="j_yaw:" value="0.1"/><DoubleSpinBox name="j_r:" value="0"/><DoubleSpinBox name="sigma:" value="0.72"/><DoubleSpinBox name="S:" value="1"/></Tab><Tab name="us"><GroupBox name="position"><DoubleSpinBox name="x:" value="0"/><DoubleSpinBox name="y:" value="0"/><DoubleSpinBox name="z:" value="0.04"/></GroupBox><GroupBox name="direction"><DoubleSpinBox name="x:" value="0"/><DoubleSpinBox name="y:" value="0"/><DoubleSpinBox name="z:" value="1"/></GroupBox><DoubleSpinBox name="range:" value="6"/><Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.0399999991059303"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></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/SimpleFleet/simulator/build_i686/bin/simulator_x8.sh
===================================================================
--- trunk/demos/SimpleFleet/simulator/build_i686/bin/simulator_x8.sh	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/build_i686/bin/simulator_x8.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./simulator_optitrack_rt
+else
+	EXEC=./simulator_optitrack_nrt
+fi
+
+$EXEC -n x8_0 -t x8 -p 9000 -x setup_x8.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: trunk/demos/SimpleFleet/simulator/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/SimpleFleet/simulator/build_x86_64/bin/setup_x8.xml	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/build_x86_64/bin/setup_x8.xml	(revision 33)
@@ -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.50" name="x:"/>
+    <DoubleSpinBox value="0.0" name="y:"/>
+    <DoubleSpinBox value="-1.2" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="1.5" 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" value_y="0" value_z="0.0399999991059303"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></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:"/>
+   </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:"/>
+   </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="0" name="yaw (deg):"/>
+   </Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+<Tab name="x8_1"><TabWidget name="tabs"><Tab name="sampling"><DoubleSpinBox name="Tech (s):" value="0.001"/></Tab><Tab name="optitrack"><CheckBox name="enabled" value="1"/></Tab><Tab name="init"><DoubleSpinBox name="x:" value="1.50"/><DoubleSpinBox name="y:" value="0.0"/><DoubleSpinBox name="z:" value="-1.2"/><SpinBox name="yaw (deg):" value="-90"/><Vector3DSpinBox name="position" value_x="-1.5" value_y="0.00" value_z="-1.00"/></Tab><Tab name="model"><DoubleSpinBox name="mass (kg):" value="1.6"/><DoubleSpinBox name="arm length (m):" value="0.2"/><DoubleSpinBox name="position G (m):" value="0"/><DoubleSpinBox name="k_mot:" value="0.001"/><DoubleSpinBox name="c_mot:" value="0.001"/><DoubleSpinBox name="f_air_vert:" value="0.01"/><DoubleSpinBox name="f_air_lat:" value="0.4"/><DoubleSpinBox name="j_roll:" value="0.006"/><DoubleSpinBox name="j_pitch:" value="0.006"/><DoubleSpinBox name="j_yaw:" value="0.1"/><DoubleSpinBox name="j_r:" value="0"/><DoubleSpinBox name="sigma:" value="0.72"/><DoubleSpinBox name="S:" value="1"/></Tab><Tab name="us"><GroupBox name="position"><DoubleSpinBox name="x:" value="0"/><DoubleSpinBox name="y:" value="0"/><DoubleSpinBox name="z:" value="0.04"/></GroupBox><GroupBox name="direction"><DoubleSpinBox name="x:" value="0"/><DoubleSpinBox name="y:" value="0"/><DoubleSpinBox name="z:" value="1"/></GroupBox><DoubleSpinBox name="range:" value="6"/><Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0.0399999991059303"/><Vector3DSpinBox name="direction" value_x="0" value_y="0" value_z="1"/></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/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- trunk/demos/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_simulator_rt
+else
+	EXEC=./SimpleFleet_simulator_nrt
+fi
+
+$EXEC -n x8 -a 127.0.0.1 -p 9000 -x setup_x8.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: trunk/demos/SimpleFleet/simulator/src/main.cpp
===================================================================
--- trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 33)
+++ trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 33)
@@ -0,0 +1,113 @@
+//  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 <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 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<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
+        ValueArg<string> addressArg("a","address","ground station address",true,"127.0.0.1","string");
+        cmd.add( addressArg );
+
+        cmd.parse( argc, argv );
+
+        // Get the value parsed by each arg.
+        port=portArg.getValue();
+        address=addressArg.getValue();
+        xml_file = xmlArg.getValue();
+        opti_time = optiArg.getValue();
+        name=nameArg.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; }
+}
+
+
+int main(int argc, char* argv[])
+{
+    Simulator *simu;
+
+    parseOptions(argc,argv);
+
+    simu= new Simulator("simulator",opti_time,90);
+    simu->SetupConnection(address,port);
+    simu->SetupUserInterface(xml_file);
+#ifdef GL
+    Parser *gui=new Parser(simu,640,480,640,480,media_path,scene_file);
+#endif
+    for(int i=0; i<2;i++)
+	{
+		stringstream s;
+		s << name.c_str() << "_" << i;
+        Model *drone=new X8(simu,s.str(),i);
+#ifdef GL
+        SimuUsGL *us_gl=new SimuUsGL(drone,"us",i);
+#endif
+        SimuImu *imu=new SimuImu(drone,"imu",i);
+	}
+
+    simu->RunSimu();
+
+    delete simu;
+
+	return 0;
+}
+
Index: trunk/demos/SimpleFleet/uav/CMakeLists.txt
===================================================================
--- trunk/demos/SimpleFleet/uav/CMakeLists.txt	(revision 33)
+++ trunk/demos/SimpleFleet/uav/CMakeLists.txt	(revision 33)
@@ -0,0 +1,38 @@
+PROJECT(SimpleFleet)
+cmake_minimum_required(VERSION 2.8)
+
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+SET(FLAIR_USE_FILTER TRUE)
+SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
+SET(FLAIR_USE_META TRUE)
+SET(FLAIR_USE_VRPN TRUE)
+
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+include(${FLAIR_USE_FILE})
+
+SET(SRC_FILES
+	${CMAKE_SOURCE_DIR}/src/main.cpp
+	${CMAKE_SOURCE_DIR}/src/SimpleFleet.cpp
+)
+
+LINK_DIRECTORIES (
+	${FLAIR_LIBRARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(
+	${FLAIR_INCLUDE_DIR}
+)
+
+#real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_rt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_rt ${FLAIR_LIBRARIES_RT})
+
+#non real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_nrt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_nrt ${FLAIR_LIBRARIES_NRT})
Index: trunk/demos/SimpleFleet/uav/build
===================================================================
--- trunk/demos/SimpleFleet/uav/build	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build	(revision 33)
@@ -0,0 +1,1 @@
+link build_x86_64
Index: trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet.sh
===================================================================
--- trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet.sh	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet.sh	(revision 33)
@@ -0,0 +1,1 @@
+./SimpleFleet_nrt -a 192.168.147.193 -p 9000 -l /tmp -x SimpleFleet_ardrone2.xml -n Drone_0 -t ardrone2 -b 192.168.147.255
Index: trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet_ardrone2.xml
===================================================================
--- trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet_ardrone2.xml	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_arm/bin/SimpleFleet_ardrone2.xml	(revision 33)
@@ -0,0 +1,357 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="x4-multiplex">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="1" 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>
+   </Tab>
+   <Tab name="Values">
+    <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="parrot-us">
+  <TabWidget name="parrot-us">
+   <Tab name="Reglages">
+    <GroupBox name="parrot-us"/>
+    <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="10" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="1" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.8" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="0.8" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="parrot-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="parrot-imu">
+  <TabWidget name="parrot-imu">
+   <Tab name="Reglages">
+    <GroupBox name="parrot-imu"/>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <DoubleSpinBox value="0.5" name="k_a[0]:"/>
+    <DoubleSpinBox value="0.5" name="k_a[1]:"/>
+    <DoubleSpinBox value="0" name="k_a[2]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[0]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[1]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[2]:"/>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="0">
+     <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="IMU">
+    <DataPlot1D name="acc_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="acc_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="acc_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10.5" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="1" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="Drone_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Drone_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.2" name="R"/>
+     <DoubleSpinBox value="0.5" name="velocity"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute)"/>
+    </GroupBox>
+   <DoubleSpinBox name="x circle center" value="0"/><DoubleSpinBox name="y circle center" value="0"/><DoubleSpinBox name="y displacement" value="1.0"/></Tab>
+   <Tab name="Mesures Drone_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="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) Drone_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="y">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="z">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy">
+     <Setup period="100" enabled="0"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="camv">
+  <TabWidget name="camv">
+   <Tab name="Setup">
+    <GroupBox name="camv">
+     <DoubleSpinBox value="0" name="gain:"/>
+     <DoubleSpinBox value="0" name="exposure:"/>
+     <DoubleSpinBox value="0" name="bright:"/>
+     <DoubleSpinBox value="0" name="contrast:"/>
+     <DoubleSpinBox value="0" name="hue:"/>
+     <DoubleSpinBox value="0" name="sharpness:"/>
+     <DoubleSpinBox value="0" name="saturation:"/>
+     <CheckBox value="1" name="autogain:"/>
+     <CheckBox value="1" name="autoexposure:"/>
+     <CheckBox value="1" name="awb:"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </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.6"/><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="20" name="sat ref:"/>
+     <DoubleSpinBox value="12" name="kp:"/>
+     <DoubleSpinBox value="1000" name="sat dref:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="20" name="sat ref:"/>
+     <DoubleSpinBox value="12" name="kp:"/>
+     <DoubleSpinBox value="1000" name="sat dref:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.6" name="kp:"/>
+     <DoubleSpinBox value="0.1" name="ki:"/>
+     <DoubleSpinBox value="0.2" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.4" name="kp:"/>
+     <DoubleSpinBox value="0.4" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.4" name="kp:"/>
+     <DoubleSpinBox value="0.1" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.6" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.4" name="sat i:"/>
+     <DoubleSpinBox value="0.4" 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="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_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="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="15" name="debattement roll"/>
+     <DoubleSpinBox value="15" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="0.5" name="debattement dz"/>
+     <DoubleSpinBox value="0.02" 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="Drone_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/SimpleFleet/uav/build_i686/bin/setup_x8.xml
===================================================================
--- trunk/demos/SimpleFleet/uav/build_i686/bin/setup_x8.xml	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_i686/bin/setup_x8.xml	(revision 33)
@@ -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="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="0">
+     <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>
+   <GroupBox name="x8_1 Passe bas"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="1"/></GroupBox><GroupBox name="x8_1_euler"><DoubleSpinBox name="period, 0 for auto:" value="0"/></GroupBox><DoubleSpinBox name="x circle center" value="0"/><DoubleSpinBox name="y circle center" value="0"/><DoubleSpinBox name="y displacement" value="1"/></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>
+  <Tab name="Mesures x8_1"><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) x8_1"><DataPlot2D name="xy" period="100" enabled="0"/></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="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="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_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><Tab name="x8_1"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/SimpleFleet/uav/build_i686/bin/x8_0.sh
===================================================================
--- trunk/demos/SimpleFleet/uav/build_i686/bin/x8_0.sh	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_i686/bin/x8_0.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_rt
+else
+	EXEC=./SimpleFleet_nrt
+fi
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu0 -b 127.255.255.255:20010
Index: trunk/demos/SimpleFleet/uav/build_i686/bin/x8_1.sh
===================================================================
--- trunk/demos/SimpleFleet/uav/build_i686/bin/x8_1.sh	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_i686/bin/x8_1.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_rt
+else
+	EXEC=./SimpleFleet_nrt
+fi
+
+$EXEC -n x8_1 -a 127.0.0.1 -p 9001 -l ./ -x setup_x8.xml -t x8_simu1 -b 127.255.255.255:20010 -d 20020
Index: trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml	(revision 33)
@@ -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="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="0">
+     <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>
+   <GroupBox name="x8_1 Passe bas"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="1"/></GroupBox><GroupBox name="x8_1_euler"><DoubleSpinBox name="period, 0 for auto:" value="0"/></GroupBox><DoubleSpinBox name="x circle center" value="0"/><DoubleSpinBox name="y circle center" value="0"/><DoubleSpinBox name="y displacement" value="1"/></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>
+  <Tab name="Mesures x8_1"><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) x8_1"><DataPlot2D name="xy" period="100" enabled="0"/></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="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="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_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><Tab name="x8_1"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh
===================================================================
--- trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_rt
+else
+	EXEC=./SimpleFleet_nrt
+fi
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu0 -b 127.255.255.255:20010
Index: trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh
===================================================================
--- trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh	(revision 33)
+++ trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh	(revision 33)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_rt
+else
+	EXEC=./SimpleFleet_nrt
+fi
+
+$EXEC -n x8_1 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu1 -b 127.255.255.255:20010 -d 21000
Index: trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
===================================================================
--- trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp	(revision 33)
+++ trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp	(revision 33)
@@ -0,0 +1,356 @@
+//  created:    2015/11/05
+//  filename:   SimpleFleet.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo fleet
+//
+//
+/*********************************************************************/
+
+#include "SimpleFleet.h"
+#include <Uav.h>
+#include <GridLayout.h>
+#include <PushButton.h>
+#include <DataPlot1D.h>
+#include <Ahrs.h>
+#include <MetaUsRangeFinder.h>
+#include <MetaDualShock3.h>
+#include <FrameworkManager.h>
+#include <VrpnClient.h>
+#include <MetaVrpnObject.h>
+#include <TrajectoryGenerator2DCircle.h>
+#include <Vector3D.h>
+#include <Vector2D.h>
+#include <PidThrust.h>
+#include <Euler.h>
+#include <cvmatrix.h>
+#include <AhrsData.h>
+#include <Ahrs.h>
+#include <DoubleSpinBox.h>
+#include <stdio.h>
+#include <cmath>
+#include <Tab.h>
+#include <Pid.h>
+#include <Socket.h>
+#include <string.h>
+
+#define PI ((float)3.14159265358979323846)
+
+using namespace std;
+using namespace flair::core;
+using namespace flair::gui;
+using namespace flair::sensor;
+using namespace flair::filter;
+using namespace flair::meta;
+
+
+SimpleFleet::SimpleFleet(flair::meta::Uav* uav,string broadcast,uint16_t ds3port): UavStateMachine(uav,ds3port), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {
+    uav->SetupVRPNAutoIP(uav->ObjectName());
+
+    circle=new TrajectoryGenerator2DCircle(uav->GetVrpnClient()->GetLayout()->NewRow(),"circle");
+    uav->GetVrpnObject()->xPlot()->AddCurve(circle->Matrix()->Element(0,0),0,0,255);
+    uav->GetVrpnObject()->yPlot()->AddCurve(circle->Matrix()->Element(0,1),0,0,255);
+    uav->GetVrpnObject()->VxPlot()->AddCurve(circle->Matrix()->Element(1,0),0,0,255);
+    uav->GetVrpnObject()->VyPlot()->AddCurve(circle->Matrix()->Element(1,1),0,0,255);
+
+    xCircleCenter=new DoubleSpinBox(uav->GetVrpnClient()->GetLayout()->NewRow(),"x circle center"," m",-5,5,0.1,1,0);
+    yCircleCenter=new DoubleSpinBox(uav->GetVrpnClient()->GetLayout()->NewRow(),"y circle center"," m",-5,5,0.1,1,0);
+    yDisplacement=new DoubleSpinBox(uav->GetVrpnClient()->GetLayout()->NewRow(),"y displacement"," m",0,2,0.1,1,0);
+
+    //parent->AddDeviceToLog(Uz());
+
+    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());
+
+    message=new Socket(uav,"Message",broadcast,10);
+
+    customReferenceOrientation= new AhrsData(this,"reference");
+    uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow);
+    AddDataToControlLawLog(customReferenceOrientation);
+
+    customOrientation=new AhrsData(this,"orientation");
+/*
+    //check init conditions
+    Vector3D uav_pos;
+    Euler vrpn_euler;
+    GetVrpnObject()->GetPosition(uav_pos);
+    GetVrpnObject()->GetEuler(vrpn_euler);
+
+    if(name=="x8_0") {
+        //x8_0 should be on the left, with 0 yaw
+        if(uav_pos.y>yCircleCenter->Value() || vrpn_euler.yaw>20 || vrpn_euler.yaw<-20) Thread::Err("wrong init position\n");
+    }
+    if(name=="x8_1") {
+        //x8_1 should be on the right, with 180 yaw
+        if(uav_pos.y<yCircleCenter->Value() || (vrpn_euler.yaw<160 && vrpn_euler.yaw>-160)) Thread::Err("wrong init position %f %f\n",yCircleCenter->Value(),vrpn_euler.yaw);
+    }
+    */
+}
+
+SimpleFleet::~SimpleFleet() {
+}
+
+const AhrsData *SimpleFleet::GetOrientation(void) const {
+    //get yaw from vrpn
+    Euler vrpnEuler;
+    GetUav()->GetVrpnObject()->GetEuler(vrpnEuler);
+
+    //get roll, pitch and w from imu
+    Quaternion ahrsQuaternion;
+    Vector3D ahrsAngularSpeed;
+    GetDefaultOrientation()->GetQuaternionAndAngularRates(ahrsQuaternion, ahrsAngularSpeed);
+
+    Euler ahrsEuler=ahrsQuaternion.ToEuler();
+    ahrsEuler.yaw=vrpnEuler.yaw;
+    Quaternion mixQuaternion=ahrsEuler.ToQuaternion();
+
+    customOrientation->SetQuaternionAndAngularRates(mixQuaternion,ahrsAngularSpeed);
+
+    return customOrientation;
+}
+
+void SimpleFleet::AltitudeValues(float &z,float &dz) const {
+    Vector3D uav_pos,uav_vel;
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    GetUav()->GetVrpnObject()->GetSpeed(uav_vel);
+    //z and dz must be in uav's frame
+    z=-uav_pos.z;
+    dz=-uav_vel.z;
+}
+
+const AhrsData *SimpleFleet::GetReferenceOrientation(void) {
+    Vector2D pos_err, vel_err; // in uav coordinate system
+    float yaw_ref;
+    Euler refAngles;
+
+    PositionValues(pos_err, vel_err, yaw_ref);
+
+    refAngles.yaw=yaw_ref;
+
+    u_x->SetValues(pos_err.x, vel_err.x);
+    u_x->Update(GetTime());
+    refAngles.pitch=u_x->Output();
+
+    u_y->SetValues(pos_err.y, vel_err.y);
+    u_y->Update(GetTime());
+    refAngles.roll=-u_y->Output();
+
+    customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(),Vector3D(0,0,0));
+
+    return customReferenceOrientation;
+}
+
+void SimpleFleet::PositionValues(Vector2D &pos_error,Vector2D &vel_error,float &yaw_ref) {
+    Vector3D uav_pos,uav_vel; // in VRPN coordinate system
+    Vector2D uav_2Dpos,uav_2Dvel; // in VRPN coordinate system
+    Euler vrpn_euler; // in VRPN coordinate system
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    GetUav()->GetVrpnObject()->GetSpeed(uav_vel);
+    GetUav()->GetVrpnObject()->GetEuler(vrpn_euler);
+
+    uav_pos.To2Dxy(uav_2Dpos);
+    uav_vel.To2Dxy(uav_2Dvel);
+
+    if (behaviourMode==BehaviourMode_t::PositionHold1 || behaviourMode==BehaviourMode_t::PositionHold2
+        || behaviourMode==BehaviourMode_t::PositionHold3 || behaviourMode==BehaviourMode_t::PositionHold4) {
+        pos_error=uav_2Dpos-pos_hold;
+        vel_error=uav_2Dvel;
+        yaw_ref=yaw_hold;
+    } else { //Circle
+        Vector2D circle_pos,circle_vel;
+        Vector2D target_2Dpos;
+
+        //circle center
+        target_2Dpos.x=xCircleCenter->Value();
+        target_2Dpos.y=yCircleCenter->Value();
+        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=PI/2+atan2(uav_pos.y-target_2Dpos.y,uav_pos.x-target_2Dpos.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 SimpleFleet::SignalEvent(Event_t event) {
+    UavStateMachine::SignalEvent(event);
+
+    switch(event) {
+    case Event_t::EmergencyStop:
+        message->SendMessage("EmergencyStop");
+        break;
+    case Event_t::TakingOff:
+        //behaviourMode=BehaviourMode_t::Default;
+        message->SendMessage("TakeOff");
+        VrpnPositionHold();
+        behaviourMode=BehaviourMode_t::PositionHold1;
+        break;
+    case Event_t::StartLanding:
+        VrpnPositionHold();
+        behaviourMode=BehaviourMode_t::PositionHold4;
+        message->SendMessage("Landing");
+        break;
+    case Event_t::EnteringControlLoop:
+        CheckMessages();
+        if ((behaviourMode==BehaviourMode_t::Circle1) && (!circle->IsRunning())) {
+            VrpnPositionHold();
+            behaviourMode=BehaviourMode_t::PositionHold2;
+            if(pos_hold.y<0) {
+                pos_hold.y-=yDisplacement->Value();
+            } else {
+                pos_hold.y+=yDisplacement->Value();
+            }
+            posWait=GetTime();
+            Printf("Circle1 -> PositionHold2\n");
+        }
+        if (behaviourMode==BehaviourMode_t::PositionHold2 && GetTime()>(posWait+3*(Time)1000000000)) {
+            behaviourMode=BehaviourMode_t::PositionHold3;
+            if(pos_hold.y<0) {
+                pos_hold.y+=yDisplacement->Value();
+            } else {
+                pos_hold.y-=yDisplacement->Value();
+            }
+            posWait=GetTime();
+            Printf("PositionHold2 -> PositionHold3\n");
+        }
+        if (behaviourMode==BehaviourMode_t::PositionHold3 && GetTime()>(posWait+3*(Time)1000000000)) {
+            behaviourMode=BehaviourMode_t::Circle2;
+            StartCircle();
+            Printf("PositionHold3 -> Circle2\n");
+        }
+        if ((behaviourMode==BehaviourMode_t::Circle2) && (!circle->IsRunning())) {
+            Printf("Circle2 -> Land\n");
+            behaviourMode=BehaviourMode_t::PositionHold4;
+            Land();
+        }
+
+        break;
+    case Event_t::EnteringFailSafeMode:
+        behaviourMode=BehaviourMode_t::Default;
+        break;
+    case Event_t::ZTrajectoryFinished:
+        Printf("PositionHold1 -> Circle1\n");
+        StartCircle();
+        behaviourMode=BehaviourMode_t::Circle1;
+        break;
+    }
+}
+
+void SimpleFleet::CheckMessages(void) {
+    char msg[64];
+    char src[64];
+    size_t src_size=sizeof(src);
+    while(message->RecvMessage(msg,sizeof(msg),TIME_NONBLOCK,src,&src_size)>0) {
+        //printf("%s %s\n",GetUav()->ObjectName().c_str(),src);
+        if(strcmp(src,GetUav()->ObjectName().c_str())!=0) {
+            /*
+            if(strcmp(msg,"StopMotors")==0 && orientation_state!=OrientationState_t::Stopped)
+            {
+                joy->FlashLed(DualShock3::led1,10,10);
+                joy->Rumble(0x70);
+                GetBldc()->SetEnabled(false);
+                GetUavMultiplex()->UnlockUserInterface();
+                altitude_state=AltitudeState_t::Stopped;
+                orientation_state=OrientationState_t::Stopped;
+                GetAhrs()->UnlockUserInterface();
+            }
+*/
+            if(strcmp(msg,"TakeOff")==0) {
+                Printf("TakeOff fleet\n");
+                TakeOff();
+            }
+            if(strcmp(msg,"Landing")==0) {
+                Printf("Landing fleet\n");
+                Land();
+            }
+            if(strcmp(msg,"EmergencyStop")==0) {
+                Printf("EmergencyStop fleet\n");
+                EmergencyStop();
+            }
+        }
+    }
+}
+
+void SimpleFleet::ExtraSecurityCheck(void) {
+    if (!vrpnLost && behaviourMode!=BehaviourMode_t::Default) {
+        if (!GetUav()->GetVrpnObject()->IsTracked(500)) {
+            Thread::Err("Optitrack, uav lost\n");
+            vrpnLost=true;
+            EnterFailSafeMode();
+            Land();
+        }
+    }
+}
+
+void SimpleFleet::ExtraCheckJoystick(void) {
+
+}
+
+void SimpleFleet::StartCircle(void) {
+    if (SetOrientationMode(OrientationMode_t::Custom)) {
+        Thread::Info("Demo flotte: start circle\n");
+    } else {
+        Thread::Warn("Demo flotte: could not start circle\n");
+        return;
+    }
+    Vector3D uav_pos;
+    Vector2D uav_2Dpos,target_2Dpos;
+
+    //circle center
+    target_2Dpos.x=xCircleCenter->Value();
+    target_2Dpos.y=yCircleCenter->Value();
+    circle->SetCenter(target_2Dpos);
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    uav_pos.To2Dxy(uav_2Dpos);
+    circle->StartTraj(uav_2Dpos,1);
+
+    u_x->Reset();
+    u_y->Reset();
+}
+
+void SimpleFleet::StopCircle(void) {
+    circle->FinishTraj();
+    //joy->Rumble(0x70);
+    Thread::Info("Demo flotte: finishing circle\n");
+}
+
+void SimpleFleet::VrpnPositionHold(void) {
+    Euler vrpn_euler;
+    Vector3D vrpn_pos;
+
+    if (SetOrientationMode(OrientationMode_t::Custom)) {
+        Thread::Info("Demo flotte: holding position\n");
+    } else {
+        Thread::Info("Demo flotte: could not hold position\n");
+        //return;
+    }
+
+    GetUav()->GetVrpnObject()->GetEuler(vrpn_euler);
+    yaw_hold=vrpn_euler.yaw;
+
+    GetUav()->GetVrpnObject()->GetPosition(vrpn_pos);
+    vrpn_pos.To2Dxy(pos_hold);
+
+    u_x->Reset();
+    u_y->Reset();
+}
Index: trunk/demos/SimpleFleet/uav/src/SimpleFleet.h
===================================================================
--- trunk/demos/SimpleFleet/uav/src/SimpleFleet.h	(revision 33)
+++ trunk/demos/SimpleFleet/uav/src/SimpleFleet.h	(revision 33)
@@ -0,0 +1,79 @@
+//  created:    2015/11/05
+//  filename:   SimpleFleet.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo fleet
+//
+//
+/*********************************************************************/
+
+#ifndef SIMPLEFLEET_H
+#define SIMPLEFLEET_H
+
+#include <UavStateMachine.h>
+
+namespace flair {
+    namespace core {
+        class FrameworkManager;
+        class Socket;
+        class AhrsData;
+    }
+    namespace filter {
+        class TrajectoryGenerator2DCircle;
+    }
+    namespace gui {
+        class DoubleSpinBox;
+    }
+}
+
+
+class SimpleFleet : public flair::meta::UavStateMachine {
+    public:
+        SimpleFleet(flair::meta::Uav* uav,std::string broadcast,uint16_t ds3port);
+        ~SimpleFleet();
+
+    private:
+        enum class BehaviourMode_t {
+            Default,
+            PositionHold1,
+            Circle1,
+            PositionHold2,
+            PositionHold3,
+            Circle2,
+            PositionHold4,
+        };
+
+//        BehaviourMode_t orientation_state;
+        BehaviourMode_t behaviourMode;
+        bool vrpnLost;
+
+        void VrpnPositionHold(void);//flight mode
+        void StartCircle(void);
+        void StopCircle(void);
+        void ExtraTakeOff(void);
+        void ExtraSecurityCheck(void);
+        void ExtraCheckJoystick(void);
+        const flair::core::AhrsData *GetOrientation(void) const;
+        void AltitudeValues(float &z,float &dz) const;
+        void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
+        const flair::core::AhrsData *GetReferenceOrientation(void);
+        void SignalEvent(Event_t event);
+        void CheckMessages(void);
+
+        flair::filter::Pid *u_x, *u_y;
+
+        flair::core::Vector2D pos_hold;
+        float yaw_hold;
+        flair::core::Socket *message;
+        flair::core::Time posWait;
+
+        flair::filter::TrajectoryGenerator2DCircle *circle;
+        flair::gui::DoubleSpinBox *xCircleCenter,*yCircleCenter,*yDisplacement;
+        flair::core::AhrsData *customReferenceOrientation,*customOrientation;
+};
+
+#endif // SIMPLEFLEET_H
Index: trunk/demos/SimpleFleet/uav/src/main.cpp
===================================================================
--- trunk/demos/SimpleFleet/uav/src/main.cpp	(revision 33)
+++ trunk/demos/SimpleFleet/uav/src/main.cpp	(revision 33)
@@ -0,0 +1,100 @@
+//  created:    2011/05/01
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    exemple de code uav
+//
+//
+/*********************************************************************/
+
+#include "SimpleFleet.h"
+#include <FrameworkManager.h>
+#include <UavFactory.h>
+#include <stdio.h>
+#include <tclap/CmdLine.h>
+
+using namespace TCLAP;
+using namespace std;
+using namespace flair::core;
+using namespace flair::meta;
+
+string uav_type;
+string log_path;
+int port;
+int ds3port;
+string xml_file;
+string name;
+string broadcast;
+string address;
+
+void parseOptions(int argc, char** argv);
+
+
+int main(int argc, char* argv[]) {
+    parseOptions(argc,argv);
+
+    FrameworkManager *manager;
+    manager= new FrameworkManager(name);
+    manager->SetupLogger(log_path);
+    manager->SetupConnection(address,port);
+    manager->SetupUserInterface(xml_file);
+
+    Uav* drone=CreateUav(manager,name,uav_type);
+    SimpleFleet* demo=new SimpleFleet(drone,broadcast,ds3port);
+
+    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 );
+
+        ValueArg<string> broadcastArg("b","broadcast","broadcast ip address and port,",true,"127.255.255.255:20001","string");
+        cmd.add( broadcastArg );
+
+        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();
+        broadcast=broadcastArg.getValue();
+        uav_type=typeArg.getValue();
+        address=addressArg.getValue();
+
+	} catch (ArgException &e) { // catch any exceptions
+        cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+	}
+}
