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
This commit is contained in:
parent
bc00846436
commit
b62013f6aa
@ -21,8 +21,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <utils/Errors.h>
|
||||
#include <utils/String8.h>
|
||||
#include <utils/Flattenable.h>
|
||||
#include <utils/String8.h>
|
||||
#include <utils/Timers.h>
|
||||
|
||||
#include <hardware/sensors.h>
|
||||
|
||||
@ -64,6 +65,8 @@ public:
|
||||
float getResolution() const;
|
||||
float getPowerUsage() const;
|
||||
int32_t getMinDelay() const;
|
||||
nsecs_t getMinDelayNs() const;
|
||||
int32_t getVersion() const;
|
||||
|
||||
// Flattenable interface
|
||||
virtual size_t getFlattenedSize() const;
|
||||
@ -83,6 +86,7 @@ private:
|
||||
float mResolution;
|
||||
float mPower;
|
||||
int32_t mMinDelay;
|
||||
int32_t mVersion;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -89,6 +89,14 @@ int32_t Sensor::getMinDelay() const {
|
||||
return mMinDelay;
|
||||
}
|
||||
|
||||
nsecs_t Sensor::getMinDelayNs() const {
|
||||
return getMinDelay() * 1000;
|
||||
}
|
||||
|
||||
int32_t Sensor::getVersion() const {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
size_t Sensor::getFlattenedSize() const
|
||||
{
|
||||
return sizeof(int32_t) + ((mName.length() + 3) & ~3) +
|
||||
|
Loading…
Reference in New Issue
Block a user