Re: [v3 05/13] iio: document pitch, yaw, roll modifiers

From: Jonathan Cameron
Date: Sat Feb 19 2022 - 11:25:39 EST


On Thu, 17 Feb 2022 17:27:02 +0100
Andrea Merello <andrea.merello@xxxxxxxxx> wrote:

> This patch introduces ABI documentation for new modifiers used for
> reporting rotations expressed as euler angles (i.e. yaw, pitch, roll).
>
> Signed-off-by: Andrea Merello <andrea.merello@xxxxxx>
I've lost track of what we already discussed about this, but why have these
as measured in degrees?

Gah. I thought we'd maintained consistency on this, but seems incli is
in degrees, angl is in radians and rot isn't documented at all.

Checking drivers the adis16209 has rot in degrees and I can't immediately figure
out what the hid sensors driver is using. The underlying spec supports the
hardware returning in either radians or degrees I think.

Ah well, at least these are new so given the existing mess means at least some
units are already in degrees we aren't making things worse.

Perhaps it's worth a comment on the unit inconsistency in this patch description
so we can at least look back at the history if it comes up for a future driver.

Thanks,

Jonathan


> ---
> Documentation/ABI/testing/sysfs-bus-iio | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index b2fb4d9abcd1..1b8d77577608 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -2008,3 +2008,12 @@ Description:
> Available range for the forced calibration value, expressed as:
>
> - a range specified as "[min step max]"
> +
> +What: /sys/bus/iio/devices/iio:deviceX/in_rot_yaw_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_rot_pitch_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_rot_roll_raw
> +KernelVersion: 5.17
> +Contact: linux-iio@xxxxxxxxxxxxxxx
> +Description:
> + Raw (unscaled) euler angles readings. Units after
> + application of scale are deg.