RX Subroutine

public subroutine RX(phi, r)

Rotate an r-matrix about the x-axis.

Status: vector/matrix support routine.

Notes

  1. Calling this routine with positive PHI incorporates in the supplied r-matrix R an additional rotation, about the x-axis, anticlockwise as seen looking towards the origin from positive x.

  2. The additional rotation can be represented by this matrix:

         (  1        0            0      )
         (                               )
         (  0   + cos(PHI)   + sin(PHI)  )
         (                               )
         (  0   - sin(PHI)   + cos(PHI)  )

History

  • IAU SOFA revision: 2012 April 3

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: phi

angle (radians)

real(kind=wp), intent(out), dimension(3,3):: r

r-matrix, rotated


Called by

proc~~rx~~CalledByGraph proc~rx RX proc~numat NUMAT proc~numat->proc~rx proc~bp00 BP00 proc~bp00->proc~rx proc~fw2m FW2M proc~fw2m->proc~rx proc~pom00 POM00 proc~pom00->proc~rx proc~ecm06 ECM06 proc~ecm06->proc~rx proc~pmat06 PMAT06 proc~ecm06->proc~pmat06 proc~pn00 PN00 proc~pn00->proc~numat proc~pn00->proc~bp00 proc~pnm06a PNM06A proc~pnm06a->proc~fw2m proc~nutm80 NUTM80 proc~nutm80->proc~numat proc~pn06 PN06 proc~pn06->proc~fw2m proc~bp06 BP06 proc~bp06->proc~fw2m proc~bp06->proc~pmat06 proc~pmat06->proc~fw2m proc~pvtob PVTOB proc~pvtob->proc~pom00 proc~c2t00a C2T00A proc~c2t00a->proc~pom00 proc~c2i00a C2I00A proc~c2t00a->proc~c2i00a proc~c2txy C2TXY proc~c2txy->proc~pom00 proc~eceq06 ECEQ06 proc~eceq06->proc~ecm06 proc~pmat00 PMAT00 proc~pmat00->proc~bp00 proc~num06a NUM06A proc~num06a->proc~numat proc~fw2xy FW2XY proc~fw2xy->proc~fw2m proc~c2tpe C2TPE proc~c2tpe->proc~pom00 proc~c2tpe->proc~pn00 proc~c2t06a C2T06A proc~c2t06a->proc~pom00 proc~c2i06a C2I06A proc~c2t06a->proc~c2i06a proc~c2t00b C2T00B proc~c2t00b->proc~pom00 proc~c2i00b C2I00B proc~c2t00b->proc~c2i00b proc~eqec06 EQEC06 proc~eqec06->proc~ecm06 proc~pn00a PN00A proc~pn00a->proc~pn00 proc~s06a S06A proc~s06a->proc~pnm06a proc~apco13 APCO13 proc~apco13->proc~pnm06a proc~apco APCO proc~apco13->proc~apco proc~gst06a GST06A proc~gst06a->proc~pnm06a proc~c2i06a->proc~pnm06a proc~xys06a XYS06A proc~xys06a->proc~pnm06a proc~pnm80 PNM80 proc~pnm80->proc~nutm80 proc~pn06a PN06A proc~pn06a->proc~pn06 proc~apio APIO proc~apio->proc~pvtob proc~pn00b PN00B proc~pn00b->proc~pn00 proc~apci13 APCI13 proc~apci13->proc~pnm06a proc~eo06a EO06A proc~eo06a->proc~pnm06a proc~pb06 PB06 proc~pb06->proc~pmat06 proc~apco->proc~pvtob proc~atco13 ATCO13 proc~atco13->proc~apco13 proc~num00a NUM00A proc~num00a->proc~pn00a proc~atci13 ATCI13 proc~atci13->proc~apci13 proc~atic13 ATIC13 proc~atic13->proc~apci13 proc~pnm00a PNM00A proc~pnm00a->proc~pn00a proc~ee06a EE06A proc~ee06a->proc~gst06a proc~atoc13 ATOC13 proc~atoc13->proc~apco13 proc~apio13 APIO13 proc~apio13->proc~apio proc~pnm00b PNM00B proc~pnm00b->proc~pn00b proc~num00b NUM00B proc~num00b->proc~pn00b proc~atoi13 ATOI13 proc~atoi13->proc~apio13 proc~xys00a XYS00A proc~xys00a->proc~pnm00a proc~atio13 ATIO13 proc~atio13->proc~apio13 proc~s00a S00A proc~s00a->proc~pnm00a proc~c2i00a->proc~pnm00a proc~s00b S00B proc~s00b->proc~pnm00b proc~c2i00b->proc~pnm00b proc~xys00b XYS00B proc~xys00b->proc~pnm00b

Contents

Source Code

RX

Source Code

    subroutine RX ( phi, r )

    implicit none

    real(wp),intent(in) :: phi !! angle (radians)
    real(wp),dimension(3,3),intent(out) :: r !! r-matrix, rotated

    real(wp) :: s, c, a21, a22, a23, a31, a32, a33

    s = sin(phi)
    c = cos(phi)

    a21 =   c*r(2,1) + s*r(3,1)
    a22 =   c*r(2,2) + s*r(3,2)
    a23 =   c*r(2,3) + s*r(3,3)
    a31 = - s*r(2,1) + c*r(3,1)
    a32 = - s*r(2,2) + c*r(3,2)
    a33 = - s*r(2,3) + c*r(3,3)

    r(2,1) = a21
    r(2,2) = a22
    r(2,3) = a23
    r(3,1) = a31
    r(3,2) = a32
    r(3,3) = a33

    end subroutine RX