quat_shift_vectors Subroutine

public subroutine quat_shift_vectors(v, q, forward, vshift)

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.

Arguments

Type IntentOptional 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 .true., shift from A to B. If .false., shift from B to A.

real(kind=rp), intent(out), dimension(:,:) :: vshift

(3,n) Shifted vectors.