quat_shiftmat Subroutine

public subroutine quat_shiftmat(q, forward, shiftmat)

Returns the shifter matrix corresponding to a unit quaternion.

Arguments

Type IntentOptional 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.