# Unable to calculate gyro and accel angles with ADIS16497 burst data samples.

Hi all,

I wrote a formula as per data sheet: xgyro_value = ((float)x_gyro*0.25)/2^16;

xgyro_value = ((float)x_gyro*0.25)/2^15;

x_gyro is 32 bit value from adis burst data as shown in figure.....

kindly help me regarding this....

Thank you

• Dear Kshekar264,

Are you trying to calculate angle or angular rate of rotation?  The gyroscopes (in the ADIS16497) actually measure angular rate of rotation, not angles.  It seems like you might be asking for help in figuring out how to implement the delta-angle function, which is described on page 25, of the ADIS16497 datasheet.  Is that correct?  If so, how can we help?

-Paul Kern

• Dear pkern,

Thank you for your response,  what you said is correct, i am very new to this, and i am trying to calculate angular rate of rotation, from ADIS16497 sensors burst data samples.

• Dear Kshekar264,

Ok. The angular rate of rotation is more straightforward.

The first step is to determine the correct value of Kg, which you indicate is 0.25 deg/sec/LSB.

First, you must determine if you have a positive or negative value of X-gyro. Do this by:

SIGN_X_GYRO=AND(X_gyro, 0x80000000);  // will be "1" if negative

if(SIGN_X_GYRO) {

ABS_X_GYRO=AND(XOR(x_gyro)+1),0x7FFFFFFF); // computes 2's comp absolute value if neg

}

else {

ABS_X_GYRO=x_gyro;

}

X_GYRO_RATE= kg*x_gyro;

Note that I didn't include any type casting, nor did I decide how to handle the negative sign, but in principle, the gyro already has the angular rate, so you don't need to divide by 2^16 or 2^31.

Now, in order to calculate angle, you must first either read the DC value of the accelerometers, or just decide that the angle =0 deg when you start integrating the angular rate in order to get compute the angle from the angular rate.

-Paul Kern