History log of /frameworks/base/services/sensorservice/RotationVectorSensor.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a97ead75db11ce7dcaa0d3a598fb2de805d30d2d 19-Jan-2011 Mathias Agopian <mathias@google.com> fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly

The cut-off frequency of the lowpass filter was too high
for the sampling rate used by DELAY_NORMAL.

Now we use the same filters used for the gravity vector
(cascaded biquad at 1.5 Hz)

Change-Id: Iac290a716cc47a78337a8f0e45b103e49b4d9d78
/frameworks/base/services/sensorservice/RotationVectorSensor.cpp
b483d5cd134cda393824fd8e9c1a5443bd868ae6 30-Nov-2010 Mathias Agopian <mathias@google.com> fix [3237242] sensormanager sensor active count gets out of sync

whether a physical sensor needed to be active or not was managed by
a simpe reference counter; unfortunatelly nothing prevented it to
get out of sync if a sensor was disabled more than once.

sensorservice already maintainted a list of all the "clients"
connected to a physical sensor; we now use that list to determine if
a sensor should be enabled. This can never be "out-of-sync" since
this is the only data structure linking a sensor to a user of that
sensor.

also removed the isEnabled() method, which was never used and
implemented wrongly (since it didn't take into account that a sensor
could be disabled for a client but not of another).

Change-Id: I789affb877728ca957e99f7ba749def37c4db1c7
/frameworks/base/services/sensorservice/RotationVectorSensor.cpp
7badd2c402f9e8e9fd13f6915ad2e32301f9f305 23-Nov-2010 Mathias Agopian <mathias@google.com> allow rotation-vector to have 4 components

- upadte documentation for rotation vector
- update method dealing with rotation vector to deal with 4 components
- virtual rotation-vector sensor reports all four components
- improve SensorManager documentation layout

Whent he 4-th component of the rotation-vector is present, we can save
a square-root when computing the quaternion or rotation matrix from it.

Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8
/frameworks/base/services/sensorservice/RotationVectorSensor.cpp
5d45c33eb875b9c9d51c9364afa57a0be65adfa4 22-Nov-2010 Mathias Agopian <mathias@google.com> don't attempt to normalize the rotation vector

indeed, by construction of the rotation matrix, it is
guaranteed to have a length of 1.

moreover, the normalization code was missing a square-root,
fortunatelly, since the length is 1, this didn't cause any
damage (since sqrt(1) = 1).

Change-Id: I9facd668caaf5bb3bfccb139ab872f2bb2066365
/frameworks/base/services/sensorservice/RotationVectorSensor.cpp
671a6ff4be11b3e2d8eb017e0c7a78e6133fb2b8 12-Nov-2010 Mathias Agopian <mathias@google.com> Add support for virtual sensors.

Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.

the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.

The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used

For this purpose an "identity" is associated with each real sensor
activation, so we can track them.

On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.

Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
/frameworks/base/services/sensorservice/RotationVectorSensor.cpp