Index: trunk/demos/CircleFollower/simulator/src/main.cpp
===================================================================
--- trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 157)
+++ trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 158)
@@ -23,5 +23,4 @@
 #endif
 
-
 using namespace TCLAP;
 using namespace std;
@@ -38,92 +37,92 @@
 string address;
 
-void parseOptions(int argc, char** argv) {
-	try {
-        CmdLine cmd("Command description message", ' ', "0.1");
+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> 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<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> 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> 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<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 );
+    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> 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 );
+    ValueArg<string> sceneArg("s", "scene", "path to scene file", true, "./voliere.xml", "string");
+    cmd.add(sceneArg);
 #endif
 
-        cmd.parse( argc, argv );
+    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();
+    // 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();
+    media_path = mediaArg.getValue();
+    scene_file = sceneArg.getValue();
 #endif
 
-	} catch (ArgException &e)  {
-	    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
-    }
+  } catch(ArgException& e) {
+    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+  }
 }
 
-int main(int argc, char* argv[]) {
-    Simulator *simu;
-    Model *drone;
-    SimuImu* imu;
+int main(int argc, char* argv[])
+{
+  Simulator* simu;
+  Model* drone;
+  SimuImu* imu;
 #ifdef GL
-    SimuUsGL* us_gl;
-    Parser *gui;
-    Man *man;
+  SimuUsGL* us_gl;
+  Parser* gui;
+  Man* man;
 #endif
-    parseOptions(argc,argv);
+  parseOptions(argc, argv);
 
-    simu= new Simulator("simulator",opti_time,90);
-    simu->SetupConnection(address,port);
-    simu->SetupUserInterface(xml_file);
+  simu = new Simulator("simulator", opti_time, 90);
+  simu->SetupConnection(address, port);
+  simu->SetupUserInterface(xml_file);
 
 #ifdef GL
-    gui=new Parser(simu,1024,768,1024,768,media_path,scene_file);
+  gui = new Parser(1024, 768, 1024, 768, media_path, scene_file);
 #endif
 
-    if(type=="x4") {
-        drone=new X4(simu,name,0);
-    } else {
-        drone=new X8(simu,name,0);
-    }
+  if(type == "x4") {
+    drone = new X4(name, 0);
+  } else {
+    drone = new X8(name, 0);
+  }
 
-    imu=new SimuImu(drone,"imu",0);
+  imu = new SimuImu(drone, "imu", 0,0);
 
 #ifdef GL
-    us_gl=new SimuUsGL(drone,"us",0);
-    
+  us_gl = new SimuUsGL(drone, "us", 0,0);
 
-    man=new Man(simu,"target");
+  man = new Man("target",1);
 #endif
 
-    simu->RunSimu();
+  simu->RunSimu();
 
-    delete simu;
+  delete simu;
 
-	return 0;
+  return 0;
 }
-
Index: trunk/demos/Gps/simulator/src/main.cpp
===================================================================
--- trunk/demos/Gps/simulator/src/main.cpp	(revision 157)
+++ trunk/demos/Gps/simulator/src/main.cpp	(revision 158)
@@ -24,5 +24,4 @@
 #endif
 
-
 using namespace TCLAP;
 using namespace std;
@@ -39,92 +38,91 @@
 string address;
 
-void parseOptions(int argc, char** argv) {
-	try {
-        CmdLine cmd("Command description message", ' ', "0.1");
+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> 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<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> 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> 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<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 );
+    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> 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 );
+    ValueArg<string> sceneArg("s", "scene", "path to scene file", true, "./voliere.xml", "string");
+    cmd.add(sceneArg);
 #endif
 
-        cmd.parse( argc, argv );
+    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();
+    // 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();
+    media_path = mediaArg.getValue();
+    scene_file = sceneArg.getValue();
 #endif
 
-	} catch (ArgException &e)  {
-	    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
-    }
+  } catch(ArgException& e) {
+    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+  }
 }
 
-int main(int argc, char* argv[]) {
-    Simulator *simu;
-    Model *drone;
-    SimuImu *imu;
-    SimuGps *gps;
+int main(int argc, char* argv[])
+{
+  Simulator* simu;
+  Model* drone;
+  SimuImu* imu;
+  SimuGps* gps;
 #ifdef GL
-    SimuUsGL *us_gl;
-    Parser *gui;
-    Man *man;
+  SimuUsGL* us_gl;
+  Parser* gui;
 #endif
-    parseOptions(argc,argv);
+  parseOptions(argc, argv);
 
-    simu= new Simulator("simulator",opti_time,0);
-    simu->SetupConnection(address,port);
-    simu->SetupUserInterface(xml_file);
+  simu = new Simulator("simulator", opti_time, 0);
+  simu->SetupConnection(address, port);
+  simu->SetupUserInterface(xml_file);
 
 #ifdef GL
-    gui=new Parser(simu,1024,768,1024,768,media_path,scene_file);
+  gui = new Parser(1024, 768, 1024, 768, media_path, scene_file);
 #endif
 
-    if(type=="x4") {
-        drone=new X4(simu,name,0);
-    } else {
-        drone=new X8(simu,name,0);
-    }
+  if(type == "x4") {
+    drone = new X4(name, 0);
+  } else {
+    drone = new X8(name, 0);
+  }
 
-    imu=new SimuImu(drone,"imu",90);
+  imu = new SimuImu(drone, "imu", 0,0);
 
 #ifdef GL
-    us_gl=new SimuUsGL(drone,"us",0);
-    man=new Man(simu,"target");
+  us_gl = new SimuUsGL(drone, "us", 0,0);
 #endif
-    gps=new SimuGps(drone,"gps",0);
+  gps = new SimuGps(drone, "gps", 0,0);
 
-    simu->RunSimu();
+  simu->RunSimu();
 
-    delete simu;
+  delete simu;
 
-	return 0;
+  return 0;
 }
-
Index: trunk/demos/OpticalFlow/simulator/src/main.cpp
===================================================================
--- trunk/demos/OpticalFlow/simulator/src/main.cpp	(revision 157)
+++ trunk/demos/OpticalFlow/simulator/src/main.cpp	(revision 158)
@@ -23,5 +23,4 @@
 #endif
 
-
 using namespace TCLAP;
 using namespace std;
@@ -40,95 +39,90 @@
 void parseOptions(int argc, char** argv)
 {
-	try
-	{
-        CmdLine cmd("Command description message", ' ', "0.1");
+  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> 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<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> 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> 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<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 );
+    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> 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 );
+    ValueArg<string> sceneArg("s", "scene", "path to scene file", true, "./voliere.xml", "string");
+    cmd.add(sceneArg);
 #endif
 
-        cmd.parse( argc, argv );
+    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();
+    // 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();
+    media_path = mediaArg.getValue();
+    scene_file = sceneArg.getValue();
 #endif
 
-	} catch (ArgException &e)  // catch any exceptions
-	{ cerr << "error: " << e.error() << " for arg " << e.argId() << endl; }
+  } catch(ArgException& e) // catch any exceptions
+  {
+    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+  }
 }
-
 
 int main(int argc, char* argv[])
 {
-    Simulator *simu;
-    Model *drone;
-    SimuImu* imu;
+  Simulator* simu;
+  Model* drone;
+  SimuImu* imu;
 #ifdef GL
-    SimuUsGL* us_gl;
+  SimuUsGL* us_gl;
 
-    SimuCameraGL *cam_bas;
-    Parser *gui;
+  SimuCameraGL* cam_bas;
+  Parser* gui;
 #endif
-    parseOptions(argc,argv);
+  parseOptions(argc, argv);
 
-    simu= new Simulator("simulator",opti_time,90);
-    simu->SetupConnection(address,port);
-    simu->SetupUserInterface(xml_file);
+  simu = new Simulator("simulator", opti_time, 90);
+  simu->SetupConnection(address, port);
+  simu->SetupUserInterface(xml_file);
 
 #ifdef GL
-    gui=new Parser(simu,960,480,640,480,media_path,scene_file);
+  gui = new Parser(960, 480, 640, 480, media_path, scene_file);
 #endif
 
-    if(type=="x4")
-    {
-        drone=new X4(simu,name,0);
-    }
-    else
-    {
-        drone=new X8(simu,name,0);
-    }
-    imu=new SimuImu(drone,"imu",0);
+  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);
-    cam_bas=new SimuCameraGL(drone,"bottom camera",320,240,640,0,0);
+  us_gl = new SimuUsGL(drone, "us", 0,0);
+  cam_bas = new SimuCameraGL(drone, "bottom camera", 320, 240, 640, 0, 0,0);
 #endif
 
-    simu->RunSimu();
+  simu->RunSimu();
 
-    delete simu;
+  delete simu;
 
-	return 0;
+  return 0;
 }
-
Index: trunk/demos/SimpleFleet/simulator/src/main.cpp
===================================================================
--- trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 157)
+++ trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 158)
@@ -84,28 +84,27 @@
 int main(int argc, char* argv[])
 {
-    Simulator *simu;
+  Simulator *simu;
 
-    parseOptions(argc,argv);
+  parseOptions(argc,argv);
 
-    simu= new Simulator("simulator",opti_time,90);
-    simu->SetupConnection(address,port);
-    simu->SetupUserInterface(xml_file);
+  simu= new Simulator("simulator",opti_time,90);
+  simu->SetupConnection(address,port);
+  simu->SetupUserInterface(xml_file);
+  #ifdef GL
+  Parser *gui=new Parser(1024,768,1024,768,media_path,scene_file);
+  #endif
+  for(int i=0; i<2;i++) {
+    stringstream uavName;
+    uavName << name.c_str() << "_" << i;
+    Model *drone=new X8(uavName.str(),i);
 #ifdef GL
-    Parser *gui=new Parser(simu,640,480,640,480,media_path,scene_file);
+    SimuUsGL *us_gl=new SimuUsGL(drone,"us",i,0);
 #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);
-	}
+    SimuImu *imu=new SimuImu(drone,"imu",i,0);
+  }
 
-    simu->RunSimu();
+  simu->RunSimu();
 
-    delete simu;
+  delete simu;
 
 	return 0;
Index: trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml	(revision 157)
+++ trunk/demos/SimpleFleet/uav/build_x86_64/bin/setup_x8.xml	(revision 158)
@@ -135,5 +135,5 @@
     </DataPlot1D>
    </Tab>
-  </TabWidget>
+  <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">
@@ -340,3 +340,3 @@
  </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>
+<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><PushButton name="save config on target (x8_0)" value="1"/></root>
