Understanding data from LSM6DS3 6-dof sensor

Hello,

I am using the 6-dof sensor LSM6DS3 in one of my projects. I was looking at the SparkFun LSM6DS3 Arduino Library, and it is not clear to me how the raw accl and gyro data is converted to float values. Specifically, the conversion from:

raw accl → G value

raw gyro → dps value

The calcAccel (https://github.com/sparkfun/SparkFun_LS … 3.cpp#L630)

and calcGyro (https://github.com/sparkfun/SparkFun_LS … 3.cpp#L710) functions use some magic numbers and I am trying to understand where they came from!

I’d appreciate any explanation of what exactly the raw values mean and some insight behind those magic numbers.

thanks!

C

The data sheet for the sensor will tell you what the raw values mean, and give the constants used to convert the raw values to real world units (millig and millidps values). See Table 4.1

Data sheet: http://www.st.com/web/en/resource/techn … 133076.pdf