From 7badd2c402f9e8e9fd13f6915ad2e32301f9f305 Mon Sep 17 00:00:00 2001
From: Mathias Agopian <mathias@google.com>
Date: Mon, 22 Nov 2010 15:48:10 -0800
Subject: 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
---
 services/sensorservice/RotationVectorSensor.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'services')

diff --git a/services/sensorservice/RotationVectorSensor.cpp b/services/sensorservice/RotationVectorSensor.cpp
index eecf260..50cd6be 100644
--- a/services/sensorservice/RotationVectorSensor.cpp
+++ b/services/sensorservice/RotationVectorSensor.cpp
@@ -125,6 +125,7 @@ bool RotationVectorSensor::process(sensors_event_t* outEvent,
         outEvent->data[0] = qx;
         outEvent->data[1] = qy;
         outEvent->data[2] = qz;
+        outEvent->data[3] = qw;
         outEvent->sensor = '_rov';
         outEvent->type = SENSOR_TYPE_ROTATION_VECTOR;
         return true;
-- 
cgit v1.1