Gear S3 – Using the Gyroscope Rotation Vector only returns sensor data values of 0

Gear S3 – Using the Gyroscope Rotation Vector only returns sensor data values of 0

BY 24 Jan 2018 Web Application Development

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!
Written by