Index: trunk/lib/FlairCore/src/SharedMem_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/SharedMem_impl.cpp	(revision 205)
+++ trunk/lib/FlairCore/src/SharedMem_impl.cpp	(revision 206)
@@ -127,7 +127,7 @@
     }
   } else if (type==SharedMem::Type::producerConsumer) {
-      if (sem_producer.GetSemaphore(nsTimeout)) {
-        memcpy(buf, mem_segment, size);
-        sem_consumer.ReleaseSemaphore();
+    if (sem_producer.GetSemaphore(nsTimeout)) {
+      memcpy(buf, mem_segment, size);
+      sem_consumer.ReleaseSemaphore();
       return true;
     }
Index: trunk/lib/FlairCore/src/Thread_impl.cpp
===================================================================
--- trunk/lib/FlairCore/src/Thread_impl.cpp	(revision 205)
+++ trunk/lib/FlairCore/src/Thread_impl.cpp	(revision 206)
@@ -227,11 +227,14 @@
     self->Err("Error rt_task_wait_period %s\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
 	}
+//avoid spamming messages
+/*
   if (status == -ETIMEDOUT) {
     self->Err("overrun: %lld\n", overruns_r);
-	}
+	}*/
 #else
   self->SleepUntil(next_time);
   Time current = GetTime();
-  if(current>next_time+period) self->Err("overrun of %lld\n", current-next_time);
+//avoid spamming messages
+  //if(current>next_time+period) self->Err("overrun of %lld\n", current-next_time);
   while (next_time < current) {
     next_time += period;
Index: trunk/lib/FlairFilter/src/PidThrust.cpp
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 205)
+++ trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 206)
@@ -43,9 +43,4 @@
 }
 
-void PidThrust::Reset(void) {
-  pimpl_->i = 0;
-  pimpl_->offset_g = 0;
-}
-
 void PidThrust::ResetI(void) { pimpl_->i = 0; }
 
@@ -62,7 +57,7 @@
 }
 
-void PidThrust::ResetOffset(void) { pimpl_->offset_g = 0; }
+void PidThrust::SetDefaultOffset(void) { pimpl_->offset_g = pimpl_->offset->Value(); }
 
-void PidThrust::SetOffset(void) { pimpl_->offset_g = pimpl_->offset->Value(); }
+void PidThrust::SetOffset(float value) { pimpl_->offset_g = value; }
 
 bool PidThrust::OffsetStepUp(void) {
Index: trunk/lib/FlairFilter/src/PidThrust.h
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust.h	(revision 205)
+++ trunk/lib/FlairFilter/src/PidThrust.h	(revision 206)
@@ -55,10 +55,4 @@
 
   /*!
-  * \brief Reset integral and offset to 0
-  *
-  */
-  void Reset(void);
-
-  /*!
   * \brief Reset integral to 0
   *
@@ -67,14 +61,15 @@
 
   /*!
-  * \brief Reset offset to 0
+  * \brief Set offset to a specified value
   *
+  * \param value desired value
   */
-  void ResetOffset(void);
-
+  void SetOffset(float value);
+  
   /*!
   * \brief Set offset to specified value in ground station
   *
   */
-  void SetOffset(void);
+  void SetDefaultOffset(void);
 
   /*!
Index: trunk/lib/FlairMeta/src/SimuX4.cpp
===================================================================
--- trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 205)
+++ trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 206)
@@ -76,5 +76,5 @@
   ((SimuUs *)GetUsRangeFinder())->Start();
   ((SimuCamera *)GetVerticalCamera())->Start();
-  ((SimuCamera *)GetHorizontalCamera())->Start();
+  //((SimuCamera *)GetHorizontalCamera())->Start();
   if(GetGps()) ((SimuGps *)GetGps())->Start();
 }
Index: trunk/lib/FlairMeta/src/UavStateMachine.cpp
===================================================================
--- trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 205)
+++ trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 206)
@@ -469,5 +469,5 @@
     joy->SetZRef(0);
 
-    uZ->SetOffset(); // positionne l'offset de compensation de la gravité à sa
+    uZ->SetDefaultOffset(); // positionne l'offset de compensation de la gravité à sa
                      // valeur initiale (station sol)
 
@@ -761,2 +761,8 @@
   return true;
 }
+
+NestedSat* UavStateMachine::GetURoll(void) { return uRoll;};
+NestedSat* UavStateMachine::GetUPitch(void) { return uPitch;};
+Pid* UavStateMachine::GetUYaw(void) { return uYaw;};
+PidThrust* UavStateMachine::GetUZ(void) { return uZ;};
+TrajectoryGenerator1D * UavStateMachine::GetAltitudeTrajectory(void) { return altitudeTrajectory;};
Index: trunk/lib/FlairMeta/src/UavStateMachine.h
===================================================================
--- trunk/lib/FlairMeta/src/UavStateMachine.h	(revision 205)
+++ trunk/lib/FlairMeta/src/UavStateMachine.h	(revision 206)
@@ -228,4 +228,10 @@
   const sensor::TargetController *GetJoystick(void) const;
   MetaDualShock3 *joy;
+  
+  filter::NestedSat *GetURoll(void);
+  filter::NestedSat *GetUPitch(void);
+  filter::Pid *GetUYaw(void);
+  filter::PidThrust *GetUZ(void);
+  filter::TrajectoryGenerator1D *GetAltitudeTrajectory(void);
 
   gui::Tab *setupLawTab, *graphLawTab;
Index: trunk/lib/FlairSensorActuator/src/NmeaGps.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 205)
+++ trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 206)
@@ -176,16 +176,20 @@
 
   int result;
-//Printf("%s\n",frame);
+Printf("%s\n",frame);
+Printf("%x %x\n",&parser,parser.buffer);
   result = nmea_parse(&parser, frame, frame_size, &info);
+  Printf("%x %x\n",&parser,parser.buffer);
   if (result != 1) {
     Warn("unrecognized nmea sentence: %s\n",frame);
     return;
   }
-
+Printf("3\n");
+Printf("%x %x\n",&parser,parser.buffer);
   result = nmea_parse_GPGGA(frame, frame_size, &pack);
-
+Printf("%x %x\n",&parser,parser.buffer);
   if (result == 1) {
+    Printf("%x %x\n",&parser,parser.buffer);
     nmea_info2pos(&info, &pos);
-     
+     Printf("%x %x\n",&parser,parser.buffer);
    //  Printf("nb:%i fix:%i lat:%f long:%f alt:%f vel:%f angle:%f\n",pack.satinuse,pack.sig,info.lat,info.lon,info.elv,info.speed*1000./3600.,info.direction);
 //Printf("lat:%f long:%f\n",pos.lat,pos.lon);
Index: trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/SimuCamera.cpp	(revision 205)
+++ trunk/lib/FlairSensorActuator/src/SimuCamera.cpp	(revision 206)
@@ -97,4 +97,5 @@
                                                    // échange de pointeur sur
                                                    // double buffering
+                                            
     output->ReleaseMutex();
     memcpy(&time,shmemReadBuf+buf_size-sizeof(Time),sizeof(Time));
Index: trunk/lib/FlairSensorActuator/src/SimuGps.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/SimuGps.cpp	(revision 205)
+++ trunk/lib/FlairSensorActuator/src/SimuGps.cpp	(revision 206)
@@ -48,5 +48,6 @@
   fixQuality = new SpinBox(GetGroupBox()->NewRow(), "fix quality", 1, 8, 1, 1);
   numberOfSatellites = new SpinBox(GetGroupBox()->NewRow(), "number of satellites", 1, 15, 1, 5);
-
+  magneticDeclination= new DoubleSpinBox(GetGroupBox()->NewRow(), "magnetic declination", " deg", -180, 180, .1, 2,0);
+  
   shmem = new SharedMem((Thread *)this, ShMemName(modelId, deviceId),
                         sizeof(gps_states_t));
@@ -152,4 +153,5 @@
 
     nmea_gen_GPGGA(buf,sizeof(buf),&gga);
+    Printf("1\n");
     parseFrame(buf,sizeof(buf));
 
@@ -157,4 +159,5 @@
     vtg.spk=sqrtf(state.ve*state.ve+state.vn*state.vn)*3600./1000.;
     nmea_gen_GPVTG(buf,sizeof(buf),&vtg);
+    Printf("2\n");
     parseFrame(buf,sizeof(buf));
   }
Index: trunk/lib/FlairSensorActuator/src/SimuGps.h
===================================================================
--- trunk/lib/FlairSensorActuator/src/SimuGps.h	(revision 205)
+++ trunk/lib/FlairSensorActuator/src/SimuGps.h	(revision 206)
@@ -99,5 +99,5 @@
   core::SharedMem *shmem;
   gui::SpinBox *dataRate,*fixQuality,*numberOfSatellites;
-  gui::DoubleSpinBox *latitudeRef,*longitudeRef,*altitudeRef;
+  gui::DoubleSpinBox *latitudeRef,*longitudeRef,*altitudeRef,*magneticDeclination;
 };
 } // end namespace sensor
