use quaternions instead of MRPs

also use correct time propagation equation
disable the fused sensors when gyro is not present since
they were unusable in practice.

Change-Id: Iad797425784e67dc6c5690e97c71c583418cc5b5
diff --git a/services/sensorservice/SensorFusion.h b/services/sensorservice/SensorFusion.h
index c7eab12..4c99bcb 100644
--- a/services/sensorservice/SensorFusion.h
+++ b/services/sensorservice/SensorFusion.h
@@ -27,7 +27,6 @@
 #include <gui/Sensor.h>
 
 #include "Fusion.h"
-#include "SecondOrderLowPassFilter.h"
 
 // ---------------------------------------------------------------------------
 
@@ -45,15 +44,10 @@
     Sensor mGyro;
     Fusion mFusion;
     bool mEnabled;
-    bool mHasGyro;
     float mGyroRate;
     nsecs_t mTargetDelayNs;
     nsecs_t mGyroTime;
-    mat33_t mRotationMatrix;
-    SecondOrderLowPassFilter mLowPass;
-    BiquadFilter<vec3_t> mAccData;
-    vec3_t mFilteredMag;
-    vec3_t mFilteredAcc;
+    vec4_t mAttitude;
     SortedVector<void*> mClients;
 
     SensorFusion();
@@ -62,9 +56,9 @@
     void process(const sensors_event_t& event);
 
     bool isEnabled() const { return mEnabled; }
-    bool hasGyro() const { return mHasGyro; }
-    bool hasEstimate() const { return !mHasGyro || mFusion.hasEstimate(); }
-    mat33_t getRotationMatrix() const { return mRotationMatrix; }
+    bool hasEstimate() const { return mFusion.hasEstimate(); }
+    mat33_t getRotationMatrix() const { return mFusion.getRotationMatrix(); }
+    vec4_t getAttitude() const { return mAttitude; }
     vec3_t getGyroBias() const { return mFusion.getBias(); }
     float getEstimatedRate() const { return mGyroRate; }