![]() |
gyro.h help
I'm studying the gyro.h and i have a question. I'm working with ADXRS300.
In gyro.h --> // Analog Devices' ADXRS300 (sensitivity = 5.0mV/deg/sec) #ifdef ADXRS300 #define GYRO_SENSITIVITY_DEG 2000L // in units of tenths of a degree/sec/volt #define GYRO_SENSITIVITY_RAD 3490L // in units of milliradians/sec/volt #endif the value of GYRO_SENSITIVY_DEG 2000L, how do you calculate this value? i'm reading the datasheet from ADXRS300 and i haven't found it anywhere. Please help me! Thank you |
Re: gyro.h help
Quote:
There are one thousand millivolts in each volt. Does that help? |
Re: gyro.h help
Sorry, i don't understand it.
5 mV/ deg/sec 5 mV = 0,005 V by other hand in gyro.c --> int Get_Gyro_Rate(void) { // Return the calculated gyro rate to the caller. return((int)((((long)gyro_rate * GYRO_SENSITIVITY * 5L) / ADC_RANGE)) * GYRO_CAL_FACTOR); } I think that 5L was the sensitivity, and then, ¿What is it? |
Re: gyro.h help
The ADXRS300 sensitivity is 5 millivolts per degree/second.
The constant in the code is in tenth-degree/second per volt. 5 millivolts per degree/second is 0.005 volts per degree/second. 0.005 volts per degree/second is 0.0005 volts per tenth-degree/second. 0.0005 volts per tenth-degree/second is 2000 tenth-degree/second per volt. Is that clear? |
Re: gyro.h help
sorry again,
what do you do to change V per tenth-deg to V per seg? i see that 2000 is the result to divide 1/0,0005 but i don't understand it. By other side, int Get_Gyro_Rate(void) { // Return the calculated gyro rate to the caller. return((int)((((long)gyro_rate * GYRO_SENSITIVITY * 5L) / ADC_RANGE)) * GYRO_CAL_FACTOR); } 5L, what is this? thank you |
Re: gyro.h help
Quote:
Quote:
|
| All times are GMT -5. The time now is 02:28. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi