Main Content

tilt

Tilt angle

Since R2023b

Description

T = tilt(orientations) returns the tilt angles based on the specified orientations. See Tilt Angle Definition for more details.

example

Examples

collapse all

Define four sets of Euler angles and obtain their corresponding quaternions.

angles = [0 0 0; 0 0 10; 0 0 170; 0 0 190];
quats = quaternion(angles,"eulerd","ZYX","frame");

Obtain the tilt angles and convert their units to degrees.

tiltAngles = rad2deg(tilt(quats))
tiltAngles = 4×1

         0
   10.0000
  170.0000
  170.0000

Input Arguments

collapse all

Orientations, specified as an N-by-1 vector of quaternion objects or as a 3-by-3-by-N array of rotation matrices. N is the total number of orientations.

Output Arguments

collapse all

Tilt angles, in radians, returned as an N-element column vector of scalars in the range [0, pi]. N is the total number of orientations.

More About

collapse all

Tilt Angle Definition

The tilt angle is defined as the angle between the positive-Z direction of the reference frame and the positive-z direction of the body frame. The orientations input defines the rotational coordinate transformation from the reference frame to the body frame.

Tilt angle

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2023b