Languages

Menu
Sites
Language
Configuring Gyroscope Sensor Sampling Rate/Frequency

Hi Guys,

I am wondering if there is any way to configure the Gyroscope Sensor Sampling Rate/Frequency. It seems Gyroscope Sensor's Frequecy/Sampling Rate is too slow compared to Accelerometer Sensor Sampling Rate. I am using Gear2 watch.

I got the Gyroscope and Acceleormeter Sensor Data as the following way:

window.addEventListener('devicemotion', function(e) {
    			ax = e.accelerationIncludingGravity.x;
				ay = -e.accelerationIncludingGravity.y;
				az = -e.accelerationIncludingGravity.z;
				rotx = e.rotationRate.alpha;
				roty = e.rotationRate.beta;
				rotz = e.rotationRate.gamma;

				document.getElementById("xaccel").innerHTML = 'AccX : ' + ax;
				document.getElementById("yaccel").innerHTML = 'AccY : ' + ay;
				document.getElementById("zaccel").innerHTML = 'AccZ : ' + az;

				document.getElementById("rotx").innerHTML = 'Rot X : ' + rotx;
				document.getElementById("roty").innerHTML = 'Rot Y : ' + roty;
				document.getElementById("rotz").innerHTML = 'Rot Z : ' + rotz;

				
			});

I appreciate any help or idea. Thanks :-)

Responses

5 Replies
daniel kim

Hi

So far, there is no exposed API in SDK to change this frequency/sampling rate.

 

I would love that feature too! Any plans on adding this to the SDK?

daniel kim

Hi,

According to DeviceOrientation Event specification of W3C, there is no way to setup this interval.

And this wearalble SDK is following the W3C specification.

  http://w3c.github.io/deviceorientation/spec-source-orientation.html

I wish this will help you.

Christina Sogon

Hi,

could someone tell me what is the accelerometer sampling frequency /rate, please?

Thanks in advance ;)

Sniper

Hi,

I got it around 32-35 Hz.

Thanks