Unit in which generic_buffer.c application gives data for sensors.
Hi, What are the unit in which the generic_buffer.c application gives the accelerometer , Gyro and Magnetometer values. Thanks in advance ! Rgd, S
On Thu, Jul 2, 2015 at 10:46 AM, s.rawat <imsaurabhrawat@gmail.com> wrote:
Hi, What are the unit in which the generic_buffer.c application gives the accelerometer , Gyro and Magnetometer values. Thanks in advance !
Hi, Look for process_scan function in generic_buffer.c. It says: process_scan() - print out the values in SI units. Then, look inside IIO ABI file [1] for units associated with _raw attributes. There you'll find: * accel - m/s^2 * gyro - rad/s * magneto - Gauss thanks, Daniel. [1] http://lxr.free-electrons.com/source/Documentation/ABI/testing/sysfs-bus-iio
On Thu, Jul 2, 2015 at 4:13 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
* accel - m/s^2 * gyro - rad/s * magneto - Gaus
I get the data as below : in_accel_x 71000 71000.0 in_accel_y -45000 -45000.0 in_accel_z -1003000 -1003000.0 This seems correct except I think the data from the device is definitely not in m/s2 , seems like it is in "μg".What would be correct -> telling the device firmware writer to change the fw to send data in m/s2 or I convert this data to m/s^2 at host end? Rgds, S
On Thu, Jul 2, 2015 at 2:53 PM, s.rawat <imsaurabhrawat@gmail.com> wrote:
On Thu, Jul 2, 2015 at 4:13 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
* accel - m/s^2 * gyro - rad/s * magneto - Gaus
I get the data as below :
in_accel_x 71000 71000.0 in_accel_y -45000 -45000.0 in_accel_z -1003000 -1003000.0
This seems correct except I think the data from the device is definitely not in m/s2 , seems like it is in "μg".What would be correct -> telling the device firmware writer to change the fw to send data in m/s2 or I convert this data to m/s^2 at host end?
What driver is this? generic_buffer application reads the data from device buffer than applies the offset and the scale. Perhaps, your driver doesn't correctly expose the scale? thanks, Daniel.
participants (2)
-
Daniel Baluta -
s.rawat