Index: trunk/include/FlairCore/AhrsData.h
===================================================================
--- trunk/include/FlairCore/AhrsData.h	(revision 47)
+++ trunk/include/FlairCore/AhrsData.h	(revision 50)
@@ -121,5 +121,5 @@
   *
   */
-  void SetAngularRates(const Vector3D &angularRates);
+  void SetAngularRates(const Vector3Df &angularRates);
 
   /*!
@@ -131,5 +131,5 @@
   *
   */
-  Vector3D GetAngularRates(void) const;
+  Vector3Df GetAngularRates(void) const;
 
   /*!
@@ -143,5 +143,5 @@
   */
   void GetQuaternionAndAngularRates(Quaternion &quaternion,
-                                    Vector3D &angularRates) const;
+                                    Vector3Df &angularRates) const;
 
   /*!
@@ -155,5 +155,5 @@
   */
   void SetQuaternionAndAngularRates(const Quaternion &quaternion,
-                                    const Vector3D &angularRates);
+                                    const Vector3Df &angularRates);
 
   const Type &GetDataType() const { return dataType; }
@@ -182,5 +182,5 @@
   *
   */
-  Vector3D angularRates;
+  Vector3Df angularRates;
 
   Type dataType;
Index: trunk/include/FlairCore/GpsData.h
===================================================================
--- trunk/include/FlairCore/GpsData.h	(revision 47)
+++ trunk/include/FlairCore/GpsData.h	(revision 50)
@@ -19,5 +19,4 @@
 
   class IODataElement;
-  class Vector3D;
 
 /*! \class GpsData
@@ -42,4 +41,5 @@
       size += UInt8Type.GetSize(); // FixQuality_t
       size += 5*floatType.GetSize();//e,n,u,ve,vn
+      size += 3*floatType.GetSize();//pdop,hdop,vdop
       return size;
     }
@@ -63,4 +63,7 @@
     EastVelocity /*! east velocity*/,
     NorthVelocity /*! north velocity*/,
+    Pdop /* dilution of precision*/,
+    Hdop /* horizontal dilution of precision*/,
+    Vdop /* vertical dilution of precision*/,
   } PlotableData_t;
 
@@ -215,4 +218,28 @@
   */
   void SetFixQuality(FixQuality_t fixQuality);
+  
+  /*!
+  * \brief Get dilution of precision
+  *
+  * This method is mutex protected.
+  *
+  * \param pDop dilution of precision
+  * \param hDop horizontal dilution of precision
+  * \param vDop vertical dilution of precision
+  *
+  */
+  void GetDop(float &pDop, float &hDop,float &vDop) const;
+
+  /*!
+  * \brief Set dilution of precision
+  *
+  * This method is mutex protected.
+  *
+  * \param pDop dilution of precision
+  * \param hDop horizontal dilution of precision
+  * \param vDop vertical dilution of precision
+  *
+  */
+  void SetDop(float pDop, float hDop,float vDop);
 
   Type const &GetDataType() const { return dataType; }
@@ -235,5 +262,5 @@
   uint8_t numberOfSatellites;
   FixQuality_t fixQuality;
-  float east,north,up,eastVelocity,northVelocity;
+  float east,north,up,eastVelocity,northVelocity,pDop,hDop,vDop;
 };
 
Index: trunk/include/FlairCore/I2cPort.h
===================================================================
--- trunk/include/FlairCore/I2cPort.h	(revision 47)
+++ trunk/include/FlairCore/I2cPort.h	(revision 50)
@@ -95,5 +95,5 @@
 };
 } // end namespace core
-} // end namespace framework
+} // end namespace flair
 
 #endif // I2CPORT_H
Index: trunk/include/FlairCore/IODataElement.h
===================================================================
--- trunk/include/FlairCore/IODataElement.h	(revision 47)
+++ trunk/include/FlairCore/IODataElement.h	(revision 50)
@@ -56,5 +56,5 @@
 
 } // end namespace core
-} // end namespace framework
+} // end namespace flair
 
 #endif // IODATAELEMENT_H
Index: trunk/include/FlairCore/IODevice.h
===================================================================
--- trunk/include/FlairCore/IODevice.h	(revision 47)
+++ trunk/include/FlairCore/IODevice.h	(revision 50)
@@ -110,4 +110,14 @@
   */
   void OutputToShMem(bool enabled);
+  
+  /*!
+  * \brief is device ready
+  *
+  * Use it check if a device is ready or not.
+  * See also setIsReady.
+  *
+  * \return true if device is ready
+  */
+  bool IsReady(void) const;
 
   // TODO: these 2 method should be pure virtual
@@ -115,19 +125,29 @@
   virtual DataType const &GetOutputDataType() const;
 
-        protected:
-            /*!
-            * \brief Process the childs of type IODevice, and log if needed
-            *
-            * This method must be called after computing datas;
-            * generally at the end of the reimplemented UpdateFrom or after acquiring datas in case of a sensor. \n
-            * It will call UpdateFrom methods of each child of type IODevice,
-            * and log all datas (this IODevice and its childs)
-            * if logging is enabled (see SetDataToLog(), AddDeviceToLog(),
-            * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n
-            * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be resumed.
-            *
-            * \param data data to process
-            */
-            void ProcessUpdate(io_data* data);
+  protected:
+    /*!
+    * \brief Process the childs of type IODevice, and log if needed
+    *
+    * This method must be called after computing datas;
+    * generally at the end of the reimplemented UpdateFrom or after acquiring datas in case of a sensor. \n
+    * It will call UpdateFrom methods of each child of type IODevice,
+    * and log all datas (this IODevice and its childs)
+    * if logging is enabled (see SetDataToLog(), AddDeviceToLog(),
+    * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n
+    * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be resumed.
+    *
+    * \param data data to process
+    */
+    void ProcessUpdate(io_data* data);
+    
+    /*!
+    * \brief set is ready
+    *
+    * Sets if the device is ready or not. By default the IODevice is not ready.\n
+    * See also isReady.
+    *
+    * \param status status
+    */
+    void SetIsReady(bool status);
 
 private:
Index: trunk/include/FlairCore/ImuData.h
===================================================================
--- trunk/include/FlairCore/ImuData.h	(revision 47)
+++ trunk/include/FlairCore/ImuData.h	(revision 50)
@@ -104,5 +104,5 @@
   *
   */
-  Vector3D GetRawAcc(void) const;
+  Vector3Df GetRawAcc(void) const;
 
   /*!
@@ -114,5 +114,5 @@
   *
   */
-  Vector3D GetRawMag(void) const;
+  Vector3Df GetRawMag(void) const;
 
   /*!
@@ -124,5 +124,5 @@
   *
   */
-  Vector3D GetRawGyr(void) const;
+  Vector3Df GetRawGyr(void) const;
 
   /*!
@@ -136,6 +136,6 @@
   *
   */
-  void GetRawAccMagAndGyr(Vector3D &rawAcc, Vector3D &rawMag,
-                          Vector3D &rawGyr) const;
+  void GetRawAccMagAndGyr(Vector3Df &rawAcc, Vector3Df &rawMag,
+                          Vector3Df &rawGyr) const;
 
   /*!
@@ -147,5 +147,5 @@
   *
   */
-  void SetRawAcc(const Vector3D &rawAcc);
+  void SetRawAcc(const Vector3Df &rawAcc);
 
   /*!
@@ -157,5 +157,5 @@
   *
   */
-  void SetRawMag(const Vector3D &rawMag);
+  void SetRawMag(const Vector3Df &rawMag);
 
   /*!
@@ -167,5 +167,5 @@
   *
   */
-  void SetRawGyr(const Vector3D &rawGyr);
+  void SetRawGyr(const Vector3Df &rawGyr);
 
   /*!
@@ -179,6 +179,6 @@
   *
   */
-  void SetRawAccMagAndGyr(const Vector3D &rawAcc, const Vector3D &rawMag,
-                          const Vector3D &rawGyr);
+  void SetRawAccMagAndGyr(const Vector3Df &rawAcc, const Vector3Df &rawMag,
+                          const Vector3Df &rawGyr);
 
   Type const &GetDataType() const { return dataType; }
@@ -199,5 +199,5 @@
   *
   */
-  Vector3D rawAcc;
+  Vector3Df rawAcc;
 
   /*!
@@ -205,5 +205,5 @@
   *
   */
-  Vector3D rawGyr;
+  Vector3Df rawGyr;
 
   /*!
@@ -211,5 +211,5 @@
   *
   */
-  Vector3D rawMag;
+  Vector3Df rawMag;
 
   void Queue(char **dst, const void *src, size_t size) const;
Index: trunk/include/FlairCore/OneAxisRotation.h
===================================================================
--- trunk/include/FlairCore/OneAxisRotation.h	(revision 47)
+++ trunk/include/FlairCore/OneAxisRotation.h	(revision 50)
@@ -15,4 +15,5 @@
 
 #include <GroupBox.h>
+#include <Vector3D.h>
 
 class OneAxisRotation_impl;
@@ -24,5 +25,4 @@
 
 namespace core {
-class Vector3D;
 class Euler;
 class Quaternion;
@@ -57,7 +57,7 @@
   * \brief Compute rotation
   *
-  * \param vector Vector3D to rotate
+  * \param vector Vector3Df to rotate
   */
-  void ComputeRotation(core::Vector3D &vector) const;
+  template <typename T> void ComputeRotation(core::Vector3D<T> &vector) const;
 
   /*!
@@ -81,4 +81,12 @@
   */
   void ComputeRotation(core::RotationMatrix &matrix) const;
+  
+  /*!
+  * \brief Get angle
+  *
+  * \return angle in radians
+  */
+  float GetAngle() const;
+  int GetAxis() const;
 
 private:
Index: trunk/include/FlairCore/Quaternion.h
===================================================================
--- trunk/include/FlairCore/Quaternion.h	(revision 47)
+++ trunk/include/FlairCore/Quaternion.h	(revision 50)
@@ -13,8 +13,9 @@
 #define QUATERNION_H
 
+#include <Vector3D.h>
+
 namespace flair {
 namespace core {
 class Euler;
-class Vector3D;
 class RotationMatrix;
 
@@ -62,5 +63,5 @@
   * \param logarithm output logarithm
   */
-  void GetLogarithm(Vector3D &logarithm);
+  void GetLogarithm(Vector3Df &logarithm);
 
   /*!
@@ -71,5 +72,5 @@
   * \return output logarithm
   */
-  Vector3D GetLogarithm(void);
+  Vector3Df GetLogarithm(void);
 
   /*!
@@ -92,5 +93,5 @@
   * \return derivative
   */
-  Quaternion GetDerivative(const Vector3D &angularSpeed) const;
+  Quaternion GetDerivative(const Vector3Df &angularSpeed) const;
 
   /*!
@@ -99,5 +100,5 @@
   * \param w rotationonal speed
   */
-  void Derivate(const Vector3D &angularSpeed);
+  void Derivate(const Vector3Df &angularSpeed);
 
   /*!
Index: trunk/include/FlairCore/SerialPort.h
===================================================================
--- trunk/include/FlairCore/SerialPort.h	(revision 47)
+++ trunk/include/FlairCore/SerialPort.h	(revision 50)
@@ -85,5 +85,5 @@
 };
 } // end namespace core
-} // end namespace framework
+} // end namespace flair
 
 #endif // SERIALPORT_H
Index: trunk/include/FlairCore/SharedMem.h
===================================================================
--- trunk/include/FlairCore/SharedMem.h	(revision 47)
+++ trunk/include/FlairCore/SharedMem.h	(revision 50)
@@ -32,4 +32,5 @@
 class SharedMem : public Object {
 public:
+  enum class Type { mutex, producerConsumer };
   /*!
   * \brief Constructor
@@ -40,6 +41,7 @@
   * \param name name
   * \param size size of the shared memory
+  * \param blockOnRead if true reading will block if nothing written
   */
-  SharedMem(const Object *parent, std::string name, size_t size);
+  SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex);
 
   /*!
@@ -65,6 +67,12 @@
   void Read(char *buf, size_t size) const;
 
+
+  /*!
+  * \brief This function should be called when reader starts (in case of a SharedMem of type producerConsumer)
+  */
+   void ReaderReady();
 private:
   SharedMem_impl *pimpl_;
+  Type type;
 };
 
Index: trunk/include/FlairCore/Thread.h
===================================================================
--- trunk/include/FlairCore/Thread.h	(revision 47)
+++ trunk/include/FlairCore/Thread.h	(revision 50)
@@ -176,4 +176,12 @@
   */
   bool IsSuspended(void) const;
+  
+  /*!
+  * \brief Is the thread running?
+  *
+  * \return true if thread is running (call to Start). A suspended thread is running.
+  *
+  */
+  bool IsRunning(void) const;
 
   /*!
Index: trunk/include/FlairCore/UdpSocket.h
===================================================================
--- trunk/include/FlairCore/UdpSocket.h	(revision 50)
+++ trunk/include/FlairCore/UdpSocket.h	(revision 50)
@@ -0,0 +1,111 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file Socket.h
+ * \brief Class defining a UDP socket
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2013/11/17
+ * \version 4.0
+ */
+
+#ifndef UDPSOCKET_H
+#define UDPSOCKET_H
+
+#include <unistd.h>
+#include <stdint.h>
+#include <Object.h>
+
+class UdpSocket_impl;
+
+namespace flair {
+namespace core {
+
+/*! \class UdpSocket
+*
+* \brief Class encapsulating a UDP socket. It assumes packets are coming from
+*only one distant host on a given port.
+*
+*/
+class UdpSocket : public Object {
+public:
+  /*!
+  * \brief Constructor
+  *
+  * Construct the client side of the socket
+  *
+  * \param parent parent
+  * \param name name
+  * \param address server address (ex 192.168.1.1:9000)
+  * \param broadcast true if address is a broadcast address
+  */
+  UdpSocket(const Object *parent, std::string name, std::string address,
+         bool broadcast = false);
+
+  /*!
+  * \brief Constructor
+  *
+  * Construct the server side of the socket
+  *
+  * \param parent parent
+  * \param name name
+  * \param port listening port
+  */
+  UdpSocket(const Object *parent, std::string name, uint16_t port);
+
+  /*!
+  * \brief Destructor
+  *
+  */
+  ~UdpSocket();
+
+  /*!
+  * \brief Send a message
+  *
+  * In case of a broadcast Socket, Parent()->ObjectName() is used as source of
+  *the message, this name should be unique.
+  *
+  * \param message message
+  */
+  void SendMessage(std::string message);
+
+  /*!
+  * \brief Send a message
+  *
+  * \param message message
+  * \param message_len message length
+  */
+  void SendMessage(const char *message, size_t message_len);
+
+  /*!
+  * \brief Receive a message
+  *
+  * Receive a message and wait up to timeout. \n
+  * If src and src_len are specified, the source of the message will be
+  * copied in the src buffer. \n
+  * Note that in case of a broadcast socket, own messages are filtered and
+  * are not received.
+  *
+  * \param buf buffer to put the message
+  * \param buf_len buffer length
+  * \param timeout timeout
+  * \param src buffer to put source name
+  * \param src_len buffer length
+  *
+  * \return size of the received message
+  */
+  ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout, char *src = NULL,
+                      size_t *src_len = NULL);
+
+  void NetworkToHost(char *data, size_t dataSize);
+  void HostToNetwork(char *data, size_t dataSize);
+
+private:
+  class UdpSocket_impl *pimpl_;
+};
+
+} // end namespace core
+} // end namespace flair
+
+#endif // UDPSOCKET_H
Index: trunk/include/FlairCore/Vector2D.h
===================================================================
--- trunk/include/FlairCore/Vector2D.h	(revision 47)
+++ trunk/include/FlairCore/Vector2D.h	(revision 50)
@@ -21,4 +21,5 @@
 * \brief Class defining a 2D vector
 */
+template <typename T>
 class Vector2D {
 public:
@@ -31,5 +32,5 @@
   * \param y
   */
-  Vector2D(float x = 0, float y = 0);
+  Vector2D(T x = 0, T y = 0);
 
   /*!
@@ -73,5 +74,5 @@
   * \param max maximum Vector2D value
   */
-  void Saturate(Vector2D min, Vector2D max);
+  void Saturate(Vector2D<T> min, Vector2D<T> max);
 
   /*!
@@ -92,5 +93,5 @@
   * \param value saturation Vector2D value
   */
-  void Saturate(const Vector2D &value);
+  void Saturate(const Vector2D<T> &value);
 
   /*!
@@ -106,13 +107,21 @@
   * \brief x
   */
-  float x;
+  T x;
 
   /*!
   * \brief y
   */
-  float y;
+  T y;
 
-  Vector2D &operator=(const Vector2D &vector);
+  template<typename S> Vector2D<T> &operator=(const Vector2D<S> &vector) {
+    x = vector.x;
+    y = vector.y;
+    return (*this);
+  }
+  Vector2D<T> &operator+=(const Vector2D<T> &vector);
+  Vector2D<T> &operator-=(const Vector2D<T> &vector);
 };
+
+typedef Vector2D<float> Vector2Df;
 
 /*! Add
@@ -123,5 +132,5 @@
 * \param vectorB vector
 */
-Vector2D operator+(const Vector2D &vectorA, const Vector2D &vectorB);
+template<typename T> Vector2D<T> operator+(const Vector2D<T> &vectorA, const Vector2D<T> &vectorB);
 
 /*! Substract
@@ -132,5 +141,15 @@
 * \param vectorB vector
 */
-Vector2D operator-(const Vector2D &vectorA, const Vector2D &vectorB);
+template<typename T> Vector2D<T> operator-(const Vector2D<T> &vectorA, const Vector2D<T> &vectorB);
+
+/*! Opposite
+*
+* \brief Opposite
+*
+* \param vectorA vector
+* 
+* \return -vectorA
+*/
+template<typename T> Vector2D<T> operator-(const Vector2D<T> &vectorA);
 
 /*! Divid
@@ -142,5 +161,5 @@
 * \return vector/coefficient
 */
-Vector2D operator/(const Vector2D &vector, float coeff);
+template<typename T> Vector2D<T> operator/(const Vector2D<T> &vector, float coeff);
 
 /*! Multiply
@@ -152,5 +171,5 @@
 * \return coefficient*vector
 */
-Vector2D operator*(const Vector2D &vector, float coeff);
+template<typename T> Vector2D<T> operator*(const Vector2D<T> &vector, float coeff);
 
 /*! Multiply
@@ -162,5 +181,5 @@
 * \return coefficient*vector
 */
-Vector2D operator*(float coeff, const Vector2D &vector);
+template<typename T> Vector2D<T> operator*(float coeff, const Vector2D<T> &vector);
 
 } // end namespace core
Index: trunk/include/FlairCore/Vector3D.h
===================================================================
--- trunk/include/FlairCore/Vector3D.h	(revision 47)
+++ trunk/include/FlairCore/Vector3D.h	(revision 50)
@@ -15,8 +15,8 @@
 
 #include <stddef.h>
+#include <Vector2D.h>
 
 namespace flair {
 namespace core {
-class Vector2D;
 class RotationMatrix;
 class Quaternion;
@@ -26,4 +26,5 @@
 * \brief Class defining a 3D vector
 */
+template <typename T>
 class Vector3D {
 public:
@@ -37,5 +38,5 @@
   * \param z
   */
-  Vector3D(float x = 0, float y = 0, float z = 0);
+  Vector3D(T x = 0, T y = 0, T z = 0);
 
   /*!
@@ -48,15 +49,15 @@
   * \brief x
   */
-  float x;
+  T x;
 
   /*!
   * \brief y
   */
-  float y;
+  T y;
 
   /*!
   * \brief z
   */
-  float z;
+  T z;
 
   /*!
@@ -126,5 +127,5 @@
   * \param vector destination
   */
-  void To2Dxy(Vector2D &vector) const;
+  void To2Dxy(Vector2D<T> &vector) const;
 
   /*!
@@ -135,5 +136,5 @@
   * \return destination
   */
-  Vector2D To2Dxy(void) const;
+  Vector2D<T> To2Dxy(void) const;
 
   /*!
@@ -157,5 +158,5 @@
   * \param max maximum value
   */
-  void Saturate(const Vector3D &min, const Vector3D &max);
+  void Saturate(const Vector3D<T> &min, const Vector3D<T> &max);
 
   /*!
@@ -176,5 +177,5 @@
   * \param value saturation Vector3D value
   */
-  void Saturate(const Vector3D &value);
+  void Saturate(const Vector3D<T> &value);
 
   /*!
@@ -188,13 +189,21 @@
   void Saturate(float value);
 
-  float &operator[](size_t idx);
-  const float &operator[](size_t idx) const;
-  Vector3D &operator=(const Vector3D &vector);
-  Vector3D &operator+=(const Vector3D &vector);
-  Vector3D &operator-=(const Vector3D &vector);
+  T &operator[](size_t idx);
+  const T &operator[](size_t idx) const;
+  //Vector3D<T> &operator=(const Vector3D<T> &vector);
+  template<typename S> Vector3D<T> &operator=(const Vector3D<S> &vector) {
+    x = vector.x;
+    y = vector.y;
+    z = vector.z;
+    return (*this);
+  }
+  Vector3D<T> &operator+=(const Vector3D<T> &vector);
+  Vector3D<T> &operator-=(const Vector3D<T> &vector);
 
 private:
 };
 
+typedef Vector3D<float> Vector3Df;
+
 /*! Add
 *
@@ -206,5 +215,5 @@
 * \return vectorA+vectorB
 */
-Vector3D operator+(const Vector3D &vectorA, const Vector3D &vectorB);
+template<typename T> Vector3D<T> operator+(const Vector3D<T> &vectorA, const Vector3D<T> &vectorB);
 
 /*! Substract
@@ -217,5 +226,5 @@
 * \return vectorA-vectorB
 */
-Vector3D operator-(const Vector3D &vectorA, const Vector3D &vectorB);
+template<typename T> Vector3D<T> operator-(const Vector3D<T> &vectorA, const Vector3D<T> &vectorB);
 
 /*! Minus
@@ -227,5 +236,5 @@
 * \return -vector
 */
-Vector3D operator-(const Vector3D &vector);
+template<typename T> Vector3D<T> operator-(const Vector3D<T> &vector);
 
 /*! Divid
@@ -238,5 +247,5 @@
 * \return vector/coefficient
 */
-Vector3D operator/(const Vector3D &vector, float coeff);
+template<typename T> Vector3D<T> operator/(const Vector3D<T> &vector, float coeff);
 
 /*! Hadamard product
@@ -249,5 +258,5 @@
 * \return Hadamard product
 */
-Vector3D operator*(const Vector3D &vectorA, const Vector3D &vectorB);
+template<typename T> Vector3D<T> operator*(const Vector3D<T> &vectorA, const Vector3D<T> &vectorB);
 
 /*! Multiply
@@ -260,5 +269,5 @@
 * \return coefficient*vector
 */
-Vector3D operator*(const Vector3D &vector, float coeff);
+template<typename T> Vector3D<T> operator*(const Vector3D<T> &vector, float coeff);
 
 /*! Multiply
@@ -271,5 +280,5 @@
 * \return coefficient*vector
 */
-Vector3D operator*(float coeff, const Vector3D &vector);
+template<typename T> Vector3D<T> operator*(float coeff, const Vector3D<T> &vector);
 
 /*! Cross product
@@ -282,5 +291,5 @@
 * \return cross product
 */
-Vector3D CrossProduct(const Vector3D &vectorA, const Vector3D &vectorB);
+template<typename T> Vector3D<T> CrossProduct(const Vector3D<T> &vectorA, const Vector3D<T> &vectorB);
 
 /*! Dot product
@@ -293,5 +302,5 @@
 * \return dot product
 */
-float DotProduct(const Vector3D &vectorA, const Vector3D &vectorB);
+template<typename T> float DotProduct(const Vector3D<T> &vectorA, const Vector3D<T> &vectorB);
 
 } // end namespace core
Index: trunk/include/FlairCore/Vector3DSpinBox.h
===================================================================
--- trunk/include/FlairCore/Vector3DSpinBox.h	(revision 47)
+++ trunk/include/FlairCore/Vector3DSpinBox.h	(revision 50)
@@ -44,5 +44,5 @@
   Vector3DSpinBox(const LayoutPosition *position, std::string name, double min,
                   double max, double step, int decimals = 2,
-                  core::Vector3D default_value = core::Vector3D(0, 0, 0));
+                  core::Vector3Df default_value = core::Vector3Df(0, 0, 0));
 
   /*!
@@ -57,5 +57,5 @@
   * \return value
   */
-  core::Vector3D Value(void) const;
+  core::Vector3Df Value(void) const;
   // operator core::Vector3D() const;
 private:
@@ -68,5 +68,5 @@
   void XmlEvent(void);
 
-  core::Vector3D box_value;
+  core::Vector3Df box_value;
 };
 
Index: trunk/include/FlairCore/Vector3Ddata.h
===================================================================
--- trunk/include/FlairCore/Vector3Ddata.h	(revision 47)
+++ trunk/include/FlairCore/Vector3Ddata.h	(revision 50)
@@ -26,5 +26,5 @@
 * User must manually use the io_data's Mutex to access to Vector3D values.
 */
-class Vector3Ddata : public io_data, public Vector3D {
+class Vector3Ddata : public io_data, public Vector3Df {
 public:
   /*!
Index: trunk/include/FlairCore/cvmatrix.h
===================================================================
--- trunk/include/FlairCore/cvmatrix.h	(revision 47)
+++ trunk/include/FlairCore/cvmatrix.h	(revision 50)
@@ -55,8 +55,9 @@
   * Construct an io_data representing a CvMat. \n
   * It uses a cvmatrix_descriptor to get size and elements' names. \n
-  * Names are used for graphs and logs.
+  * Names are used for graphs and logs. \n
+  * All values are initialized to 0.
   *
   * \param parent parent
-  * \param descriptor matrix description
+  * \param descriptor matrix description, it is safe to destroy it after calling this constructor
   * \param type type of matrix elements
   * \param name name
@@ -71,5 +72,6 @@
   *
   * Construct an io_data representing a CvMat. \n
-  * Elements are unamed.
+  * Elements are unamed. \n
+  * All values are initialized to 0.
   *
   * \param parent parent
Index: trunk/include/FlairFilter/Ahrs.h
===================================================================
--- trunk/include/FlairFilter/Ahrs.h	(revision 47)
+++ trunk/include/FlairFilter/Ahrs.h	(revision 50)
@@ -19,8 +19,4 @@
 namespace flair {
   namespace core {
-    class Euler;
-    class Vector3D;
-    class ImuData;
-    class Quaternion;
     class AhrsData;
   }
@@ -174,5 +170,7 @@
   /*!
   * \brief Get ahrs datas
-  *
+  * 
+  * Can be used by dervied class to fill core::AhrsData
+  * 
   * \param ahrsData ahrs datas
   */
Index: trunk/include/FlairFilter/AhrsComplementaryFilter.h
===================================================================
--- trunk/include/FlairFilter/AhrsComplementaryFilter.h	(revision 47)
+++ trunk/include/FlairFilter/AhrsComplementaryFilter.h	(revision 50)
@@ -66,5 +66,5 @@
             bool isInit;
             core::Quaternion QHat;
-            core::Vector3D BHat;
+            core::Vector3Df BHat;
             gui::DoubleSpinBox *ka[3];
             gui::DoubleSpinBox *kb[3];
Index: trunk/include/FlairFilter/ButterworthLowPass.h
===================================================================
--- trunk/include/FlairFilter/ButterworthLowPass.h	(revision 47)
+++ trunk/include/FlairFilter/ButterworthLowPass.h	(revision 50)
@@ -48,8 +48,10 @@
   * \param name name
   * \param order order of the filter
+  * \param nbRow number of rows of input/output
+  * \param nbCol number of cols of input/output
   */
   ButterworthLowPass(const IODevice *parent,
                      const gui::LayoutPosition *position, std::string name,
-                     int order);
+                     uint32_t order,uint32_t nbRow=1,uint32_t nbCol=1);
 
   /*!
@@ -65,7 +67,9 @@
   * \param name name
   * \param order order of the filter
+  * \param nbRow number of rows of input/output
+  * \param nbCol number of cols of input/output
   */
   ButterworthLowPass(const gui::LayoutPosition *position, std::string name,
-                     int order);
+                     uint32_t order,uint32_t nbRow,uint32_t nbCol);
 
   /*!
Index: trunk/include/FlairFilter/EulerDerivative.h
===================================================================
--- trunk/include/FlairFilter/EulerDerivative.h	(revision 47)
+++ trunk/include/FlairFilter/EulerDerivative.h	(revision 50)
@@ -45,5 +45,5 @@
   * IODevice::ProcessUpdate is called. \n
   * The optional init_value parameters allow to specify
-  * the size of the input datas and its inital values.
+  * the size of the input datas and output inital values.
   * If unspecified, a 1*1 size is used, and values are
   * initialized with 0.
@@ -52,5 +52,5 @@
   * \param position position to display settings
   * \param name name
-  * \param init_value initial value
+  * \param init_value initial value, it is safe to destroy it after calling this constructor
   */
   EulerDerivative(const core::IODevice *parent,
Index: trunk/include/FlairFilter/Gx3_25_ahrs.h
===================================================================
--- trunk/include/FlairFilter/Gx3_25_ahrs.h	(revision 47)
+++ trunk/include/FlairFilter/Gx3_25_ahrs.h	(revision 50)
@@ -30,7 +30,6 @@
   * \brief Constructor
   *
-  * Construct an Ahrs for 3dmgx3-25
+  * Construct an Ahrs for 3dmgx3-25. It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param serialport Imu SerialPort
@@ -38,5 +37,5 @@
   * \param priority priority of the Gx3_25_imu Thread
   */
-  Gx3_25_ahrs(const core::FrameworkManager *parent, std::string name,
+  Gx3_25_ahrs(std::string name,
               core::SerialPort *serialport,
               sensor::Gx3_25_imu::Command_t command, uint8_t priority);
@@ -47,10 +46,4 @@
   */
   ~Gx3_25_ahrs();
-
-  /*!
-  * \brief Start Gx3_25_imu Thread
-  *
-  */
-  void Start(void);
 
 private:
Index: trunk/include/FlairFilter/LowPassFilter.h
===================================================================
--- trunk/include/FlairFilter/LowPassFilter.h	(revision 47)
+++ trunk/include/FlairFilter/LowPassFilter.h	(revision 50)
@@ -52,5 +52,5 @@
   * \param position position to display settings
   * \param name name
-  * \param init_value initial value
+  * \param init_value initial value, it is safe to destroy it after calling this constructor
   */
   LowPassFilter(const core::IODevice *parent,
Index: trunk/include/FlairFilter/SimuAhrs.h
===================================================================
--- trunk/include/FlairFilter/SimuAhrs.h	(revision 47)
+++ trunk/include/FlairFilter/SimuAhrs.h	(revision 50)
@@ -30,13 +30,13 @@
   * \brief Constructor
   *
-  * Construct a simulation Ahrs.
+  * Construct a simulation Ahrs. It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
-  * \param dev_id number id of the simulated Ahrs
+  * \param modelId Model id
+  * \param deviceId Ahrs id of the Model
   * \param priority priority of the SimuImu Thread
   */
-  SimuAhrs(const core::FrameworkManager *parent, std::string name,
-           uint32_t dev_id, uint8_t priority);
+  SimuAhrs(std::string name,
+           uint32_t modelId,uint32_t deviceId, uint8_t priority);
 
   /*!
@@ -45,10 +45,4 @@
   */
   ~SimuAhrs();
-
-  /*!
- * \brief Start SimuImu Thread
- *
- */
-  void Start(void);
 
 private:
Index: trunk/include/FlairFilter/TrajectoryGenerator1D.h
===================================================================
--- trunk/include/FlairFilter/TrajectoryGenerator1D.h	(revision 47)
+++ trunk/include/FlairFilter/TrajectoryGenerator1D.h	(revision 50)
@@ -72,8 +72,10 @@
   * \brief Start trajectory
   *
-  * \param start_pos start position
-  * \param end_pos end position
+  * \param startPosition start position
+  * \param endPosition end position
+  * \param startVelocity start velocity, should be actual velocity. This value will be saturated 
+  * max velocity defined in GCS.
   */
-  void StartTraj(float start_pos, float end_pos);
+  void StartTraj(float startPosition, float endPosition,float startVelocity=0);
 
   /*!
Index: trunk/include/FlairFilter/TrajectoryGenerator2DCircle.h
===================================================================
--- trunk/include/FlairFilter/TrajectoryGenerator2DCircle.h	(revision 47)
+++ trunk/include/FlairFilter/TrajectoryGenerator2DCircle.h	(revision 50)
@@ -15,9 +15,9 @@
 
 #include <IODevice.h>
+#include <Vector2D.h>
 
 namespace flair {
 namespace core {
 class cvmatrix;
-class Vector2D;
 }
 namespace gui {
@@ -72,5 +72,5 @@
   * \param nb_lap number of laps, -1 for infinite
   */
-  void StartTraj(const core::Vector2D &start_pos, float nb_lap = -1);
+  void StartTraj(const core::Vector2Df &start_pos, float nb_lap = -1);
 
   /*!
@@ -93,5 +93,5 @@
   * \param value center position
   */
-  void SetCenter(const core::Vector2D &value);
+  void SetCenter(const core::Vector2Df &value);
 
   /*!
@@ -100,5 +100,5 @@
   * \param value center speed
   */
-  void SetCenterSpeed(const core::Vector2D &value);
+  void SetCenterSpeed(const core::Vector2Df &value);
 
   /*!
@@ -117,5 +117,5 @@
   * \param point returned position
   */
-  void GetPosition(core::Vector2D &point) const;
+  void GetPosition(core::Vector2Df &point) const;
 
   /*!
@@ -124,5 +124,5 @@
   * \param point returned speed
   */
-  void GetSpeed(core::Vector2D &point) const;
+  void GetSpeed(core::Vector2Df &point) const;
 
   /*!
Index: trunk/include/FlairFilter/UavMultiplex.h
===================================================================
--- trunk/include/FlairFilter/UavMultiplex.h	(revision 47)
+++ trunk/include/FlairFilter/UavMultiplex.h	(revision 50)
@@ -19,5 +19,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class io_data;
 }
@@ -41,10 +40,9 @@
   * \brief Constructor
   *
-  * Construct a uav multiplexing
-  *
-  * \param parent parent
+  * Construct a uav multiplexing. It will be child of the FrameworkManager.
+  *
   * \param name name
   */
-  UavMultiplex(const core::FrameworkManager *parent, std::string name);
+  UavMultiplex(std::string name);
 
   /*!
Index: trunk/include/FlairFilter/X4X8Multiplex.h
===================================================================
--- trunk/include/FlairFilter/X4X8Multiplex.h	(revision 47)
+++ trunk/include/FlairFilter/X4X8Multiplex.h	(revision 50)
@@ -59,12 +59,10 @@
   * \brief Constructor
   *
-  * Construct a X4 and X8 multiplexing
+  * Construct a X4 and X8 multiplexing. It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param type type
   */
-  X4X8Multiplex(const core::FrameworkManager *parent, std::string name,
-                UavType_t type);
+  X4X8Multiplex(std::string name, UavType_t type);
 
   /*!
Index: trunk/include/FlairMeta/HdsX8.h
===================================================================
--- trunk/include/FlairMeta/HdsX8.h	(revision 47)
+++ trunk/include/FlairMeta/HdsX8.h	(revision 50)
@@ -24,9 +24,11 @@
 class HdsX8 : public Uav {
 public:
-  HdsX8(std::string name,
+  HdsX8(std::string name,std::string options="",
         filter::UavMultiplex *multiplex = NULL);
   ~HdsX8();
   void StartSensors(void);
 	std::string GetDefaultVrpnAddress(void) const{return "192.168.147.197:3883";}
+  bool isReadyToFly(void) const;
+  virtual std::string GetType(void) const{return "hds_x8";}
 
 private:
Index: trunk/include/FlairMeta/MetaDualShock3.h
===================================================================
--- trunk/include/FlairMeta/MetaDualShock3.h	(revision 47)
+++ trunk/include/FlairMeta/MetaDualShock3.h	(revision 50)
@@ -40,5 +40,5 @@
 
 public:
-  MetaDualShock3(core::FrameworkManager *parent, std::string name,
+  MetaDualShock3(std::string name,
                  sensor::TargetController *controller);
   ~MetaDualShock3();
Index: trunk/include/FlairMeta/MetaVrpnObject.h
===================================================================
--- trunk/include/FlairMeta/MetaVrpnObject.h	(revision 47)
+++ trunk/include/FlairMeta/MetaVrpnObject.h	(revision 50)
@@ -15,11 +15,8 @@
 
 #include <VrpnObject.h>
-#include "io_data.h"
+#include <io_data.h>
+#include <Vector3D.h>
 
 namespace flair {
-	namespace core {
-		class Vector3D;
-		class FloatType;
-	}
 	namespace gui {
 		class DataPlot1D;
@@ -51,5 +48,5 @@
   gui::DataPlot1D *VzPlot(void) const; // 1,2
   gui::DataPlot2D *XyPlot(void) const;
-  void GetSpeed(core::Vector3D &speed) const;
+  void GetSpeed(core::Vector3Df &speed) const;
 
 private:
@@ -60,5 +57,4 @@
   gui::DataPlot1D *vx_opti_plot, *vy_opti_plot, *vz_opti_plot;
   gui::Tab *plot_tab;
-  core::FloatType elementDataType;
 };
 } // end namespace meta
Index: trunk/include/FlairMeta/SimuX4.h
===================================================================
--- trunk/include/FlairMeta/SimuX4.h	(revision 47)
+++ trunk/include/FlairMeta/SimuX4.h	(revision 50)
@@ -18,4 +18,5 @@
 namespace flair {
 namespace meta {
+  
 /*! \class SimuX4
 *
@@ -23,11 +24,16 @@
 */
 class SimuX4 : public Uav {
-public:
-  // simu_id: 0 if simulating only one UAV
-  //>0 otherwise
-  SimuX4(std::string name, int simu_id = 0,
-         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);
+    virtual std::string GetType(void) const{return "x4_simu";}
+
+  private:
+    void ReadCameraResolutionOption(std::string options,std::string cameraName,uint16_t &camWidth,uint16_t &camHeight) const;
+  
 };
 } // end namespace meta
Index: trunk/include/FlairMeta/SimuX8.h
===================================================================
--- trunk/include/FlairMeta/SimuX8.h	(revision 47)
+++ trunk/include/FlairMeta/SimuX8.h	(revision 50)
@@ -23,11 +23,16 @@
 */
 class SimuX8 : public Uav {
-public:
-  // simu_id: 0 if simulating only one UAV
-  //>0 otherwise
-  SimuX8(std::string name, int simu_id = 0,
-         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);
+    virtual std::string GetType(void) const{return "simu_x8";}
+  
+  private:
+    void ReadCameraResolutionOption(std::string options,std::string cameraName,uint16_t &camWidth,uint16_t &camHeight) const;
+ 
 };
 } // end namespace meta
Index: trunk/include/FlairMeta/Uav.h
===================================================================
--- trunk/include/FlairMeta/Uav.h	(revision 47)
+++ trunk/include/FlairMeta/Uav.h	(revision 50)
@@ -15,4 +15,5 @@
 
 #include <Object.h>
+#include <UsRangeFinder.h>
 
 namespace flair {
@@ -62,9 +63,11 @@
   sensor::Camera *GetHorizontalCamera(void) const;
 	virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
+  virtual bool isReadyToFly(void) const { return true;}
+  virtual std::string GetType(void) const=0;
 
 protected:
   void SetBldc(const actuator::Bldc *bldc);
   void SetMultiplex(const filter::UavMultiplex *multiplex);
-  void SetAhrs(const filter::Ahrs *ahrs);
+  void SetAhrs(const filter::Ahrs *ahrs);//also sets imu (retrieved from the ahrs)
   void SetUsRangeFinder(const sensor::UsRangeFinder *us);
   void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
Index: trunk/include/FlairMeta/UavFactory.h
===================================================================
--- trunk/include/FlairMeta/UavFactory.h	(revision 47)
+++ trunk/include/FlairMeta/UavFactory.h	(revision 50)
@@ -21,8 +21,8 @@
 #include <Uav.h>
 
-flair::meta::Uav *CreateUav(std::string name, std::string type,
+flair::meta::Uav *CreateUav(std::string name, std::string type,std::string options="",
                             flair::filter::UavMultiplex *multiplex = NULL);
 
-void RegisterUavCreator(flair::meta::Uav*(*func)(std::string name, std::string type,
-                                   flair::filter::UavMultiplex *multiplex));
+void RegisterUavCreator(flair::meta::Uav*(*func)(std::string,std::string,std::string,
+                                   flair::filter::UavMultiplex*));
 #endif // UAVFACTORY
Index: trunk/include/FlairMeta/UavStateMachine.h
===================================================================
--- trunk/include/FlairMeta/UavStateMachine.h	(revision 47)
+++ trunk/include/FlairMeta/UavStateMachine.h	(revision 50)
@@ -107,5 +107,5 @@
   const core::Quaternion &GetCurrentQuaternion(void) const;
 
-  const core::Vector3D &GetCurrentAngularSpeed(void) const;
+  const core::Vector3Df &GetCurrentAngularSpeed(void) const;
 
         void Land(void);
@@ -227,4 +227,5 @@
 
   const sensor::TargetController *GetJoystick(void) const;
+  MetaDualShock3 *joy;
 
   gui::Tab *setupLawTab, *graphLawTab;
@@ -266,5 +267,5 @@
 
   core::Quaternion currentQuaternion;
-  core::Vector3D currentAngularSpeed;
+  core::Vector3Df currentAngularSpeed;
 
   const core::AhrsData *ComputeReferenceOrientation(void);
@@ -297,6 +298,4 @@
   filter::Pid *uYaw;
   filter::PidThrust *uZ;
-
-  MetaDualShock3 *joy;
   filter::TrajectoryGenerator1D *altitudeTrajectory;
 };
Index: trunk/include/FlairMeta/XAir.h
===================================================================
--- trunk/include/FlairMeta/XAir.h	(revision 47)
+++ trunk/include/FlairMeta/XAir.h	(revision 50)
@@ -24,9 +24,11 @@
 class XAir : public Uav {
 public:
-  XAir(std::string name,
+  XAir(std::string name,std::string options="",
        filter::UavMultiplex *multiplex = NULL);
   ~XAir();
   void StartSensors(void);
 	std::string GetDefaultVrpnAddress(void) const{return "192.168.147.197:3883";}
+  bool isReadyToFly(void) const;
+  virtual std::string GetType(void) const{return "xair";}
 
 private:
Index: trunk/include/FlairSensorActuator/AfroBldc.h
===================================================================
--- trunk/include/FlairSensorActuator/AfroBldc.h	(revision 47)
+++ trunk/include/FlairSensorActuator/AfroBldc.h	(revision 50)
@@ -18,5 +18,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class I2cPort;
 }
Index: trunk/include/FlairSensorActuator/BatteryMonitor.h
===================================================================
--- trunk/include/FlairSensorActuator/BatteryMonitor.h	(revision 47)
+++ trunk/include/FlairSensorActuator/BatteryMonitor.h	(revision 50)
@@ -21,4 +21,5 @@
 class Label;
 class DoubleSpinBox;
+class SpinBox;
 }
 }
@@ -56,5 +57,5 @@
   *
   */
-  bool IsBatteryLow(void) const;
+  bool IsBatteryLow(void);
 
   /*!
@@ -77,5 +78,8 @@
   float batteryvalue;
   gui::DoubleSpinBox *battery_thresh;
+  gui::SpinBox *thresholdTime;
   gui::Label *battery;
+  core::Time underThersholdStartTime;
+  bool isUnderThershold;
 };
 } // end namespace sensor
Index: trunk/include/FlairSensorActuator/BlCtrlV2.h
===================================================================
--- trunk/include/FlairSensorActuator/BlCtrlV2.h	(revision 47)
+++ trunk/include/FlairSensorActuator/BlCtrlV2.h	(revision 50)
@@ -18,5 +18,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class I2cPort;
 }
Index: trunk/include/FlairSensorActuator/BlCtrlV2_x4_speed.h
===================================================================
--- trunk/include/FlairSensorActuator/BlCtrlV2_x4_speed.h	(revision 47)
+++ trunk/include/FlairSensorActuator/BlCtrlV2_x4_speed.h	(revision 50)
@@ -25,5 +25,4 @@
 namespace core {
 class cvmatrix;
-class FrameworkManager;
 class I2cPort;
 }
@@ -44,5 +43,5 @@
 
 public:
-  BlCtrlV2_x4_speed(core::FrameworkManager *parent, std::string name,
+  BlCtrlV2_x4_speed(std::string name,
                     core::I2cPort *i2cport, uint8_t base_address,
                     uint8_t priority);
Index: trunk/include/FlairSensorActuator/Bldc.h
===================================================================
--- trunk/include/FlairSensorActuator/Bldc.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Bldc.h	(revision 50)
@@ -19,5 +19,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class cvmatrix;
 }
@@ -186,4 +185,4 @@
 };
 } // end namespace actuator
-} // end namespace framewor
+} // end namespace flair
 #endif // BLDC_H
Index: trunk/include/FlairSensorActuator/Camera.h
===================================================================
--- trunk/include/FlairSensorActuator/Camera.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Camera.h	(revision 50)
@@ -43,6 +43,6 @@
   *
   * Construct a Camera.
-  *
-  * \param parent parent
+  * It will be child of the FrameworkManager.
+	* 
   * \param name name
   * \param width width
@@ -50,5 +50,5 @@
   * \param format image format
   */
-  Camera(const core::FrameworkManager *parent, std::string name, uint16_t width,
+  Camera(std::string name, uint16_t width,
          uint16_t height, core::cvimage::Type::Format format);
 
Index: trunk/include/FlairSensorActuator/EmulatedController.h
===================================================================
--- trunk/include/FlairSensorActuator/EmulatedController.h	(revision 47)
+++ trunk/include/FlairSensorActuator/EmulatedController.h	(revision 50)
@@ -21,5 +21,4 @@
 namespace flair {
     namespace core {
-        class FrameworkManager;
         class cvmatrix;
     }
@@ -39,5 +38,5 @@
     class EmulatedController : public TargetController {
     public:
-        EmulatedController(const core::FrameworkManager* parent,std::string name,uint8_t priority=0);
+        EmulatedController(std::string name,uint8_t priority=0);
         ~EmulatedController();
         enum class ButtonType : uint16_t {
Index: trunk/include/FlairSensorActuator/Gx3_25_imu.h
===================================================================
--- trunk/include/FlairSensorActuator/Gx3_25_imu.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Gx3_25_imu.h	(revision 50)
@@ -50,7 +50,6 @@
   * \brief Constructor
   *
-  * Construct a Gx3_25_imu.
+  * Construct a Gx3_25_imu. It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param serialport SerialPort
@@ -58,5 +57,5 @@
   * \param priority priority of the Thread
   */
-  Gx3_25_imu(const core::FrameworkManager *parent, std::string name,
+  Gx3_25_imu(std::string name,
              core::SerialPort *serialport, Command_t command, uint8_t priority);
 
Index: trunk/include/FlairSensorActuator/HokuyoUTM30Lx.h
===================================================================
--- trunk/include/FlairSensorActuator/HokuyoUTM30Lx.h	(revision 47)
+++ trunk/include/FlairSensorActuator/HokuyoUTM30Lx.h	(revision 50)
@@ -24,5 +24,4 @@
 namespace core {
 class cvmatrix;
-class FrameworkManager;
 class SerialPort;
 class Mutex;
@@ -47,11 +46,11 @@
  *
  * Construct a Hokuyo UTM30-Lx.
- *
- * \param parent parent
+ * It will be child of the FrameworkManage
+ * 
  * \param name name
  * \param serialport serialport
  * \param priority priority of the Thread
  */
-  HokuyoUTM30Lx(const core::FrameworkManager *parent, std::string name,
+  HokuyoUTM30Lx(std::string name,
                 core::SerialPort *serialport, uint8_t priority);
   void getMesure(int startStep, int endStep, int clusterCount, int interval,
@@ -168,4 +167,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // HOKUYOUTM30LX_H
Index: trunk/include/FlairSensorActuator/HostEthController.h
===================================================================
--- trunk/include/FlairSensorActuator/HostEthController.h	(revision 47)
+++ trunk/include/FlairSensorActuator/HostEthController.h	(revision 50)
@@ -26,8 +26,7 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class cvmatrix;
 class TcpSocket;
-class Socket;
+class UdpSocket;
 class Mutex;
 }
@@ -56,5 +55,5 @@
 class HostEthController : public core::Thread, public core::IODevice {
 public:
-  HostEthController(const core::FrameworkManager *parent, std::string name,
+  HostEthController(std::string name,
                     std::string address, int port, uint32_t period = 10,
                     uint32_t _bitsPerAxis = 7, uint8_t priority = 0);
@@ -65,5 +64,5 @@
   std::string controllerName;
   core::TcpSocket *controlSocket; // connection to the target
-  core::Socket *dataSocket;
+  core::UdpSocket *dataSocket;
   std::string targetAddress;
   int targetPort;
Index: trunk/include/FlairSensorActuator/Imu.h
===================================================================
--- trunk/include/FlairSensorActuator/Imu.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Imu.h	(revision 50)
@@ -15,4 +15,5 @@
 
 #include <IODevice.h>
+#include <Vector3D.h>
 
 namespace flair {
@@ -49,9 +50,9 @@
   *
   * Construct an Imu.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   */
-  Imu(const core::FrameworkManager *parent, std::string name);
+  Imu(std::string name);
 
   /*!
@@ -71,4 +72,12 @@
   */
   ~Imu();
+  
+  /*!
+  * \brief Get IMU datas
+  *
+  * \return ImuData
+  */
+  const core::ImuData *GetDatas(void) const;
+
 
   /*!
@@ -121,16 +130,28 @@
 
   /*!
-  * \brief UpdateImu
+  * \brief ApplyRotation
   *
-  * The reimplemented class must call this function as soon as IMU datas are
-  *available. \n
+  * The reimplemented class must call this function to rotate IMU datas, before filling the ImuData. \n
   * It handles the data rotation if it was defined.
   *
+  * \param vector vector to apply rotation to
   */
-  void UpdateImu();
+  void ApplyRotation(core::Vector3Df& vector);
+  
+  /*!
+  * \brief ApplyRotation
+  *
+  * The reimplemented class must call this function to rotate IMU datas, before filling the ImuData. \n
+  * It handles the data rotation if it was defined.
+  *
+  * \param quaternion quaternion to apply rotation to
+  */
+  void ApplyRotation(core::Quaternion& quaternion);
 
   /*!
   * \brief Get imu datas
   *
+  * Can be used by dervied class to fill core::ImuData
+  * 
   * \param imuData imu datas
   */
Index: trunk/include/FlairSensorActuator/LaserRangeFinder.h
===================================================================
--- trunk/include/FlairSensorActuator/LaserRangeFinder.h	(revision 47)
+++ trunk/include/FlairSensorActuator/LaserRangeFinder.h	(revision 50)
@@ -42,9 +42,9 @@
   *
   * Construct a Laser Range Finder.
+	* It will be child of the FrameworkManager
   *
-  * \param parent parent
   * \param name name
   */
-  LaserRangeFinder(const core::FrameworkManager *parent, std::string name);
+  LaserRangeFinder(std::string name);
   /*!
   * \brief Constructor
@@ -129,4 +129,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // LASERRANGEFINDER_H
Index: trunk/include/FlairSensorActuator/Mb800.h
===================================================================
--- trunk/include/FlairSensorActuator/Mb800.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Mb800.h	(revision 50)
@@ -19,5 +19,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class SerialPort;
 }
@@ -36,6 +35,6 @@
   *
   * Construct a Mb800.
-  *
-  * \param parent parent
+  * It will be child of the FrameworkManager.
+	* 
   * \param name name
   * \param serialport serialport
@@ -43,5 +42,5 @@
   * \param priority priority of the Thread
   */
-  Mb800(const core::FrameworkManager *parent, std::string name,
+  Mb800(std::string name,
         core::SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags,
         uint8_t priority);
@@ -75,4 +74,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // MB800_H
Index: trunk/include/FlairSensorActuator/NmeaGps.h
===================================================================
--- trunk/include/FlairSensorActuator/NmeaGps.h	(revision 47)
+++ trunk/include/FlairSensorActuator/NmeaGps.h	(revision 50)
@@ -15,4 +15,5 @@
 
 #include <IODevice.h>
+#include <Vector3D.h>
 #include <nmea/nmea.h>
 
@@ -21,5 +22,4 @@
     class FrameworkManager;
     class GeoCoordinate;
-    class Vector3D;
     class GpsData;
   }
@@ -53,4 +53,5 @@
     VTG = 0x02, /*!< VTG */
     GST = 0x04, /*!< GST */
+    GSA = 0x08, /*!< GSA */
   };
 
@@ -59,20 +60,20 @@
   *
   * Construct a NmeaGps.
+  *	It will be child of the FrameworkManager.
+	* 
+  * \param name name
+  * \param NMEAFlags NMEA sentances to enable
+  */
+  NmeaGps(std::string name,
+      NMEAFlags_t NMEAFlags);
+
+  /*!
+  * \brief Constructor
+  *
+  * Construct a NmeaGps. \n
+  * This contructor must only be called for a simulated device.
   *
   * \param parent parent
   * \param name name
-  * \param NMEAFlags NMEA sentances to enable
-  */
-  NmeaGps(const core::FrameworkManager *parent, std::string name,
-      NMEAFlags_t NMEAFlags);
-
-  /*!
-  * \brief Constructor
-  *
-  * Construct a NmeaGps. \n
-  * This contructor must only be called for a simulated device.
-  *
-  * \param parent parent
-  * \param name name
   */
   NmeaGps(const core::IODevice *parent, std::string name);
@@ -168,5 +169,5 @@
   * \param point to store position
   */
-  void GetEnu(core::Vector3D *point);
+  void GetEnu(core::Vector3Df *point);
 
 protected:
@@ -222,4 +223,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // NMEAGPS_H
Index: trunk/include/FlairSensorActuator/Novatel.h
===================================================================
--- trunk/include/FlairSensorActuator/Novatel.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Novatel.h	(revision 50)
@@ -36,6 +36,6 @@
   *
   * Construct a Novatel.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param serialport serialport
@@ -43,5 +43,5 @@
   * \param priority priority of the Thread
   */
-  Novatel(const core::FrameworkManager *parent, std::string name,
+  Novatel(std::string name,
           core::SerialPort *serialport, NmeaGps::NMEAFlags_t NMEAFlags,
           uint8_t priority);
@@ -75,4 +75,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // Novatel_H
Index: trunk/include/FlairSensorActuator/Ps3Eye.h
===================================================================
--- trunk/include/FlairSensorActuator/Ps3Eye.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Ps3Eye.h	(revision 50)
@@ -17,16 +17,4 @@
 
 namespace flair {
-namespace core {
-class cvimage;
-class FrameworkManager;
-}
-namespace gui {
-class GridLayout;
-class DoubleSpinBox;
-class CheckBox;
-}
-}
-
-namespace flair {
 namespace sensor {
 /*! \class Ps3Eye
@@ -41,11 +29,11 @@
   *
   * Construct a Ps3Eye.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param camera_index index of the camera, ie /dev/videox
   * \param priority priority of the Thread
   */
-  Ps3Eye(const core::FrameworkManager *parent, std::string name,
+  Ps3Eye(std::string name,
          int camera_index, uint8_t priority);
 
Index: trunk/include/FlairSensorActuator/RadioReceiver.h
===================================================================
--- trunk/include/FlairSensorActuator/RadioReceiver.h	(revision 47)
+++ trunk/include/FlairSensorActuator/RadioReceiver.h	(revision 50)
@@ -19,5 +19,4 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class cvmatrix;
 }
@@ -41,10 +40,10 @@
   *
   * Construct a RadioReceiver.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param nb_channels number of supported channels
   */
-  RadioReceiver(const core::FrameworkManager *parent, std::string name,
+  RadioReceiver(std::string name,
                 unsigned int nb_channels);
 
Index: trunk/include/FlairSensorActuator/SimuBldc.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuBldc.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuBldc.h	(revision 50)
@@ -46,8 +46,9 @@
   * \param name name
   * \param motors_count number of motors
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Bldc id of the Model
   */
   SimuBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
-           uint8_t motors_count, uint32_t dev_id);
+           uint8_t motors_count, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -59,8 +60,9 @@
   * \param name name
   * \param motors_count number of motors
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Bldc id of the Model
   */
   SimuBldc(const core::Object *parent, std::string name, uint8_t motors_count,
-           uint32_t dev_id);
+           uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -107,5 +109,6 @@
   */
   void SetMotors(float *value);
-
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
   core::SharedMem *shmem;
   gui::DoubleSpinBox *k;
Index: trunk/include/FlairSensorActuator/SimuCamera.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuCamera.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuCamera.h	(revision 50)
@@ -19,10 +19,7 @@
 
 namespace flair {
-namespace core {
-class SharedMem;
-}
-namespace gui {
-class SpinBox;
-}
+  namespace core {
+    class SharedMem;
+  }
 }
 
@@ -39,15 +36,16 @@
   *
   * Construct a SimuCamera. Control part.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param width width
   * \param height height
   * \param channels number of channels
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Camera id of the Model
   * \param priority priority of the Thread
   */
-  SimuCamera(const core::FrameworkManager *parent, std::string name,
-             uint16_t width, uint16_t height, uint8_t channels, uint32_t dev_id,
+  SimuCamera(std::string name,
+             uint16_t width, uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId,
              uint8_t priority);
 
@@ -63,8 +61,9 @@
   * \param height height
   * \param channels number of channels
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Camera id of the Model
   */
   SimuCamera(const core::IODevice *parent, std::string name, uint16_t width,
-             uint16_t height, uint8_t channels, uint32_t dev_id);
+             uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -98,8 +97,9 @@
   */
   void UpdateFrom(const core::io_data *data){};
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
 
-  gui::SpinBox *data_rate;
   size_t buf_size;
-  IplImage *img;
+  char* shmemReadBuf;
 };
 } // end namespace sensor
Index: trunk/include/FlairSensorActuator/SimuGps.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuGps.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuGps.h	(revision 50)
@@ -19,5 +19,4 @@
 namespace flair {
   namespace core {
-    class FrameworkManager;
     class SharedMem;
   }
@@ -40,13 +39,14 @@
   *
   * Construct a simulation GPS. Control part.
-  *
-  * \param parent parent
+  * It will be child of the FrameworkManager.
+	* 
   * \param name name
   * \param NMEAFlags NMEA sentances to enable
-  * \param deviceId device id
+  * \param modelId Model id
+  * \param deviceId Gps id of the Model
   * \param priority priority of the Thread
   */
-  SimuGps(const core::FrameworkManager *parent, std::string name,
-          NmeaGps::NMEAFlags_t NMEAFlags, uint32_t deviceId,uint8_t priority);
+  SimuGps(std::string name,
+          NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId,uint32_t deviceId,uint8_t priority);
 
   /*!
@@ -58,7 +58,8 @@
   * \param parent parent
   * \param name name
-  * \param deviceId device id
+  * \param modelId Model id
+  * \param deviceId Gps id of the Model
   */
-  SimuGps(const core::IODevice *parent, std::string name, uint32_t deviceId);
+  SimuGps(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -93,4 +94,6 @@
     float vn;
   } gps_states_t;
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
 
   core::SharedMem *shmem;
@@ -99,4 +102,4 @@
 };
 } // end namespace sensor
-} // end namespace framewor
+} // end namespace flair
 #endif // SIMUGPS_H
Index: trunk/include/FlairSensorActuator/SimuImu.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuImu.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuImu.h	(revision 50)
@@ -39,12 +39,13 @@
   *
   * Construct a SimuImu. Control part.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Imu id of the Model
   * \param priority priority of the Thread
   */
-  SimuImu(const core::FrameworkManager *parent, std::string name,
-          uint32_t dev_id, uint8_t priority);
+  SimuImu(std::string name,
+          uint32_t modelId,uint32_t deviceId, uint8_t priority);
 
   /*!
@@ -56,7 +57,8 @@
   * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId Imu id of the Model
   */
-  SimuImu(const core::IODevice *parent, std::string name, uint32_t dev_id);
+  SimuImu(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -93,4 +95,6 @@
     float wz;
   } imu_states_t;
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
 
   gui::SpinBox *dataRate;
Index: trunk/include/FlairSensorActuator/SimuLaser.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuLaser.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuLaser.h	(revision 50)
@@ -38,12 +38,13 @@
   *
   * Construct a SimuUs. Control part.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId LaserRangeFinder id of the Model
   * \param priority priority of the Thread
   */
-  SimuLaser(const core::FrameworkManager *parent, std::string name,
-            uint32_t dev_id, uint8_t priority);
+  SimuLaser(std::string name,
+            uint32_t modelId,uint32_t deviceId, uint8_t priority);
 
   /*!
@@ -55,7 +56,8 @@
   * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId LaserRangeFinder id of the Model
   */
-  SimuLaser(const core::IODevice *parent, std::string name, uint32_t dev_id);
+  SimuLaser(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -89,5 +91,6 @@
   */
   void Run(void);
-
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
   gui::SpinBox *data_rate;
 };
Index: trunk/include/FlairSensorActuator/SimuUs.h
===================================================================
--- trunk/include/FlairSensorActuator/SimuUs.h	(revision 47)
+++ trunk/include/FlairSensorActuator/SimuUs.h	(revision 50)
@@ -38,12 +38,13 @@
   *
   * Construct a SimuUs. Control part.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId UsRangeFinder id of the Model
   * \param priority priority of the Thread
   */
-  SimuUs(const core::FrameworkManager *parent, std::string name,
-         uint32_t dev_id, uint8_t priority);
+  SimuUs(std::string name,
+         uint32_t modelId,uint32_t deviceId, uint8_t priority);
 
   /*!
@@ -55,7 +56,8 @@
   * \param parent parent
   * \param name name
-  * \param dev_id device id
+  * \param modelId Model id
+  * \param deviceId UsRangeFinder id of the Model
   */
-  SimuUs(const core::IODevice *parent, std::string name, uint32_t dev_id);
+  SimuUs(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
 
   /*!
@@ -89,5 +91,6 @@
   */
   void Run(void);
-
+  
+  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
   gui::SpinBox *data_rate;
 };
Index: trunk/include/FlairSensorActuator/Srf08.h
===================================================================
--- trunk/include/FlairSensorActuator/Srf08.h	(revision 47)
+++ trunk/include/FlairSensorActuator/Srf08.h	(revision 50)
@@ -19,10 +19,8 @@
 namespace flair {
 namespace core {
-class FrameworkManager;
 class I2cPort;
 }
 namespace gui {
 class SpinBox;
-;
 }
 }
@@ -41,6 +39,6 @@
   *
   * Construct a SRF08 sensor
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param i2cport i2c port
@@ -48,5 +46,5 @@
   * \param priority priority of the Thread
   */
-  Srf08(const core::FrameworkManager *parent, std::string name,
+  Srf08(std::string name,
         core::I2cPort *i2cport, uint16_t address, uint8_t priority);
 
Index: trunk/include/FlairSensorActuator/TargetController.h
===================================================================
--- trunk/include/FlairSensorActuator/TargetController.h	(revision 47)
+++ trunk/include/FlairSensorActuator/TargetController.h	(revision 50)
@@ -49,6 +49,5 @@
 class TargetController : public core::Thread, public core::IODevice {
 public:
-  TargetController(const core::FrameworkManager *parent, std::string name,
-                   uint8_t priority = 0);
+  TargetController(std::string name,uint8_t priority = 0);
   ~TargetController();
   // void DrawUserInterface();
Index: trunk/include/FlairSensorActuator/TargetEthController.h
===================================================================
--- trunk/include/FlairSensorActuator/TargetEthController.h	(revision 47)
+++ trunk/include/FlairSensorActuator/TargetEthController.h	(revision 50)
@@ -29,5 +29,5 @@
 class cvmatrix;
 class TcpSocket;
-class Socket;
+class UdpSocket;
 }
 namespace gui {
@@ -47,5 +47,5 @@
 class TargetEthController : public TargetController {
 public:
-  TargetEthController(const core::FrameworkManager *parent, std::string name,
+  TargetEthController(std::string name,
                       uint16_t port, uint8_t priority = 0);
   ~TargetEthController();
@@ -78,5 +78,5 @@
   int listeningPort;
   core::TcpSocket *controlSocket = NULL;
-  core::Socket *dataSocket;
+  core::UdpSocket *dataSocket;
   std::string *axisName = NULL;
   std::string *buttonName = NULL;
Index: trunk/include/FlairSensorActuator/UsRangeFinder.h
===================================================================
--- trunk/include/FlairSensorActuator/UsRangeFinder.h	(revision 47)
+++ trunk/include/FlairSensorActuator/UsRangeFinder.h	(revision 50)
@@ -44,9 +44,9 @@
   *
   * Construct a UsRangeFinder. Control part.
-  *
-  * \param parent parent
+	* It will be child of the FrameworkManager.
+	* 
   * \param name name
   */
-  UsRangeFinder(const core::FrameworkManager *parent, std::string name);
+  UsRangeFinder(std::string name);
 
   /*!
Index: trunk/include/FlairSensorActuator/V4LCamera.h
===================================================================
--- trunk/include/FlairSensorActuator/V4LCamera.h	(revision 47)
+++ trunk/include/FlairSensorActuator/V4LCamera.h	(revision 50)
@@ -21,8 +21,6 @@
 namespace core {
 class cvimage;
-class FrameworkManager;
 }
 namespace gui {
-class GridLayout;
 class DoubleSpinBox;
 class CheckBox;
@@ -43,6 +41,6 @@
   *
   * Construct a Camera.
+	* It will be child of the FrameworkManager.
   *
-  * \param parent parent
   * \param name name
   * \param camera_index camera index
@@ -52,5 +50,5 @@
   * \param priority priority of the Thread
   */
-  V4LCamera(const core::FrameworkManager *parent, std::string name,
+  V4LCamera(std::string name,
             uint8_t camera_index, uint16_t width, uint16_t height,
             core::cvimage::Type::Format format, uint8_t priority);
@@ -61,4 +59,8 @@
   */
   ~V4LCamera();
+  
+    //hack for ps3eye in hds uav
+  //TODO: put this in ps3eye class
+  bool HasProblems(void);
 
 protected:
@@ -118,5 +120,5 @@
   */
   virtual void SetContrast(float value);
-
+  
 private:
   /*!
@@ -140,8 +142,8 @@
 
   gui::Tab *sensor_tab;
-  gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,
-      *sat;
+  gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,*sat;
   gui::CheckBox *autogain, *awb, *autoexposure;
   gui::Label *fps;
+  bool hasProblems;
 };
 } // end namespace sensor
Index: trunk/include/FlairSensorActuator/VrpnClient.h
===================================================================
--- trunk/include/FlairSensorActuator/VrpnClient.h	(revision 47)
+++ trunk/include/FlairSensorActuator/VrpnClient.h	(revision 50)
@@ -49,9 +49,8 @@
   * \param name name
   * \param address server address
-  * \param us_period Thread period in us
   * \param priority priority of the Thread
   */
   VrpnClient(std::string name,
-             std::string address, uint16_t us_period, uint8_t priority);
+             std::string address,  uint8_t priority);
 
   /*!
Index: trunk/include/FlairSensorActuator/VrpnObject.h
===================================================================
--- trunk/include/FlairSensorActuator/VrpnObject.h	(revision 47)
+++ trunk/include/FlairSensorActuator/VrpnObject.h	(revision 50)
@@ -16,4 +16,5 @@
 
 #include <IODevice.h>
+#include <Vector3D.h>
 #include <stdint.h>
 
@@ -21,6 +22,4 @@
 	namespace core {
 		class cvmatrix;
-		class Vector3D;
-		class Euler;
 		class Quaternion;
 	}
@@ -101,11 +100,4 @@
 
   /*!
-  * \brief Get Euler angles
-  *
-  * \param euler output datas
-  */
-  void GetEuler(core::Euler &euler) const;
-
-  /*!
   * \brief Get Quaternion
   *
@@ -118,5 +110,5 @@
   * \param point output datas
   */
-  void GetPosition(core::Vector3D &point) const;
+  void GetPosition(core::Vector3Df &point) const;
 
   /*!
@@ -124,12 +116,13 @@
   *
   * Matrix is of type float and as follows: \n
-  * (0,0) roll (rad) \n
-  * (1,0) pitch (rad) \n
-  * (2,0) yaw (rad) \n
-  * (3,0) x \n
-  * (4,0) y \n
-  * (5,0) z \n
+  * (0,0) q0 \n
+  * (1,0) q1 \n
+  * (2,0) q2 \n
+	* (3,0) q3 \n
+  * (4,0) x \n
+  * (5,0) y \n
+  * (6,0) z \n
   *
-  * \return Output metrix
+  * \return Output matrix
   */
   core::cvmatrix *Output(void) const;
@@ -138,4 +131,5 @@
   * \brief State matrix
   *
+	* Used for plotting on ground station. \n
   * Matrix is of type float and as follows: \n
   * (0,0) roll (deg) \n
@@ -143,5 +137,5 @@
   * (2,0) yaw (deg) \n
   *
-  * \return State metrix
+  * \return State matrix
   */
   core::cvmatrix *State(void) const;
@@ -178,5 +172,4 @@
   void UpdateFrom(const core::io_data *data){};
 
-  void mainloop(void);
   class VrpnObject_impl *pimpl_;
 };
Index: trunk/include/FlairSimulator/Castle.h
===================================================================
--- trunk/include/FlairSimulator/Castle.h	(revision 47)
+++ trunk/include/FlairSimulator/Castle.h	(revision 50)
@@ -23,5 +23,5 @@
 class Castle : public Gui {
 public:
-  Castle(const flair::simulator::Simulator *parent, int app_width,
+  Castle(int app_width,
          int app_height, int scene_width, int scene_height,
          std::string media_path);
Index: trunk/include/FlairSimulator/FixedCamera.h
===================================================================
--- trunk/include/FlairSimulator/FixedCamera.h	(revision 47)
+++ trunk/include/FlairSimulator/FixedCamera.h	(revision 50)
@@ -26,5 +26,5 @@
 class FixedCamera : public VisualizationCamera {
 public:
-  FixedCamera(std::string name,core::Vector3D position,core::Vector3D lookat=core::Vector3D(0,0,0),float rotateSpeed = -3.0f, float zoomSpeed = .05f);
+  FixedCamera(std::string name,core::Vector3Df position,core::Vector3Df lookat=core::Vector3Df(0,0,0),float rotateSpeed = -3.0f, float zoomSpeed = .05f);
   ~FixedCamera();
 
Index: trunk/include/FlairSimulator/Gui.h
===================================================================
--- trunk/include/FlairSimulator/Gui.h	(revision 47)
+++ trunk/include/FlairSimulator/Gui.h	(revision 50)
@@ -19,4 +19,5 @@
 
 #include <Object.h>
+#include <Vector3D.h>
 #include <EDriverTypes.h>
 #include <vector3d.h>
@@ -36,5 +37,4 @@
 namespace core {
 class Object;
-class Vector3D;
 class Euler;
 class Quaternion;
@@ -48,12 +48,11 @@
 namespace flair {
 namespace simulator {
-class Simulator;
 
-class Gui : public core::Object {
+class Gui: public core::Object {
   friend class ::Simulator_impl;
   friend class VisualizationCamera;
 
 public:
-  Gui(const Simulator *parent, std::string name, int app_width, int app_height,
+  Gui(std::string name, int app_width, int app_height,
       int scene_width, int scene_height, std::string media_path,
       irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL);
@@ -126,5 +125,5 @@
 * \return vector in irrlicht coordinates
 */
-irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D vect);
+template<typename T>  irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D<T> vect);
 
 /*!
@@ -137,5 +136,5 @@
 * \return vector in simulator coordinates
 */
-core::Vector3D ToSimulatorCoordinates(irr::core::vector3df vect);
+core::Vector3Df ToSimulatorCoordinates(irr::core::vector3df vect);
 
 /*!
Index: trunk/include/FlairSimulator/Man.h
===================================================================
--- trunk/include/FlairSimulator/Man.h	(revision 47)
+++ trunk/include/FlairSimulator/Man.h	(revision 50)
@@ -34,9 +34,8 @@
 namespace flair {
 namespace simulator {
-class Simulator;
 
 class Man : private Model {
 public:
-  Man(const Simulator *parent, std::string name);
+  Man(std::string name,uint32_t modelId);
   ~Man();
 
Index: trunk/include/FlairSimulator/Model.h
===================================================================
--- trunk/include/FlairSimulator/Model.h	(revision 47)
+++ trunk/include/FlairSimulator/Model.h	(revision 50)
@@ -51,5 +51,4 @@
 namespace flair {
 namespace simulator {
-class Simulator;
 class FollowMeCamera;
 
@@ -65,12 +64,12 @@
 
 public:
-  Model(const Simulator *parent, std::string name);
+  Model(std::string name,uint32_t modelId);
   virtual ~Model();
 
   typedef struct simu_state {
     core::Quaternion Quat;
-    core::Vector3D W;
-    core::Vector3D Pos;
-    core::Vector3D Vel;
+    core::Vector3Df W;
+    core::Vector3D<double> Pos;
+    core::Vector3D<double> Vel;
   } simu_state_t;
 
@@ -93,8 +92,9 @@
 #endif
   gui::TabWidget *GetTabWidget(void) const;
+  int GetId(void) const;
 
 protected:
   DiscreteTimeVariable<simu_state_t, 3> state;
-  float dT(void) const;
+  double dT(void) const;
   virtual void CalcModel(void) = 0;
 #ifdef GL
Index: trunk/include/FlairSimulator/Parser.h
===================================================================
--- trunk/include/FlairSimulator/Parser.h	(revision 47)
+++ trunk/include/FlairSimulator/Parser.h	(revision 50)
@@ -19,12 +19,8 @@
 
 #include <Gui.h>
+#include <Vector3D.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
-
-namespace flair {
-  namespace core {
-    class Vector3D;
-  }
-}
+#include <SColor.h>
 
 namespace flair {
@@ -38,5 +34,5 @@
   */
 public:
-  Parser(Simulator *parent, int app_width, int app_height, int scene_width,
+  Parser(int app_width, int app_height, int scene_width,
          int scene_height, std::string media_path, std::string xmlFile);
   ~Parser();
@@ -45,12 +41,12 @@
   xmlDoc *doc;
   std::string media_path;
-  Simulator *parent;
   void processElements(xmlNode *a_node);
   void processObjects(xmlNode *a_node);
   void processParams(xmlNode *a_node);
+	irr::video::SColor getScolor(xmlNode *mesh_node);
   irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param);
   irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
                                     bool isScale = false);
-  core::Vector3D getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
+  core::Vector3Df getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
 };
 }
Index: trunk/include/FlairSimulator/SimuCameraGL.h
===================================================================
--- trunk/include/FlairSimulator/SimuCameraGL.h	(revision 47)
+++ trunk/include/FlairSimulator/SimuCameraGL.h	(revision 50)
@@ -51,5 +51,5 @@
   // top left origin
   SimuCameraGL(const simulator::Model *parent, std::string name, int width,
-               int height, int x, int y, int dev_id);
+               int height, int x, int y, uint32_t modelId,uint32_t deviceId);
   ~SimuCameraGL();
   //! Sets the value of the near clipping plane. (default: 1.0f)
@@ -67,5 +67,5 @@
                                   irr::scene::ISceneManager *newManager = 0);
   void getImage(void);
-  void putImage(char *pixels);
+  void putImage(char *pixels,core::Time imageTime);
   irr::scene::ICameraSceneNode *camera;
   irr::scene::ISceneManager *smgr;
Index: trunk/include/FlairSimulator/SimuLaserGL.h
===================================================================
--- trunk/include/FlairSimulator/SimuLaserGL.h	(revision 47)
+++ trunk/include/FlairSimulator/SimuLaserGL.h	(revision 50)
@@ -38,5 +38,5 @@
 class SimuLaserGL : public SimuLaser, public SensorGL {
 public:
-  SimuLaserGL(const simulator::Model *parent, std::string name, int dev_id);
+  SimuLaserGL(const simulator::Model *parent, std::string name, uint32_t modelId,uint32_t deviceId);
   ~SimuLaserGL();
 
Index: trunk/include/FlairSimulator/SimuUsGL.h
===================================================================
--- trunk/include/FlairSimulator/SimuUsGL.h	(revision 47)
+++ trunk/include/FlairSimulator/SimuUsGL.h	(revision 50)
@@ -38,5 +38,5 @@
 class SimuUsGL : public SimuUs, public SensorGL {
 public:
-  SimuUsGL(const simulator::Model *parent, std::string name, int dev_id);
+  SimuUsGL(const simulator::Model *parent, std::string name, uint32_t modelId,uint32_t deviceId);
   ~SimuUsGL();
 
Index: trunk/include/FlairSimulator/Simulator.h
===================================================================
--- trunk/include/FlairSimulator/Simulator.h	(revision 47)
+++ trunk/include/FlairSimulator/Simulator.h	(revision 50)
@@ -19,12 +19,13 @@
 
 #include <FrameworkManager.h>
+#include <Vector3D.h>
 #include <stdint.h>
 
 class Simulator_impl;
+class Model_impl;
 
 namespace flair {
 namespace core {
 class Quaternion;
-class Vector3D;
 }
 }
@@ -36,5 +37,5 @@
 
 class Simulator : public core::FrameworkManager {
-  friend class Model;
+  friend class ::Model_impl;
   friend class Gui;
   friend class GenericObject;
@@ -52,5 +53,5 @@
   // coordinate, around z axis
   core::Quaternion ToVRPNReference(core::Quaternion quat_in);
-  core::Vector3D ToVRPNReference(core::Vector3D point_in);
+  core::Vector3D<double> ToVRPNReference(core::Vector3D<double> point_in);
 
 private:
Index: trunk/include/FlairSimulator/X4.h
===================================================================
--- trunk/include/FlairSimulator/X4.h	(revision 47)
+++ trunk/include/FlairSimulator/X4.h	(revision 50)
@@ -19,6 +19,4 @@
 
 #include <Model.h>
-#include <stdint.h>
-#include <stdio.h>
 
 namespace flair {
@@ -34,21 +32,11 @@
 }
 
-#ifdef GL
-namespace irr {
-namespace scene {
-class IMesh;
-}
-}
-#endif
-
 namespace flair {
 namespace simulator {
-class Simulator;
 class Blade;
-class MeshSceneNode;
 
 class X4 : public Model {
 public:
-  X4(const Simulator *parent, std::string name, int dev_id);
+  X4(std::string name, uint32_t modelId);
   ~X4();
 #ifdef GL
@@ -57,7 +45,4 @@
 
 protected:
-  irr::scene::IMesh *red_arm, *black_arm, *motor;
-  MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
-  MeshSceneNode *fl_motor, *fr_motor, *rl_motor, *rr_motor;
   Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
   core::Mutex *motor_speed_mutex;
Index: trunk/include/FlairSimulator/X8.h
===================================================================
--- trunk/include/FlairSimulator/X8.h	(revision 47)
+++ trunk/include/FlairSimulator/X8.h	(revision 50)
@@ -19,5 +19,4 @@
 
 #include <Model.h>
-#include <stdint.h>
 
 namespace flair {
@@ -33,21 +32,11 @@
 }
 
-#ifdef GL
-namespace irr {
-namespace scene {
-class IMesh;
-}
-}
-#endif
-
 namespace flair {
 namespace simulator {
-class Simulator;
 class Blade;
-class MeshSceneNode;
 
 class X8 : public Model {
 public:
-  X8(const Simulator *parent, std::string name, int dev_id);
+  X8(std::string name, uint32_t modelId);
   ~X8();
   virtual void Draw(void);
@@ -56,8 +45,4 @@
 protected:
 #ifdef GL
-  irr::scene::IMesh *red_arm, *black_arm, *motor;
-  MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
-  MeshSceneNode *tfl_motor, *tfr_motor, *trl_motor, *trr_motor;
-  MeshSceneNode *bfl_motor, *bfr_motor, *brl_motor, *brr_motor;
   Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
   Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
Index: trunk/include/FlairVisionFilter/OpticalFlowSpeed.h
===================================================================
--- trunk/include/FlairVisionFilter/OpticalFlowSpeed.h	(revision 47)
+++ trunk/include/FlairVisionFilter/OpticalFlowSpeed.h	(revision 50)
@@ -31,5 +31,5 @@
     * \brief Optical flow speed calculation
     *
-    * Speed is the mean of all optical flow values.
+    * Speed is the mean of all optical flow values divided by the delta time between images.
     */
     class OpticalFlowSpeed : public core::IODevice
@@ -67,5 +67,5 @@
             * \brief Output matrix
             *
-            * Matrix is of sze (2,1). \n
+            * Matrix is of size (2,1). \n
             * First line is speed along x axis. \n
             * Second line is speed along y axis. \n
