Main Content

quaternion

Class: simscape.multibody.Rotation
Package: simscape.multibody

Compute unit quaternion of rotation

Description

Q = quaternion(R) computes the unit quaternion of the desired rotation, R and returns a 4-by-1 unit vector,

Q=(SV),

where:

S=cos(θ2),

and

V=[UxUyUz]sin(θ2).

θ is the angle of rotation and [Ux, Uy, Uz] is the unit vector of the rotational axis. Note that for any given rotation, there are two unit quaternions that are negatives of each other, but represent the same rotation. For example, the quaternions [1 0 0 0] and [-1 0 0 0] both represent the identity rotation.

Input Arguments

expand all

Rotation, specified as an object of a subclass of the simscape.multibody.Rotation class.

Output Arguments

expand all

Unit quaternion of the rotation, returned as a quaternion object that represents a four-element unit row vector.

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a

See Also

| (Robotics System Toolbox)