Euler angle ranges:
Euler angle sequence: XYZ (world). First rotation about X, second rotation about Y, and the third rotation about Z axis of the world(i.e. fixed) frame. This is the same as the sequence used in Blender.
In contrast, the XYZ sequence is understood in the Aerospace community as: XYZ: First rotation about Z-axis, second rotation about Y-axis, and the third rotation about X-axis of the body frame.
Reference: http://www.geometrictools.com/Documentation/EulerAngles.pdf
Returns .true. if a (3,3) matrix is a rotation matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | mat |
(3,3). Matrix to check. |
Returns .true. if quaternion is normalized, i.e. if it is a unit
quaternion
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
A quaternion |
Returns the angle between two unit quaternions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | p |
Unit quaternion. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
Angle in radian.
Returns true if a (3,3) matrix is a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | mat |
Matrix to check. |
Rotates vectors such that a set of mutually orthogonal unit vectors aligns with another set of mutually orthogonal unit vectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to align. |
|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | old |
(3,m). A set of at most three mutually orthogonal unit vectors.
|
|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | new |
(3,m). Another set of mutually orthogonal unit vectors of the same
shape as |
|
| real(kind=rp), | intent(out), | dimension(:,:) | :: | valigned |
(3,n). Aligned vectors, of the same shape as |
Returns a random unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Unit quaternion. |
Returns the identity unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Unit quaternion. |
Conjugates a quaternion in-place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(inout), | dimension(4) | :: | q |
On entry, a quaternion. On return, the conjugated quaternion. |
Inverts a quaternion in-place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(inout), | dimension(4) | :: | q |
On entry, a quaternion. On return, the inverted quaternion. |
Normalizes a quaternion in-place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(inout), | dimension(4) | :: | q |
On entry, a quaternion. On return, the normalized quaternion. |
Calculates the product of two quaternions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | p |
Quaternion. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Quaternion. |
|
| real(kind=rp), | intent(out), | dimension(4) | :: | pq |
Product of |
|
| logical, | intent(in), | optional | :: | normalize |
Whether to normalize the product, defaults to |
Interpolates between two unit quaternions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q1 |
Unit quaternion. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q2 |
Unit quaternion. |
|
| real(kind=rp), | intent(in) | :: | t |
Interpolation factor, 0 <= t <= 1. |
||
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Interpolated unit quaternion. |
Returns the matrix mapping the derivative of a unit quaternion to angular velocity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | qdot |
Derivative of a unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(3,4) | :: | mat |
Angular velocity matrix. |
Calculates the angular velocity from a unit quaternion and its time derivative.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | qdot |
Derivative of |
|
| real(kind=rp), | intent(out), | dimension(3) | :: | angvel |
Angular velocity. |
Returns the matrix mapping angular velocity to time derivative of a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(4,3) | :: | mat |
Quaternion derivative matrix. |
Calculates the time derivative of a unit quaternion from angular velocity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | angvel |
Angular velocity. |
|
| real(kind=rp), | intent(out), | dimension(4) | :: | qdot |
Time derivative of |
Returns the rotation matrix corresponding to a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(3,3) | :: | rotmat |
Rotation matrix. |
Returns the shifter matrix corresponding to a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| logical, | intent(in) | :: | forward |
Whether to shift forward, i.e., along the orientation or shift reverse. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | shiftmat |
Shifter matrix. |
Rotates vectors by a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to rotate. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vrot |
(3,n) Rotated vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a unit quaternion, shifts vectors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to shift. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vshift |
(3,n) Shifted vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a unit quaternion, shifts second-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | a |
A second-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | ashift |
Shifted second-order tensor. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a unit quaternion, shifts third-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3,3) | :: | a |
A third-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3,3) | :: | ashift |
Shifted third-order tensor. |
Converts a unit quaternion to an axis-angle representation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(3) | :: | axis |
Unit vector along the axis of rotation. |
|
| real(kind=rp), | intent(out) | :: | angle |
Angle in radian. |
Converts a unit quaternion to a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| real(kind=rp), | intent(out), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
Converts a unit quaternion to an Euler angle sequence.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(4) | :: | q |
Unit quaternion. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | euler |
Euler angles. |
Modifies axis and angle to ensure a right handed rotation with
angle .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(inout), | dimension(3) | :: | axis |
Axis of rotation. If this is not a unit vector, set |
|
| real(kind=rp), | intent(inout) | :: | angle |
Angle in radian. |
||
| logical, | intent(in), | optional | :: | normalize |
Whether to normalize the axis to a unit vector. |
Generates a random orientation in axis-angle representation. The axis is a random vector drawn from a uniform distribution on the surface of a unit sphere. The current implementation in based on the algorithm from Allen & Tildesley p. 349.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(out), | dimension(3) | :: | axis | ||
| real(kind=rp), | intent(out) | :: | angle |
Returns the rotation matrix corresponding to an axis-angle representation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | rotmat |
Rotation matrix. |
Extracts axis and angle from a rotation matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | rotmat |
Rotation matrix (must be orthonormal). |
|
| real(kind=rp), | intent(out), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(out) | :: | angle |
Angle of rotation in radian. |
Rotates vectors about axis by angle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to rotate. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vrot |
(3,n). Rotated vectors. |
Returns the shifter matrix corresponding to an axis-angle representation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| logical, | intent(in) | :: | forward |
Whether to shift forward, i.e., along the orientation or shift reverse. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | shiftmat |
Shifter matrix. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by an axis-angle representation, shifts vectors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to shift. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vshift |
(3,n). Shifted vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by an axis-angle representation, shifts second-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | a |
Second-order tensor |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | ashift |
Shifted second-order tensor. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by an axis-angle representation, shifts third-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3,3) | :: | a |
Third-order tensor |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| logical, | intent(in), | optional | :: | forward |
If |
|
| real(kind=rp), | intent(out), | dimension(3,3,3) | :: | ashift |
Shifted third-order tensor. |
Converts an axis-angle representation to a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Unit quaternion. |
Converts an axis-angle representation to a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle of rotation in radian. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
Coverts an axis-angle representation to Euler angles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(in) | :: | angle |
Angle in radian. |
||
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | euler |
Euler angles. |
Returns the direction cosine matrix of axes(i.e. frame) B with respect to axes(i.e. frame) A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | A |
The columns of A represent the orthonormal basis vectors of frame A. |
|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | B |
The columns of B represent the orthonormal basis vectors of frame B. |
|
| real(kind=rp), | intent(out), | dimension(3,3) | :: | dcm |
Direction cosine matrix of frame B with respect to frame A |
Returns the rotation matrix corresponding to a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| real(kind=rp), | intent(out), | dimension(3,3) | :: | rotmat |
Rotation matrix. |
Returns the shifter matrix corresponding to a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| logical, | intent(in) | :: | forward |
Whether to shift forward, i.e., along the orientation or shift reverse. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | shiftmat |
Shifter matrix. |
Rotates vectors by a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to rotate. |
|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vrot |
(3,n). Rotated vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a direction cosine matrix, shifts vectors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to shift. |
|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vshift |
(3,n). Shifted vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a direction cosine matrix, shifts second-order tesnors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | a |
A second-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | ashift |
(3,n). Shifted second-order tensor. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a direction cosine matrix, shifts third-order tesnors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3,3) | :: | a |
A second-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3,3) | :: | ashift |
(3,n). Shifted second-order tensor. |
Converts a direction cosine matrix to a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Unit quaternion. |
Converts a direction cosine matrix to an axis-angle representation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| real(kind=rp), | intent(out), | dimension(3) | :: | axis |
Unit vector along the axis. |
|
| real(kind=rp), | intent(out) | :: | angle |
Angle in radian. |
Converts a direction cosine matrix to Euler angles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | euler |
Euler angles |
Returns the rotation matrix for a set of Euler angles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler | ||
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | rotmat |
Rotation matrix. |
Returns the shifter matrix for a set of Euler angles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| logical, | intent(in) | :: | forward |
Whether to shift forward, i.e., along the orientation or shift reverse. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | shiftmat |
Shifter matrix. |
Rotates vectors with a set of Euler angles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to rotate. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vrot |
(3,n). Rotated vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by three Euler angles, shifts vectors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(:,:) | :: | v |
(3,n). Vectors to rotate. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(:,:) | :: | vshift |
(3,n). Shifted vectors. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by three Euler angles, shifts second-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3) | :: | a |
Second-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | ashift |
Shifted second-order tensor. |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by three Euler angles, shifts third-order tensors from A to B or B to A.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3,3,3) | :: | a |
Third-order tensor. |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| logical, | intent(in) | :: | forward |
If |
||
| real(kind=rp), | intent(out), | dimension(3,3,3) | :: | ashift |
Shifted third-order tensor. |
Convert Euler angles to a unit quaternion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(4) | :: | q |
Unit quaternion. |
Convert Euler angles to an axis-angle representation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | axis |
Unit vector along the axis of rotation. |
|
| real(kind=rp), | intent(out) | :: | angle |
Angle of rotation in radian. |
Convert Euler angles to a direction cosine matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3,3) | :: | dcm |
Direction cosine matrix. |
Convert one set of Euler angles to another.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rp), | intent(in), | dimension(3) | :: | euler |
Euler angles. |
|
| character(len=3), | intent(in) | :: | seq |
|
||
| logical, | intent(in) | :: | world |
Whether the Euler angles are with respect to the world frame or not. |
||
| character(len=3), | intent(out) | :: | to_seq |
|
||
| logical, | intent(out) | :: | to_world |
Whether the converted euler angles are with respect to the world frame or not. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | to_euler |
Converted Euler angles. |