Index: unk/lib/FlairFilter/src/Gx3_25_ahrs.cpp
===================================================================
--- /trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp	(revision 416)
+++ 	(revision )
@@ -1,58 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-//  created:    2013/01/16
-//  filename:   Gx3_25_ahrs.cpp
-//
-//  author:     Guillaume Sanahuja
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    class for 3dmgx3-25 ahrs
-//
-//
-/*********************************************************************/
-#ifdef ARMV7A
-
-#include "Gx3_25_ahrs.h"
-#include <AhrsData.h>
-#include <OneAxisRotation.h>
-
-using std::string;
-using namespace flair::core;
-using namespace flair::sensor;
-
-namespace flair {
-namespace filter {
-
-Gx3_25_ahrs::Gx3_25_ahrs(string name,
-                         SerialPort *serialport, Gx3_25_imu::Command_t command,
-                         uint8_t priority)
-    : Ahrs(new Gx3_25_imu( "imu", serialport, command, priority), name) {
-
-  SetIsReady(true);
-}
-
-Gx3_25_ahrs::~Gx3_25_ahrs() {}
-
-// datas outputed from Gx3_25_imu are AhrsData!
-void Gx3_25_ahrs::UpdateFrom(const io_data *data) {
-  AhrsData *input = (AhrsData *)data;
-  AhrsData *output;
-  GetDatas(&output);
-
-  Quaternion quaternion;
-  Vector3Df filteredAngRates;
-  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetDataTime(input->DataTime());
-
-  ProcessUpdate(output);
-}
-
-} // end namespace filter
-} // end namespace flair
-
-#endif
Index: unk/lib/FlairFilter/src/Gx3_25_ahrs.h
===================================================================
--- /trunk/lib/FlairFilter/src/Gx3_25_ahrs.h	(revision 416)
+++ 	(revision )
@@ -1,61 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-/*!
- * \file Gx3_25_ahrs.h
- * \brief Class for 3dmgx3-25 ahrs
- * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
- * \date 2013/01/16
- * \version 4.0
- */
-
-#ifndef GX3_25_AHRS_H
-#define GX3_25_AHRS_H
-
-#include <Ahrs.h>
-#include <Gx3_25_imu.h>
-
-namespace flair {
-namespace filter {
-/*! \class Gx3_25_ahrs
-*
-* \brief Class for 3dmgx3-25 ahrs
-*
-* This class constructs a Gx3_25_imu as Imu of this Ahrs.
-*/
-class Gx3_25_ahrs : public Ahrs {
-public:
-  /*!
-  * \brief Constructor
-  *
-  * Construct an Ahrs for 3dmgx3-25. It will be child of the FrameworkManager.
-  *
-  * \param name name
-  * \param serialport Imu SerialPort
-  * \param command command for the Gx3_25_imu continuous mode
-  * \param priority priority of the Gx3_25_imu Thread
-  */
-  Gx3_25_ahrs(std::string name,
-              core::SerialPort *serialport,
-              sensor::Gx3_25_imu::Command_t command, uint8_t priority);
-
-  /*!
-  * \brief Destructor
-  *
-  */
-  ~Gx3_25_ahrs();
-
-private:
-  /*!
-  * \brief Update using provided datas
-  *
-  * Reimplemented from IODevice.
-  *
-  * \param data data from the parent to process
-  */
-  void UpdateFrom(const core::io_data *data);
-};
-} // end namespace filter
-} // end namespace flair
-#endif // GX3_25_AHRS_H
Index: /trunk/lib/FlairFilter/src/PassthroughAhrs.cpp
===================================================================
--- /trunk/lib/FlairFilter/src/PassthroughAhrs.cpp	(revision 417)
+++ /trunk/lib/FlairFilter/src/PassthroughAhrs.cpp	(revision 417)
@@ -0,0 +1,53 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2021/04/15
+//  filename:   PassthroughAhrs.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Class for passthrough imu to ahrs. When imu can already delivers ahrs datas
+//
+//
+/*********************************************************************/
+
+#include "PassthroughAhrs.h"
+#include <AhrsData.h>
+
+
+using std::string;
+using namespace flair::core;
+using namespace flair::sensor;
+
+namespace flair {
+namespace filter {
+
+PassthroughAhrs::PassthroughAhrs(Imu *imu,string name)
+    : Ahrs(imu, name) {
+
+  SetIsReady(true);
+}
+
+PassthroughAhrs::~PassthroughAhrs() {}
+
+// datas outputed imu are AhrsData!
+void PassthroughAhrs::UpdateFrom(const io_data *data) {
+  AhrsData *input = (AhrsData *)data;
+  AhrsData *output;
+  GetDatas(&output);
+
+  Quaternion quaternion;
+  Vector3Df filteredAngRates;
+  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
+  output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
+  output->SetDataTime(input->DataTime());
+
+  ProcessUpdate(output);
+}
+
+} // end namespace filter
+} // end namespace flair
Index: /trunk/lib/FlairFilter/src/PassthroughAhrs.h
===================================================================
--- /trunk/lib/FlairFilter/src/PassthroughAhrs.h	(revision 417)
+++ /trunk/lib/FlairFilter/src/PassthroughAhrs.h	(revision 417)
@@ -0,0 +1,61 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file PassthroughAhrs.h
+ * \brief Class for passthrough imu to ahrs. When imu can already delivers ahrs datas
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2021/04/15
+ * \version 4.0
+ */
+
+#ifndef PASSTHROUGHAHRS_H
+#define PASSTHROUGHAHRS_H
+
+#include <Ahrs.h>
+
+namespace flair {
+  namespace sensor {
+    class Imu;
+  }
+}
+
+namespace flair {
+namespace filter {
+/*! \class PassthroughAhrs
+*
+* \brief Class for passthrough imu to ahrs. When imu can already delivers ahrs datas
+*
+*/
+class PassthroughAhrs : public Ahrs {
+public:
+  /*!
+  * \brief Constructor
+  *
+  * Construct a PassthroughAhrs
+  *
+  * \param imu Imu
+  * \param name name
+  */
+  PassthroughAhrs(sensor::Imu* imu,std::string name);
+
+  /*!
+  * \brief Destructor
+  *
+  */
+  ~PassthroughAhrs();
+
+private:
+  /*!
+  * \brief Update using provided datas
+  *
+  * Reimplemented from IODevice.
+  *
+  * \param data data from the parent to process
+  */
+  void UpdateFrom(const core::io_data *data);
+};
+} // end namespace filter
+} // end namespace flair
+#endif // PASSTHROUGHAHRS_H
Index: unk/lib/FlairFilter/src/SimulatedAhrs.cpp
===================================================================
--- /trunk/lib/FlairFilter/src/SimulatedAhrs.cpp	(revision 416)
+++ 	(revision )
@@ -1,56 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-//  created:    2014/02/07
-//  filename:   SimulatedAhrs.cpp
-//
-//  author:     Guillaume Sanahuja
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    Class for a simulation ahrs
-//
-//
-/*********************************************************************/
-#ifdef CORE2_64
-
-#include "SimulatedAhrs.h"
-#include "SimulatedImu.h"
-#include <AhrsData.h>
-
-using std::string;
-using namespace flair::core;
-using namespace flair::sensor;
-
-namespace flair {
-namespace filter {
-
-SimulatedAhrs::SimulatedAhrs(string name, uint32_t modelId,uint32_t deviceId,
-                   uint8_t priority)
-    : Ahrs(new SimulatedImu("imu", modelId,deviceId, priority), name) {
-  SetIsReady(true);
-}
-
-SimulatedAhrs::~SimulatedAhrs() {}
-
-// datas from SimulatedImu are AhrsData!
-void SimulatedAhrs::UpdateFrom(const io_data *data) {
-  AhrsData *input = (AhrsData *)data;
-  AhrsData *output;
-  GetDatas(&output);
-
-  Quaternion quaternion;
-  Vector3Df filteredAngRates;
-  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetDataTime(input->DataTime());
-
-  ProcessUpdate(output);
-}
-
-} // end namespace filter
-} // end namespace flair
-
-#endif
Index: unk/lib/FlairFilter/src/SimulatedAhrs.h
===================================================================
--- /trunk/lib/FlairFilter/src/SimulatedAhrs.h	(revision 416)
+++ 	(revision )
@@ -1,59 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-/*!
- * \file SimulatedAhrs.h
- * \brief Class for a simulation Ahrs
- * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
- * \date 2014/02/07
- * \version 4.0
- */
-
-#ifndef SIMUAHRS_H
-#define SIMUAHRS_H
-
-#include <Ahrs.h>
-
-namespace flair {
-namespace filter {
-/*! \class SimulatedAhrs
-*
-* \brief Class for a simulation Ahrs
-*
-* This class constructs a SimulatedImu as Imu of this Ahrs.
-*/
-class SimulatedAhrs : public filter::Ahrs {
-public:
-  /*!
-  * \brief Constructor
-  *
-  * Construct a simulation Ahrs. It will be child of the FrameworkManager.
-  *
-  * \param name name
-  * \param modelId Model id
-  * \param deviceId Ahrs id of the Model
-  * \param priority priority of the SimulatedImu Thread
-  */
-  SimulatedAhrs(std::string name,
-           uint32_t modelId,uint32_t deviceId, uint8_t priority);
-
-  /*!
-  * \brief Destructor
-  *
-  */
-  ~SimulatedAhrs();
-
-private:
-  /*!
-  * \brief Update using provided datas
-  *
-  * Reimplemented from IODevice.
-  *
-  * \param data data from the parent to process
-  */
-  void UpdateFrom(const core::io_data *data);
-};
-} // end namespace filter
-} // end namespace flair
-#endif // SIMUAHRS_H
Index: unk/lib/FlairIpc/src/IpcAhrs.cpp
===================================================================
--- /trunk/lib/FlairIpc/src/IpcAhrs.cpp	(revision 416)
+++ 	(revision )
@@ -1,54 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-//  created:    2021/03/03
-//  filename:   IpcdAhrs.cpp
-//
-//  author:     Sébastien Ambroziak
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    Class for an ipc ahrs
-//
-//
-/*********************************************************************/
-
-
-#include "IpcAhrs.h"
-#include "IpcImu.h"
-#include <AhrsData.h>
-
-using std::string;
-using namespace flair::core;
-using namespace flair::sensor;
-
-namespace flair {
-namespace filter {
-
-IpcAhrs::IpcAhrs(string name, uint8_t priority, const char* ipc_name, int ipc_channel)
-    : Ahrs(new IpcImu("imu", priority, ipc_name, ipc_channel, false), name) {
-  SetIsReady(true);
-}
-
-IpcAhrs::~IpcAhrs() {}
-
-// datas from IpcImu are AhrsData!
-void IpcAhrs::UpdateFrom(const io_data *data) {
-  AhrsData *input = (AhrsData *)data;
-  AhrsData *output;
-  GetDatas(&output);
-
-  Quaternion quaternion;
-  Vector3Df filteredAngRates;
-  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
-  output->SetDataTime(input->DataTime());
-
-  ProcessUpdate(output);
-}
-
-} // end namespace filter
-} // end namespace flair
-
Index: unk/lib/FlairIpc/src/IpcAhrs.h
===================================================================
--- /trunk/lib/FlairIpc/src/IpcAhrs.h	(revision 416)
+++ 	(revision )
@@ -1,58 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-/*!
- * \file IpcAhrs.h
- * \brief Class for an ipc Ahrs
- * \author Sébastien Ambroziak, Copyright Heudiasyc UMR UTC/CNRS 7253
- * \date 2021/03/03
- * \version 4.0
- */
-
-#ifndef IPCAHRS_H
-#define IPCAHRS_H
-
-#include <Ahrs.h>
-
-namespace flair {
-namespace filter {
-/*! \class IpcAhrs
-*
-* \brief Class for an ipc Ahrs
-*
-* This class also constructs an IpcImu as Imu of this Ahrs.
-*/
-class IpcAhrs : public filter::Ahrs {
-public:
-  /*!
-  * \brief Constructor
-  *
-  * Construct an ipc Ahrs. It will be child of the FrameworkManager.
-  *
-  * \param name name
-  * \param priority priority of the SimulatedImu Thread
-  * \param ipc_name name of the ipc
-  * \param ipc_channel ipc channel number
-  */
-  IpcAhrs(std::string name, uint8_t priority, const char* ipc_name, int ipc_channel);
-
-  /*!
-  * \brief Destructor
-  *
-  */
-  ~IpcAhrs();
-
-private:
-  /*!
-  * \brief Update using provided datas
-  *
-  * Reimplemented from IODevice.
-  *
-  * \param data data from the parent to process
-  */
-  void UpdateFrom(const core::io_data *data);
-};
-} // end namespace filter
-} // end namespace flair
-#endif // IPCAHRS_H
Index: /trunk/lib/FlairIpc/src/IpcX4.cpp
===================================================================
--- /trunk/lib/FlairIpc/src/IpcX4.cpp	(revision 416)
+++ /trunk/lib/FlairIpc/src/IpcX4.cpp	(revision 417)
@@ -19,5 +19,5 @@
 #include <IpcBldc.h>
 #include <IpcUs.h>
-#include <IpcAhrs.h>
+#include <PassthroughAhrs.h>
 #include <IpcImu.h>
 #include <BatteryMonitor.h>
@@ -49,5 +49,5 @@
   SetUsRangeFinder(new IpcUs("us", 70, "altitude", 65));
  
-  SetAhrs(new IpcAhrs("ahrs",70,"imu",65));
+  SetAhrs(new PassthroughAhrs(new IpcImu("imu",70,"imu",65),"ahrs"));
 
   Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
Index: /trunk/lib/FlairMeta/src/HdsX8.cpp
===================================================================
--- /trunk/lib/FlairMeta/src/HdsX8.cpp	(revision 416)
+++ /trunk/lib/FlairMeta/src/HdsX8.cpp	(revision 417)
@@ -22,5 +22,6 @@
 #include <RTDM_SerialPort.h>
 #include <Srf08.h>
-#include <Gx3_25_ahrs.h>
+#include <PassthroughAhrs.h>
+#include <Gx3_25_imu.h>
 #include <BlCtrlV2.h>
 #include <X4X8Multiplex.h>
@@ -50,6 +51,6 @@
                        "motors", GetUavMultiplex()->MotorsCount(), i2cport));
   SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60));
-  SetAhrs(new Gx3_25_ahrs("ahrs", imu_port,
-                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
+ 
+  SetAhrs(new PassthroughAhrs(new Gx3_25_imu("imu",imu_port,Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70),"ahrs"));
   SetBatteryMonitor(((BlCtrlV2 *)GetBldc())->GetBatteryMonitor());
   
Index: /trunk/lib/FlairMeta/src/SimuX4.cpp
===================================================================
--- /trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 416)
+++ /trunk/lib/FlairMeta/src/SimuX4.cpp	(revision 417)
@@ -21,5 +21,5 @@
 #include <X4X8Multiplex.h>
 #include <SimulatedImu.h>
-#include <SimulatedAhrs.h>
+#include <PassthroughAhrs.h>
 #include <SimulatedBldc.h>
 #include <SimulatedUs.h>
@@ -51,5 +51,5 @@
                        "motors", GetUavMultiplex()->MotorsCount(), simu_id,0));
   SetUsRangeFinder(new SimulatedUs("us", simu_id,0, 60));
-  SetAhrs(new SimulatedAhrs("ahrs", simu_id, 0,70));
+  SetAhrs(new PassthroughAhrs(new SimulatedImu("imu", simu_id,0, 70),"ahrs"));
   Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
   SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
Index: /trunk/lib/FlairMeta/src/SimuX8.cpp
===================================================================
--- /trunk/lib/FlairMeta/src/SimuX8.cpp	(revision 416)
+++ /trunk/lib/FlairMeta/src/SimuX8.cpp	(revision 417)
@@ -21,5 +21,5 @@
 #include <X4X8Multiplex.h>
 #include <SimulatedImu.h>
-#include <SimulatedAhrs.h>
+#include <PassthroughAhrs.h>
 #include <SimulatedBldc.h>
 #include <SimulatedUs.h>
@@ -51,5 +51,5 @@
                        "motors", GetUavMultiplex()->MotorsCount(), simu_id,0));
   SetUsRangeFinder(new SimulatedUs("us", simu_id,0, 60));
-  SetAhrs(new SimulatedAhrs("ahrs", simu_id, 0,70));
+  SetAhrs(new PassthroughAhrs(new SimulatedImu("imu", simu_id,0, 70),"ahrs"));
   Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
   SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
Index: /trunk/lib/FlairMeta/src/XAir.cpp
===================================================================
--- /trunk/lib/FlairMeta/src/XAir.cpp	(revision 416)
+++ /trunk/lib/FlairMeta/src/XAir.cpp	(revision 417)
@@ -22,5 +22,6 @@
 #include <RTDM_SerialPort.h>
 #include <Srf08.h>
-#include <Gx3_25_ahrs.h>
+#include <PassthroughAhrs.h>
+#include <Gx3_25_imu.h>
 #include <AfroBldc.h>
 #include <X4X8Multiplex.h>
@@ -51,6 +52,6 @@
                        "motors", GetUavMultiplex()->MotorsCount(), i2cport));
   SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60));
-  SetAhrs(new Gx3_25_ahrs("imu", imu_port,
-                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
+  SetAhrs(new PassthroughAhrs(new Gx3_25_imu("imu",imu_port,Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70),"ahrs"));
+  
   Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
   SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
