Index: trunk/lib/FlairCore/CMakeLists.txt
===================================================================
--- trunk/lib/FlairCore/CMakeLists.txt	(revision 42)
+++ trunk/lib/FlairCore/CMakeLists.txt	(revision 45)
@@ -19,5 +19,5 @@
 
 FILE(GLOB FLAIRCORE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
-
+message(${CMAKE_C_COMPILER})
 INCLUDE_DIRECTORIES(
 	${LIBXML2_INCLUDE_DIR}
@@ -36,8 +36,8 @@
 
 add_custom_target(
-	svn_rev
-	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/svn_revision.sh $ENV{FLAIR_ROOT}/flair-src ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/svnversion.h
+	compile_info
+	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(FlairCore_rt svn_rev)
-add_dependencies(FlairCore_nrt svn_rev)
+add_dependencies(FlairCore_rt compile_info)
+add_dependencies(FlairCore_nrt compile_info)
Index: trunk/lib/FlairCore/src/FrameworkManager.cpp
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager.cpp	(revision 42)
+++ trunk/lib/FlairCore/src/FrameworkManager.cpp	(revision 45)
@@ -20,5 +20,5 @@
 #include "IODevice.h"
 #include "config.h"
-#include "svnversion.h"
+#include "compile_info.h"
 
 using std::string;
@@ -27,6 +27,13 @@
 
 namespace {
-flair::core::FrameworkManager *frameworkmanager = NULL;
+  flair::core::FrameworkManager *frameworkmanager = NULL;
 }
+
+static void constructor() __attribute__((constructor));
+
+void constructor() {
+  compile_info("FlairCore");
+}
+
 
 namespace flair {
@@ -55,5 +62,4 @@
   }
 
-  Printf(SVN_REV);
   frameworkmanager = this;
   pimpl_ = new FrameworkManager_impl(this, name);
Index: trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 42)
+++ trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 45)
@@ -106,5 +106,4 @@
   // Avoids memory swapping for this program
   mlockall(MCL_CURRENT | MCL_FUTURE);
-  struct sigaction sa;
 
   // catch segfault
@@ -114,4 +113,5 @@
 #ifdef __XENO__
 #ifdef SIGDEBUG
+  struct sigaction sa;
   sigemptyset(&sa.sa_mask);
   sa.sa_sigaction = warn_upon_switch;
Index: trunk/lib/FlairCore/src/GpsData.cpp
===================================================================
--- trunk/lib/FlairCore/src/GpsData.cpp	(revision 42)
+++ trunk/lib/FlairCore/src/GpsData.cpp	(revision 45)
@@ -56,19 +56,13 @@
 
 GpsData::GpsData(const Object *parent, std::string name, int n)
-    : io_data(parent, name, n), dataType(floatType) {
+    : io_data(parent, name, n), dataType() {
   if (n > 1)
     Warn("n>1 not supported\n");
 
-  AppendLogDescription("raw_ax", floatType);
-  AppendLogDescription("raw_ay", floatType);
-  AppendLogDescription("raw_az", floatType);
+  AppendLogDescription("latitude", floatType);
+  AppendLogDescription("longitude", floatType);
+  AppendLogDescription("altitude", floatType);
 
-  AppendLogDescription("raw_gx", floatType);
-  AppendLogDescription("raw_gy", floatType);
-  AppendLogDescription("raw_gz", floatType);
 
-  AppendLogDescription("raw_mx", floatType);
-  AppendLogDescription("raw_my", floatType);
-  AppendLogDescription("raw_mz", floatType);
 }
 
Index: trunk/lib/FlairCore/src/GpsData.h
===================================================================
--- trunk/lib/FlairCore/src/GpsData.h	(revision 42)
+++ trunk/lib/FlairCore/src/GpsData.h	(revision 45)
@@ -32,7 +32,5 @@
   class Type : public DataType {
   public:
-    Type(ScalarType const &_elementDataType)
-        : elementDataType(_elementDataType) {}
-    ScalarType const &GetElementDataType() const { return elementDataType; }
+    Type(void){}
     std::string GetDescription() const { return "gps data"; }
     size_t GetSize() const {
@@ -41,5 +39,4 @@
 
   private:
-    ScalarType const &elementDataType;
   };
 
Index: trunk/lib/FlairFilter/CMakeLists.txt
===================================================================
--- trunk/lib/FlairFilter/CMakeLists.txt	(revision 42)
+++ trunk/lib/FlairFilter/CMakeLists.txt	(revision 45)
@@ -44,2 +44,9 @@
 
 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+
+add_custom_target(
+	compile_info
+	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
+)
+
+add_dependencies(${PROJECT_NAME} compile_info)
Index: trunk/lib/FlairFilter/src/UavMultiplex.cpp
===================================================================
--- trunk/lib/FlairFilter/src/UavMultiplex.cpp	(revision 42)
+++ trunk/lib/FlairFilter/src/UavMultiplex.cpp	(revision 45)
@@ -22,8 +22,17 @@
 #include <Tab.h>
 #include <GridLayout.h>
+#include "compile_info.h"
 
 using std::string;
 using namespace flair::core;
 using namespace flair::gui;
+
+//todo: put it on seprate file, but not possible with static lib?
+static void constructor() __attribute__((constructor));
+
+void constructor() {
+  compile_info("FlairFilter");
+}
+
 
 namespace flair {
Index: trunk/lib/FlairMeta/CMakeLists.txt
===================================================================
--- trunk/lib/FlairMeta/CMakeLists.txt	(revision 42)
+++ trunk/lib/FlairMeta/CMakeLists.txt	(revision 45)
@@ -44,2 +44,9 @@
 
 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+
+add_custom_target(
+	compile_info
+	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
+)
+
+add_dependencies(${PROJECT_NAME} compile_info)
Index: trunk/lib/FlairMeta/src/UavFactory.cpp
===================================================================
--- trunk/lib/FlairMeta/src/UavFactory.cpp	(revision 42)
+++ trunk/lib/FlairMeta/src/UavFactory.cpp	(revision 45)
@@ -18,9 +18,9 @@
 #include "UavFactory.h"
 #include "FrameworkManager.h"
-//#include "ArDrone2.h"
 #include "SimuX4.h"
 #include "SimuX8.h"
 #include "HdsX8.h"
 #include "XAir.h"
+#include "compile_info.h"
 
 using namespace std;
@@ -30,6 +30,14 @@
 
 namespace { // anonymous
-     vector<flair::meta::Uav* (*)(FrameworkManager*,string,string,UavMultiplex*)> vectoroffunctions;
+     vector<flair::meta::Uav* (*)(FrameworkManager*,string,string,UavMultiplex*)> *vectoroffunctions=NULL;
 }
+
+
+static void constructor() __attribute__((constructor));
+
+void constructor() {
+  compile_info("FlairMeta");
+}
+
 
 Uav *CreateUav(FrameworkManager *parent, string uav_name, string uav_type,
@@ -37,7 +45,14 @@
 
   Uav *uav;
-  for(int i=0;i<vectoroffunctions.size();i++) {
-    uav=vectoroffunctions.at(i)(parent, uav_name, uav_type,multiplex);
-    if(uav!=NULL) return uav;
+
+  if(vectoroffunctions!=NULL) {
+    for(int i=0;i<vectoroffunctions->size();i++) {
+      uav=vectoroffunctions->at(i)(parent, uav_name, uav_type,multiplex);
+      if(uav!=NULL) {
+        free(vectoroffunctions);
+        vectoroffunctions=NULL;
+        return uav;
+      }
+    }
   }
 
@@ -72,5 +87,6 @@
 void RegisterUavCreator(flair::meta::Uav*(*func)(FrameworkManager *parent, string uav_name, string uav_type,
                UavMultiplex *multiplex)) {
-                 vectoroffunctions.push_back(func);
+  if(vectoroffunctions==NULL) vectoroffunctions=(vector<flair::meta::Uav* (*)(FrameworkManager*,string,string,UavMultiplex*)>*)malloc(sizeof(vector<flair::meta::Uav* (*)(FrameworkManager*,string,string,UavMultiplex*)>));
 
+  vectoroffunctions->push_back(func);
 }
Index: trunk/lib/FlairMeta/src/UavStateMachine.cpp
===================================================================
--- trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 42)
+++ trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 45)
@@ -181,9 +181,9 @@
     ComputeThrust(); // logs are added to uz, so it must be updated at last
 
-    //check nan problems
-    if(CheckIsNan(currentTorques.roll,"roll torque")
-       || CheckIsNan(currentTorques.pitch,"pitch torque")
-       || CheckIsNan(currentTorques.yaw,"yaw torque")
-       || CheckIsNan(currentThrust,"thrust")) {
+    //check nan/inf problems
+    if(IsValuePossible(currentTorques.roll,"roll torque")
+       || IsValuePossible(currentTorques.pitch,"pitch torque")
+       || IsValuePossible(currentTorques.yaw,"yaw torque")
+       || IsValuePossible(currentThrust,"thrust")) {
 
       if(failSafeMode) {
@@ -218,7 +218,10 @@
 }
 
-bool UavStateMachine::CheckIsNan(float value,std::string desc) {
+bool UavStateMachine::IsValuePossible(float value,std::string desc) {
   if(isnan(value)) {
     Warn("%s is not an number\n",desc.c_str());
+    return true;
+  } else if(isinf(value)) {
+    Warn("%s is infinite\n",desc.c_str());
     return true;
   } else {
Index: trunk/lib/FlairMeta/src/UavStateMachine.h
===================================================================
--- trunk/lib/FlairMeta/src/UavStateMachine.h	(revision 42)
+++ trunk/lib/FlairMeta/src/UavStateMachine.h	(revision 45)
@@ -261,5 +261,5 @@
   void Run(void);
   void StopMotors(void);
-  bool CheckIsNan(float value,std::string desc);
+  bool IsValuePossible(float value,std::string desc);
 
   meta::Uav *uav;
Index: trunk/lib/FlairSensorActuator/CMakeLists.txt
===================================================================
--- trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 42)
+++ trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 45)
@@ -43,2 +43,9 @@
 FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
 INSTALL(FILES ${files} DESTINATION $ENV{FLAIR_ROOT}/flair-dev/include/${PROJECT_NAME})
+
+add_custom_target(
+	compile_info
+	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
+)
+
+add_dependencies(${PROJECT_NAME} compile_info)
Index: trunk/lib/FlairSensorActuator/src/Bldc.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/Bldc.cpp	(revision 42)
+++ trunk/lib/FlairSensorActuator/src/Bldc.cpp	(revision 45)
@@ -21,4 +21,12 @@
 #include <DoubleSpinBox.h>
 #include <sstream>
+#include "compile_info.h"
+
+//todo: put it on seprate file, but not possible with static lib?
+static void constructor() __attribute__((constructor));
+
+void constructor() {
+  compile_info("FlairSensorActuator");
+}
 
 using std::string;
Index: trunk/lib/FlairSimulator/CMakeLists.txt
===================================================================
--- trunk/lib/FlairSimulator/CMakeLists.txt	(revision 42)
+++ trunk/lib/FlairSimulator/CMakeLists.txt	(revision 45)
@@ -22,5 +22,4 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/src
 	${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
-#	$ENV{FLAIR_ROOT}/uav_dev/include
 	${CMAKE_CURRENT_SOURCE_DIR}/../FlairCore/src
 	${CMAKE_CURRENT_SOURCE_DIR}/../FlairSensorActuator/src
@@ -34,6 +33,13 @@
 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
 
+add_custom_target(
+	compile_info
+	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
+)
+
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/no_gl)
+add_dependencies(FlairSimulator_nogl compile_info)
 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/gl) 
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/gl)
+add_dependencies(FlairSimulator_gl compile_info)
 endif()
Index: trunk/lib/FlairSimulator/src/Gui.cpp
===================================================================
--- trunk/lib/FlairSimulator/src/Gui.cpp	(revision 42)
+++ trunk/lib/FlairSimulator/src/Gui.cpp	(revision 45)
@@ -31,4 +31,12 @@
 #include <algorithm>
 #include <GL/gl.h>
+#include "compile_info.h"
+
+//todo: put it on seprate file, but not possible with static lib?
+static void constructor() __attribute__((constructor));
+
+void constructor() {
+  compile_info("FlairSensorActuator");
+}
 
 using namespace irr;
