Conversion of acceleration seems wrong (via Accel_Scale macro)
Opened this issue · 3 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
Serial.print(Accel_Scale(Accel_Vector[2]));
What is the expected output? What do you see instead?
Using the conversion from ADC-values to accelerations by the defined scaling:
#define Accel_Scale(x) x*(GRAVITY/9.81)//Scaling the raw data of the accel to
actual acceleration in meters for seconds square
produces unexpected values.
-> expected is an acceleration in m/s2 in z-direction of about 9.81
To be correct, the conversion should be defined as:
#define Accel_Scale(x) x*(9.81/GRAVITY)//Scaling the raw data of the accel to
actual acceleration in meters for seconds square
to produce the expected output!
What version of the product are you using? On what operating system?
I'm using 1.5, but its still in 1.8
Original issue reported on code.google.com by some...@online.de
on 8 Jan 2011 at 12:40
GoogleCodeExporter commented
I believe the code is right but the comment is wrong. Accel_Scale actually
takes an acceleration in m/s^2 (e.g. the centripetal acceleration) and scales
it to an ADC value that is subtracted off of the measured accel ADC value.
Original comment by reiteran...@gmail.com
on 20 Apr 2011 at 8:10
GoogleCodeExporter commented
Oho, yes, that makes sense too...
Original comment by some...@online.de
on 23 Apr 2011 at 9:33
GoogleCodeExporter commented
...after thinking about it...
-> Accel_Vector is float, because of the Over-Sampling mean values of the ADC
(not because its in m/s²), I'm fine ;-)
Thanks a lot!
Sven
Original comment by some...@online.de
on 25 Apr 2011 at 11:53