Index: /trunk/ReleaseNotes
===================================================================
--- /trunk/ReleaseNotes	(revision 86)
+++ /trunk/ReleaseNotes	(revision 87)
@@ -3,4 +3,5 @@
 - tool/FlairGCS: added rx rate display
 - demos/SimpleFleet: new demo, 2 UAVs coordination
+- srs/FlairSimulator: added fixed camera
 
 -----------------------------------------------------------
Index: /trunk/lib/FlairSimulator/src/FixedCamera.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/FixedCamera.cpp	(revision 86)
+++ /trunk/lib/FlairSimulator/src/FixedCamera.cpp	(revision 87)
@@ -35,11 +35,15 @@
 namespace simulator {
 
-FixedCamera::FixedCamera(std::string name,core::Vector3D position,float inRotateSpeed,float inZoomSpeed):VisualizationCamera(name)  {
-  RotY = -90;
-  RotZ = 0;
+FixedCamera::FixedCamera(std::string name,core::Vector3D position,core::Vector3D lookat,float inRotateSpeed,float inZoomSpeed):VisualizationCamera(name)  {
   Rotating = false;
   rotateSpeed=inRotateSpeed;
   zoomSpeed=inZoomSpeed;
+
+  camera->bindTargetAndRotation(true);
   camera->setPosition(vector3df(ToIrrlichtCoordinates(position)));
+  camera->setTarget(vector3df(ToIrrlichtCoordinates(lookat)));
+  init=false;
+  rotation=camera->getRotation();
+  printf("%f %f %f\n",rotation.X,rotation.Y,rotation.Z);
   fov=camera->getFOV();
 }
@@ -57,7 +61,13 @@
 void FixedCamera::animateNode(ISceneNode *node, u32 timeMs) {
   ICameraSceneNode *camera = static_cast<ICameraSceneNode *>(node);
+  vector3df newRotation=rotation;
 
-  float nRotY = RotY;
-  float nRotZ = RotZ;
+if(init==false) {
+  rotation=camera->getRotation();
+  printf("%f %f %f\n",rotation.X,rotation.Y,rotation.Z);
+  init=true;
+}
+  float nRotY = 0;//rotation.Y;
+  float nRotZ = rotation.Z;
 
   if (LMouseKey == true) {
@@ -65,17 +75,18 @@
       RotateStart = MousePos;
       Rotating = true;
-      nRotY = RotY;
-      nRotZ = RotZ;
+      //nRotY = rotation.Y;
+      nRotZ = rotation.Z;
     } else {
-      nRotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+      nRotY = (RotateStart.Y - MousePos.Y) * rotateSpeed;
       nRotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
-      nRotY = sat(nRotY);
+      newRotation.rotateXZBy(-nRotY);
+      //nRotY = sat(nRotY);
     }
   } else if (Rotating) {
-    RotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
-    RotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
-    RotY = sat(RotY);
-    nRotY = RotY;
-    nRotZ = RotZ;
+    //rotation.Y += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+    //rotation.Z += (RotateStart.X - MousePos.X) * rotateSpeed;
+    //rotation.Y = sat(rotation.Y);
+    //nRotY = rotation.Y;
+    nRotZ = rotation.Z;
     Rotating = false;
   }
@@ -91,6 +102,14 @@
   }
 
-  camera->setRotation(vector3df(0,nRotY,nRotZ));
-  camera->bindTargetAndRotation(true);
+
+
+  //camera->setRotation(vector3df(rotation.X,-180-nRotY,nRotZ));
+  //camera->setRotation(vector3df(rotation.X,nRotY,0));
+  //camera->bindTargetAndRotation(true);
+  camera->setRotation(rotation);
+  //camera->setTarget(vector3df(ToIrrlichtCoordinates(core::Vector3D(0,0,-2))));
+  //rotation=camera->getRotation();
+  //printf("%f %f %f\n",rotation.X,rotation.Y,rotation.Z);
+
   camera->setFOV(newFov);
 }
Index: /trunk/lib/FlairSimulator/src/FixedCamera.h
===================================================================
--- /trunk/lib/FlairSimulator/src/FixedCamera.h	(revision 86)
+++ /trunk/lib/FlairSimulator/src/FixedCamera.h	(revision 87)
@@ -26,5 +26,5 @@
 class FixedCamera : public VisualizationCamera {
 public:
-  FixedCamera(std::string name,core::Vector3D position,float rotateSpeed = -500.0f, float zoomSpeed = .1f);
+  FixedCamera(std::string name,core::Vector3D position,core::Vector3D lookat=core::Vector3D(0,0,0),float rotateSpeed = -500.0f, float zoomSpeed = .05f);
   ~FixedCamera();
 
@@ -34,9 +34,10 @@
   float sat(float value);
   irr::core::position2df RotateStart;
+  irr::core::vector3df rotation;
   bool Rotating;
   float rotateSpeed;
   float zoomSpeed;
-  float RotY, RotZ;
   float fov;
+  bool init;
 };
 
Index: /trunk/lib/FlairSimulator/src/Parser.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Parser.cpp	(revision 86)
+++ /trunk/lib/FlairSimulator/src/Parser.cpp	(revision 87)
@@ -19,5 +19,7 @@
 #include "Simulator.h"
 #include "GenericObject.h"
+#include "FixedCamera.h"
 #include <vector3d.h>
+#include <Vector3D.h>
 #include <IrrlichtDevice.h>
 #include <IFileSystem.h>
@@ -188,4 +190,8 @@
               getSceneVect(cur_node->children, (xmlChar *)"rotation"),
               getSceneVect(cur_node->children, (xmlChar *)"scale", true));
+    } else if (xmlStrEqual(cur_node->name, (xmlChar *)"camera")) {
+      FixedCamera* fixedCamera=new FixedCamera(std::string((char *)xmlGetProp(cur_node, (xmlChar *)"name")),
+                                               getMeshVector3D(cur_node->children, (xmlChar *)"position"),
+                                               getMeshVector3D(cur_node->children, (xmlChar *)"lookat"));
     }
   }
@@ -204,4 +210,16 @@
   }
   return vector3df(0, 0, 0);
+}
+
+Vector3D Parser::getMeshVector3D(xmlNode *mesh_node, xmlChar *param) {
+  xmlNode *cur_node = NULL;
+  for (cur_node = mesh_node; cur_node; cur_node = cur_node->next) {
+    if (xmlStrEqual(cur_node->name, param)) {
+      return Vector3D(atof((char *)xmlGetProp(cur_node, (xmlChar *)"x")),
+                       atof((char *)xmlGetProp(cur_node, (xmlChar *)"y")),
+                       atof((char *)xmlGetProp(cur_node, (xmlChar *)"z")));
+    }
+  }
+  return Vector3D(0, 0, 0);
 }
 
Index: /trunk/lib/FlairSimulator/src/Parser.h
===================================================================
--- /trunk/lib/FlairSimulator/src/Parser.h	(revision 86)
+++ /trunk/lib/FlairSimulator/src/Parser.h	(revision 87)
@@ -23,4 +23,10 @@
 
 namespace flair {
+  namespace core {
+    class Vector3D;
+  }
+}
+
+namespace flair {
 namespace simulator {
 class Parser : public Gui {
@@ -28,4 +34,5 @@
   /*can create:
   - cylinders: in y axis
+  - fixed cameras
 
   */
@@ -45,4 +52,5 @@
   irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
                                     bool isScale = false);
+  core::Vector3D getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
 };
 }
Index: /trunk/tools/Dbt2csv/cmake_codeblocks.sh
===================================================================
--- /trunk/tools/Dbt2csv/cmake_codeblocks.sh	(revision 86)
+++ /trunk/tools/Dbt2csv/cmake_codeblocks.sh	(revision 87)
@@ -1,3 +1,5 @@
 DIR=build_$(uname -m)
+
+### IMPORTANT: We don't use standard cmake_codeblocks script since we don't compile in release mode due to optimization problem (-03) ###
 
 #verifie l'existence du lien symbolique build
@@ -9,5 +11,5 @@
 	fi
 	if ! readlink build | grep -w $DIR >/dev/null; then
-		echo "Warnink, build was pointing to another directory."
+		echo "Warning, build was pointing to another directory."
 	fi
 	rm build
@@ -24,3 +26,3 @@
 rm -f CMakeCache.txt
 rm -rf CMakeFiles
-cmake ../ -G "CodeBlocks - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_HOST_TOOLCHAIN}
+${OECORE_HOST_NATIVE_SYSROOT}/usr/bin/cmake ../ -G "CodeBlocks - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_HOST_TOOLCHAIN}
