Index: trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 58)
+++ trunk/lib/FlairCore/src/FrameworkManager_impl.cpp	(revision 67)
@@ -181,9 +181,9 @@
     status = UDT::close(com_sock);
     if (status != 0)
-      printf("Error udt::close %s", UDT::getlasterror().getErrorMessage());
+      Printf("Error udt::close %s", UDT::getlasterror().getErrorMessage());
 
     status = UDT::close(file_sock);
     if (status != 0)
-      printf("Error udt::close %s", UDT::getlasterror().getErrorMessage());
+      Printf("Error udt::close %s", UDT::getlasterror().getErrorMessage());
 
     SleepMS(200); // a revoir, sinon UDT::cleanup bloque en RT
@@ -294,5 +294,5 @@
         xmlDoc *doc;
         rcv_buf[bytesRead] = 0;
-
+ //Printf("%s\n",rcv_buf);
         doc = xmlReadMemory(rcv_buf, (int)bytesRead, "include.xml",
                             "ISO-8859-1", 0);
Index: trunk/lib/FlairCore/src/Map.cpp
===================================================================
--- trunk/lib/FlairCore/src/Map.cpp	(revision 58)
+++ trunk/lib/FlairCore/src/Map.cpp	(revision 67)
@@ -21,4 +21,5 @@
 #include "GeoCoordinate.h"
 #include "FrameworkManager.h"
+#include <cmath>
 #include <string.h>
 #include <sstream>
@@ -80,8 +81,7 @@
 void Map::ExtraXmlEvent(void) {
 
-  // attention pas rt safe (creation checkpoint)
+  // attention pas rt safe (creation/destruction checkpoint)
   size_t i = 0;
   while (1) {
-    // printf("test %i\n",i);
     double latitude, longitude;
     double altitude = 0;
@@ -90,13 +90,20 @@
     long_prop << "long" << i;
     alt_prop << "alt" << i;
+
     if (GetPersistentXmlProp(lat_prop.str(), latitude) &&
         GetPersistentXmlProp(long_prop.str(), longitude)) {
       GetPersistentXmlProp(alt_prop.str(), altitude);
+
       if (i >= checkpoints.size()) {
+        //add checkpoint
         GeoCoordinate *checkpoint = new GeoCoordinate(
             this, "checkpoint", latitude, longitude, altitude);
         checkpoints.push_back(checkpoint);
-        // printf("add %i\n",i);
+      } else if(isnan(latitude) || isnan(longitude)) {
+        //delete checkpoint
+        removeCheckpoint(i);
+        break;//si delete, la station sol n'envoit que cette info
       } else {
+        //move checkpoint
         checkpoints.at(i)->SetCoordinates(latitude, longitude, altitude);
       }
@@ -107,10 +114,32 @@
     i++;
   }
-
+/*
   for (size_t i = 0; i < checkpoints.size(); i++) {
     double latitude, longitude, altitude;
     checkpoints.at(i)->GetCoordinates(&latitude, &longitude, &altitude);
-    // printf("%i %f %f\n",i,latitude,longitude);
+     printf("%i %f %f\n",i,latitude,longitude);
+  }*/
+}
+
+void Map::removeCheckpoint(size_t index) {
+  //left shift
+  for (size_t i = index; i < checkpoints.size()-1; i++) {
+    double latitude, longitude, altitude;
+    checkpoints.at(i+1)->GetCoordinates(&latitude, &longitude, &altitude);
+    checkpoints.at(i)->SetCoordinates(latitude,longitude,altitude);
   }
+
+  //remove last one
+  delete checkpoints.back();
+  checkpoints.pop_back();
+
+  //remove last one in xml
+  ostringstream lat_prop, long_prop, alt_prop;
+  lat_prop << "lat" << checkpoints.size();
+  long_prop << "long" << checkpoints.size();
+  alt_prop << "alt" << checkpoints.size();
+  UnsetPersistentXmlProp(lat_prop.str());
+  UnsetPersistentXmlProp(long_prop.str());
+  UnsetPersistentXmlProp(alt_prop.str());
 }
 
Index: trunk/lib/FlairCore/src/Map.h
===================================================================
--- trunk/lib/FlairCore/src/Map.h	(revision 58)
+++ trunk/lib/FlairCore/src/Map.h	(revision 67)
@@ -77,4 +77,6 @@
   void ExtraXmlEvent(void);
 
+  void removeCheckpoint(size_t index);
+
   std::vector<core::GeoCoordinate *> checkpoints;
   std::vector<const core::GeoCoordinate *> to_draw;
Index: trunk/lib/FlairCore/src/Widget.cpp
===================================================================
--- trunk/lib/FlairCore/src/Widget.cpp	(revision 58)
+++ trunk/lib/FlairCore/src/Widget.cpp	(revision 67)
@@ -82,4 +82,17 @@
   if (GetPersistentXmlProp<double>(prop, tmp)) {
     value = tmp;
+    return true;
+  } else {
+    return false;
+  }
+}
+
+template <>
+bool Widget::GetPersistentXmlProp(std::string prop, std::string &value) {
+  xmlChar *result = NULL;
+  result = xmlGetProp(pimpl_->file_node, (xmlChar *)prop.c_str());
+  if (result != NULL) {
+    value = std::string((char *)result);
+    xmlFree(result);
     return true;
   } else {
@@ -208,4 +221,13 @@
 }
 
+template <> void Widget::SetPersistentXmlProp(std::string prop, std::string value) {
+  SetVolatileXmlProp(prop, value);
+  SetVolatileXmlProp(prop, value, pimpl_->file_node);
+}
+
+void Widget::UnsetPersistentXmlProp(std::string prop) {
+  xmlUnsetProp(pimpl_->file_node, (xmlChar *)prop.c_str());
+}
+
 void Widget::SendXml(void) { pimpl_->SendXml(); }
 
Index: trunk/lib/FlairCore/src/Widget.h
===================================================================
--- trunk/lib/FlairCore/src/Widget.h	(revision 58)
+++ trunk/lib/FlairCore/src/Widget.h	(revision 67)
@@ -143,4 +143,13 @@
   virtual void XmlEvent(void){};
 
+  /*!
+   * \brief Unset a persistent xml property
+   * 
+   * Unset an existent property, so it won't be saved.
+   *
+   * \param prop property to set
+   */
+  void UnsetPersistentXmlProp(std::string prop);
+
 private:
   class Widget_impl *pimpl_;
Index: trunk/lib/FlairSensorActuator/src/NmeaGps.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 58)
+++ trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 67)
@@ -195,4 +195,5 @@
   if (result != 1) {
     Warn("unrecognized nmea sentence: %s\n",frame);
+    return;
   }
 
