Skip to content
Commit 38d5cd1e authored by LI Qingwu's avatar LI Qingwu Committed by Jonathan Cameron
Browse files

iio: accel: sca3300: Add inclination channels



Different from SCA3300, SCL3300 can output inclination angles.
Angles are formed from acceleration with following equations:
ANG_X = atan2(accx , sqrt(pow(accy , 2) + pow(accz , 2)))
ANG_Y = atan2(accy , sqrt(pow(accx , 2) + pow(accz , 2)))
ANG_Z = atan2(accz , sqrt(pow(accx , 2) + pow(accy , 2)))

The commit adds the output of the raw value, scale
and scale_available of angles.

New interfaces:
  in_incli_scale
  in_incli_scale_available
  in_incli_x_raw
  in_incli_y_raw
  in_incli_z_raw
Data converted by application of scale to degrees.

Signed-off-by: default avatarLI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Reviewed-by: default avatarTomas Melin <tomas.melin@vaisala.com>
Link: https://lore.kernel.org/r/20220529061853.3044893-6-Qing-wu.Li@leica-geosystems.com.cn


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 24fb2d3c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment