diff options
author | Mathias Agopian <mathias@google.com> | 2011-05-27 18:18:13 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-06-27 17:07:55 -0700 |
commit | 3301542828febc768e1df42892cfac4992c35474 (patch) | |
tree | 759732e19eaa05c365b2c92f0add66a9dd878e30 /services/sensorservice/RotationVectorSensor.h | |
parent | 984826cc158193e61e3a00359ef4f6699c7d748a (diff) | |
download | frameworks_native-3301542828febc768e1df42892cfac4992c35474.zip frameworks_native-3301542828febc768e1df42892cfac4992c35474.tar.gz frameworks_native-3301542828febc768e1df42892cfac4992c35474.tar.bz2 |
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
Diffstat (limited to 'services/sensorservice/RotationVectorSensor.h')
-rw-r--r-- | services/sensorservice/RotationVectorSensor.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/services/sensorservice/RotationVectorSensor.h b/services/sensorservice/RotationVectorSensor.h index ac76487..bb97fe1 100644 --- a/services/sensorservice/RotationVectorSensor.h +++ b/services/sensorservice/RotationVectorSensor.h @@ -24,7 +24,6 @@ #include "SensorDevice.h" #include "SensorInterface.h" -#include "SecondOrderLowPassFilter.h" #include "Fusion.h" #include "SensorFusion.h" @@ -47,6 +46,20 @@ public: virtual bool isVirtual() const { return true; } }; +class GyroDriftSensor : public SensorInterface { + SensorDevice& mSensorDevice; + SensorFusion& mSensorFusion; + +public: + GyroDriftSensor(); + virtual bool process(sensors_event_t* outEvent, + const sensors_event_t& event); + virtual status_t activate(void* ident, bool enabled); + virtual status_t setDelay(void* ident, int handle, int64_t ns); + virtual Sensor getSensor() const; + virtual bool isVirtual() const { return true; } +}; + // --------------------------------------------------------------------------- }; // namespace android |