Index: trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.sh
===================================================================
--- trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.sh	(revision 333)
+++ trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.sh	(revision 333)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./SimpleFleet_simulator_rt
+else
+	EXEC=./SimpleFleet_simulator_nrt
+fi
+
+. $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
+
+$EXEC -n x4 -a 127.0.0.1 -p 9000 -x simulator_x4.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -t x4
Index: trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.xml
===================================================================
--- trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.xml	(revision 333)
+++ trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x4.xml	(revision 333)
@@ -0,0 +1,152 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x4_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="1.5" value_y="0" value_z="-1"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   <SpinBox name="motor timeout:" value="100"/></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.04"/><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:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+<Tab name="x4_1">
+  <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">
+    <SpinBox value="-90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   <SpinBox name="motor timeout:" value="100"/></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.04"/><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:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+  </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/resources/core2-64/simulator_x8.sh
===================================================================
--- trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x8.sh	(revision 302)
+++ trunk/demos/SimpleFleet/simulator/resources/core2-64/simulator_x8.sh	(revision 333)
@@ -9,3 +9,3 @@
 . $FLAIR_ROOT/flair-src/scripts/distribution_specific_hack.sh
 
-$EXEC -n x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml
+$EXEC -n x8 -a 127.0.0.1 -p 9000 -x simulator_x8.xml -o 10 -m $FLAIR_ROOT/flair-src/models -s $FLAIR_ROOT/flair-src/models/indoor_flight_arena.xml -t x8
Index: trunk/demos/SimpleFleet/simulator/src/main.cpp
===================================================================
--- trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 302)
+++ trunk/demos/SimpleFleet/simulator/src/main.cpp	(revision 333)
@@ -35,4 +35,5 @@
 string name;
 string address;
+string type;
 
 void parseOptions(int argc, char** argv)
@@ -62,4 +63,7 @@
         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);
 
         cmd.parse( argc, argv );
@@ -71,4 +75,5 @@
         opti_time = optiArg.getValue();
         name=nameArg.getValue();
+        type = typeArg.getValue();
 #ifdef GL
         media_path=mediaArg.getValue();
@@ -84,6 +89,5 @@
 
 
-int main(int argc, char* argv[])
-{
+int main(int argc, char* argv[]) {
   Simulator *simu;
 
@@ -98,6 +102,12 @@
   for(int i=0; i<2;i++) {
     stringstream uavName;
+    Model *drone;
     uavName << name.c_str() << "_" << i;
-    Model *drone=new X8(uavName.str(),i);
+    if(type == "x4") {
+      drone = new X4(uavName.str(),i);
+    } else {
+      drone = new X8(uavName.str(),i);
+    }
+    
 #ifdef GL
     SimuUsGL *us_gl=new SimuUsGL(drone,"us",i,0);
