Re: [PATCH v7 5/6] iio: ABI: Add partial quaternion modifier

From: Jonathan Cameron

Date: Sat Mar 07 2026 - 08:01:17 EST


On Thu, 5 Mar 2026 09:04:40 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Wed, Mar 04, 2026 at 04:35:39PM -0600, David Lechner wrote:
> > On 3/4/26 2:07 AM, Francesco Lavra wrote:
>
> ...
>
> > > + - the quaternion vector is normalized, i.e. x^2 + y^2 + z^2 + w^2 = 1
> >
> > Isn't this usually written with w first?
> >
> > > + - the rotation angle is within the [-180, 180] range, i.e. the w
> >
> > Best to say the angle units. IIO standard unit for angle is radians.
> >
> > > + component (which represents the amount of rotation) is non-negative
>
> Based on these, maybe the name should be
>
> normalised_360_quaternion
>
> (or variations of this)? Actually "partial" quaternion some articles use
> for something different as far as I can say.

The "axis" naming for the define is probably as good as we can do for
something that is mathematically dubious in my view. There are two many
ways it could be interpreted and I'd be surprised if this does get used
in other devices, and they all pick the same way of filling in the
missing constraint.

Mind you I never much like quaternion's (part of my PhD was on Clifford /
Geometric algebra's and exponentials of bivectors are so much cleaner :)

Jonathan

>