2009년 05월 15일
가속도 측정 xbow
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2005-October/012428.html
Hello all,
I am currently trying to use accelerometer for trakcing the walking status of person.
According to xbow application, I already burnt the required code for accelerometer and able to get the X and Y data from sensor.
But I understand that this data is directly from ADC and I still need to convert to respective engineering unit.
When I checked out at "xconvert.c" file, I saw the following conversion.
But it only describes about to convert to X value like this. Is this the code can apply to conversion of Y value?
===========================
float xconvert_accel(uint16_t accel_raw)
{
uint16_t AccelData;
uint16_t calib_neg_1g = 400;
uint16_t calib_pos_1g = 500;
float scale_factor;
float reading;
AccelData = accel_raw;
scale_factor = ( calib_pos_1g - calib_neg_1g ) / 2;
reading = 1.0 - (calib_pos_1g - AccelData) / scale_factor;
reading = reading * 1000.0;
return reading;
}
=============
Also in this code fraction, what is the meaning of 400 and 500 and how can I choose these values for other sensor?
Thanks you so much for your help.
Regards,
Aung Aung
# by | 2009/05/15 01:58 | 트랙백 | 덧글(1)




☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]