Closed cjohnson-phys closed 3 years ago
The _STANDARD_GRAVITY
value is a constant to convert from G's as reported by the ADXL343 into units of meters/sec2. The sign of the value is part of the reported G value, not the constant.
Silk matches datasheet:
Thanks for the comments. After further research I figured out where my confusion was. Naively, if the device was laying flat on a with the positive z axis pointing up I would expect it to measure a negative acceleration due to the force of gravity but I was seeing a positive value. However it’s more normal for accelerometers to measure proper acceleration such that the z component of acceleration would go to zero if it were in free fall. This explains the choice of a positive gravity constant.
Yep, that's it. No problem. It's a very confusing thing. Worth having us check in case we got it backwards somewhere/somehow.
There are some senors that provide a "linear acceleration" value. That's essentially acceleration with the affects of gravity removed. So you'd get 0
on all 3 axis for something at rest. But those rely on other inputs and do "sensor fusion" techniques. A simple stand alone accelerometer can not distinguish between gravity and dv/dt.
On the surface of the ADXL343 there is a right-handed coordinate description of acceleration. According to this description, the _STANDARD_GRAVITY constant should be negative.