Languages

Menu
Sites
Language
Gear S3 - Using the Gyroscope Rotation Vector only returns sensor data values of 0

Hi all,

I am writing this Web App on Gear S3 and trying to get the device's rotation data.  Here is the code I use:

var gyroscopeRVSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");

gyroscopeRVSensor.setChangeListener(onChangedGyroscopeSensor);
gyroscopeRVSensor.start(onSuccessGyroscopeSensor);
 
function onSuccessGyroscopeSensor(sensorData) { }
function onChangedGyroscopeSensor(sensorData)
{
  // This method now gets called on a regular basis, but sensorData.x, y, z, w are all 0
}
 
(Note that when I call GetAvailableSensors on my S3, the 'GYROSCOPE_ROTATION_VECTOR' is in the list)
 
In the config file, I am using the following Features:
 
tizen.org/feature/sensor.accelerometer
tizen.org/feature/sensor.gravity
tizen.org/feature/sensor.gyroscope
tizen.org/feature/sensor.gyroscope_rotation_vector
tizen.org/feature/sensor.magnetometer
 
Any help will be greatly appreciated.
 
Thanks!

Responses

2 Replies
Armaan-Ul- Islam

I deployed Code for Gyroscope on Samsung Gear S3. Gyroscope sensor data can be read successfully:

 

 

But when it comes to Gyro Rotation Vector the values seems stuck on 0.

 

 

I rotated the gear arbitrarily but the data seems same. You are sure that the rotation vector data should have changed while rotating the device,right?

If yes, Then it seems a bug. You may report a bug on Tizen bug Tracker. Here's a guideline on how to report bugs. Please share the 'Reported bug' link here on this post to help the developers keep track.

Code Used:

function onSuccessGyroscopeSensor(sensorData) {
    console.log("GRV sensor started");
}
function onChangedGyroscopeSensor(sensorData){
	  console.log("######## Get the gyroscope rotation vector sensor data ########");
	     console.log("x: " + sensorData.x);
	     console.log("y: " + sensorData.y);
	     console.log("z: " + sensorData.z);
	     console.log("w: " + sensorData.w);
}

	
var gyroscopeRVSensor=tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");
//var gyroscopeRVSensor=tizen.sensorservice.getDefaultSensor("GYROSCOPE");
	
gyroscopeRVSensor.setChangeListener(onChangedGyroscopeSensor);
gyroscopeRVSensor.start(onSuccessGyroscopeSensor);

 

John Seminaro

As proposed, I have reported a bug on the Tizen bug Tracker.  The link for this bug is here.