Index: trunk/demos/Gps/simulator/src/main.cpp
===================================================================
--- trunk/demos/Gps/simulator/src/main.cpp	(revision 123)
+++ 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;
 }
-
