Index: trunk/lib/FlairMeta/src/SimuX4.cpp
===================================================================
--- trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 158)
+++ trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 160)
@@ -53,12 +53,13 @@
   GetBatteryMonitor()->SetBatteryValue(12);
   
-  string camvOpts=FindArgument(options,"camv=",false);
   uint16_t camvWidth=320,camvHeight=240;
-	if(camvOpts=="") {
-    Info("using default vertical camera resolution: %ix%i\n",camvWidth, camvHeight);
-	}
+	ReadCameraResolutionOption(options,"camv",camvWidth,camvHeight);
+  Info("using vertical camera resolution: %ix%i\n",camvWidth, camvHeight);
+  SetVerticalCamera(new SimuCamera("simu_cam_v", camvWidth, camvHeight, 3, simu_id,0, 10));
   
-  SetVerticalCamera(new SimuCamera("simu_cam_v", camvWidth, camvHeight, 3, simu_id,0, 10));
-  //SetHorizontalCamera(new SimuCamera("simu_cam_h", 320, 240, 3, simu_id,1, 10));
+  uint16_t camhWidth=320,camhHeight=240;
+  ReadCameraResolutionOption(options,"camh",camhWidth,camhHeight);
+  Info("using horizontal camera resolution: %ix%i\n",camhWidth, camhHeight);
+  SetHorizontalCamera(new SimuCamera("simu_cam_h", camhWidth, camhHeight, 3, simu_id,1, 10));
 }
 
@@ -69,6 +70,19 @@
   ((SimuUs *)GetUsRangeFinder())->Start();
   ((SimuCamera *)GetVerticalCamera())->Start();
+  ((SimuCamera *)GetHorizontalCamera())->Start();
 }
 
+void SimuX4::ReadCameraResolutionOption(string options,string cameraName,uint16_t &camWidth,uint16_t &camHeight) const {
+  string camOpts=FindArgument(options,cameraName +"=",false);
+	if(camOpts!="") {
+    size_t position=camOpts.find("x");
+    if(position!=std::string::npos) {
+        camWidth=std::stoi(camOpts.substr(0,position));
+        camHeight=std::stoi(camOpts.substr(position+1,std::string::npos));
+    } else {
+      Warn("bad camera resolution parameter (%s) should be WIDTHxHEIGHT format\n",camOpts.c_str());
+    }
+  }
+}
 
 } // end namespace meta
Index: trunk/lib/FlairMeta/src/SimuX4.h
===================================================================
--- trunk/lib/FlairMeta/src/SimuX4.h	(revision 158)
+++ trunk/lib/FlairMeta/src/SimuX4.h	(revision 160)
@@ -18,4 +18,5 @@
 namespace flair {
 namespace meta {
+  
 /*! \class SimuX4
 *
@@ -23,11 +24,15 @@
 */
 class SimuX4 : public Uav {
-public:
-  // simu_id: 0 if simulating only one UAV
-  //>0 otherwise
-  SimuX4(std::string name, uint32_t simu_id = 0,std::string options="",
-         filter::UavMultiplex *multiplex = NULL);
-  ~SimuX4();
-  void StartSensors(void);
+  public:
+    // simu_id: 0 if simulating only one UAV
+    //>0 otherwise
+    SimuX4(std::string name, uint32_t simu_id = 0,std::string options="",
+           filter::UavMultiplex *multiplex = NULL);
+    ~SimuX4();
+    void StartSensors(void);
+
+  private:
+    void ReadCameraResolutionOption(std::string options,std::string cameraName,uint16_t &camWidth,uint16_t &camHeight) const;
+  
 };
 } // end namespace meta
Index: trunk/lib/FlairMeta/src/SimuX8.cpp
===================================================================
--- trunk/lib/FlairMeta/src/SimuX8.cpp	(revision 158)
+++ trunk/lib/FlairMeta/src/SimuX8.cpp	(revision 160)
@@ -26,4 +26,5 @@
 #include <BatteryMonitor.h>
 #include <Tab.h>
+#include <FindArgument.h>
 
 using std::string;
@@ -51,6 +52,14 @@
   SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
   GetBatteryMonitor()->SetBatteryValue(12);
-  SetVerticalCamera(new SimuCamera("simu_cam_v", 320, 240, 3, simu_id,0, 10));
-  //SetHorizontalCamera(new SimuCamera("simu_cam_h", 320, 240, 3, simu_id,1, 10));
+  
+  uint16_t camvWidth=320,camvHeight=240;
+	ReadCameraResolutionOption(options,"camv",camvWidth,camvHeight);
+  Info("using vertical camera resolution: %ix%i\n",camvWidth, camvHeight);
+  SetVerticalCamera(new SimuCamera("simu_cam_v", camvWidth, camvHeight, 3, simu_id,0, 10));
+  
+  uint16_t camhWidth=320,camhHeight=240;
+  ReadCameraResolutionOption(options,"camh",camhWidth,camhHeight);
+  Info("using horizontal camera resolution: %ix%i\n",camhWidth, camhHeight);
+  SetHorizontalCamera(new SimuCamera("simu_cam_h", camhWidth, camhHeight, 3, simu_id,1, 10));
 }
 
@@ -61,4 +70,18 @@
   ((SimuUs *)GetUsRangeFinder())->Start();
   ((SimuCamera *)GetVerticalCamera())->Start();
+  ((SimuCamera *)GetHorizontalCamera())->Start();
+}
+
+void SimuX8::ReadCameraResolutionOption(string options,string cameraName,uint16_t &camWidth,uint16_t &camHeight) const {
+  string camOpts=FindArgument(options,cameraName +"=",false);
+	if(camOpts!="") {
+    size_t position=camOpts.find("x");
+    if(position!=std::string::npos) {
+        camWidth=std::stoi(camOpts.substr(0,position));
+        camHeight=std::stoi(camOpts.substr(position+1,std::string::npos));
+    } else {
+      Warn("bad camera resolution parameter (%s) should be WIDTHxHEIGHT format\n",camOpts.c_str());
+    }
+  }
 }
 
Index: trunk/lib/FlairMeta/src/SimuX8.h
===================================================================
--- trunk/lib/FlairMeta/src/SimuX8.h	(revision 158)
+++ trunk/lib/FlairMeta/src/SimuX8.h	(revision 160)
@@ -23,11 +23,15 @@
 */
 class SimuX8 : public Uav {
-public:
-  // simu_id: 0 if simulating only one UAV
-  //>0 otherwise
-  SimuX8(std::string name, uint32_t simu_id = 0,std::string options="",
-         filter::UavMultiplex *multiplex = NULL);
-  ~SimuX8();
-  void StartSensors(void);
+  public:
+    // simu_id: 0 if simulating only one UAV
+    //>0 otherwise
+    SimuX8(std::string name, uint32_t simu_id = 0,std::string options="",
+           filter::UavMultiplex *multiplex = NULL);
+    ~SimuX8();
+    void StartSensors(void);
+  
+  private:
+    void ReadCameraResolutionOption(std::string options,std::string cameraName,uint16_t &camWidth,uint16_t &camHeight) const;
+ 
 };
 } // end namespace meta
