summaryrefslogtreecommitdiffstats
path: root/services/sensorservice/GravitySensor.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-05-17 22:54:42 -0700
committerMathias Agopian <mathias@google.com>2012-06-27 17:07:54 -0700
commit984826cc158193e61e3a00359ef4f6699c7d748a (patch)
tree22c7bfb0fb0367137f1e4a4d1a0bb6921600a0e1 /services/sensorservice/GravitySensor.h
parenta1b7db95b6ccf5be9d8dfaac1b8f45494813edc0 (diff)
downloadframeworks_native-984826cc158193e61e3a00359ef4f6699c7d748a.zip
frameworks_native-984826cc158193e61e3a00359ef4f6699c7d748a.tar.gz
frameworks_native-984826cc158193e61e3a00359ef4f6699c7d748a.tar.bz2
9-axis sensor fusion with Kalman filter
Add support for 9-axis gravity and linear-acceleration sensors virtual orientation sensor using 9-axis fusion Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
Diffstat (limited to 'services/sensorservice/GravitySensor.h')
-rw-r--r--services/sensorservice/GravitySensor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/sensorservice/GravitySensor.h b/services/sensorservice/GravitySensor.h
index decfbb8..0ca3a3c 100644
--- a/services/sensorservice/GravitySensor.h
+++ b/services/sensorservice/GravitySensor.h
@@ -22,7 +22,6 @@
#include <gui/Sensor.h>
-#include "SensorDevice.h"
#include "SensorInterface.h"
#include "SecondOrderLowPassFilter.h"
@@ -30,13 +29,17 @@
namespace android {
// ---------------------------------------------------------------------------
+class SensorDevice;
+class SensorFusion;
+
class GravitySensor : public SensorInterface {
SensorDevice& mSensorDevice;
+ SensorFusion& mSensorFusion;
Sensor mAccelerometer;
double mAccTime;
SecondOrderLowPassFilter mLowPass;
- CascadedBiquadFilter mX, mY, mZ;
+ CascadedBiquadFilter<float> mX, mY, mZ;
public:
GravitySensor(sensor_t const* list, size_t count);