next up previous index
Next: GEOM299 The rotation Up: GEOM200 Rotation matrices Previous: GEOM200 Rotation matrices

Examples of use

The unit matrix is defined in the following way:

.
x' | x

y' | y

z' | z

θ1 = 90 φ1 = 0

θ2 = 90 φ2 = 90

θ3 = 0 φ3 = 0

.

This is just an example. There is in fact no need to define a unit rotation matrix. Giving the value 0 to the rotation matrix number in the call to GSPOS and GSPOSP is equivalent to a positioning without rotation and it improves tracking performance.

The result of a 90 counterclockwise rotation around z, followed by a 90 counterclockwise rotation around the new x is a cyclic shift of the axes: x →z',  y →x',  z →y' . This is expressed by the following rotation matrix:

.
x' | y

y' | z

z' | x

θ1 = 90 φ1 = 90

θ2 = 0 φ2 = 0

θ3 = 90 φ3 = 0

.

Sometimes the rotation matrix is known or it can be constructed. In this case the arguments to the routine GSROTM can be calculated with the help of the routine GFANG in the following way:

      DIMENSION ROTMAT(3,3), ROWMAT(3), PHI(3), THETA(3)
      LOGICAL ROTATE
      .
      .
      .
      DO 10 I=1,3
         ROWMAT(1) = ROTMAT(I,1)
         ROWMAT(2) = ROTMAT(I,2)
         ROWMAT(3) = ROTMAT(I,3)
         CALL GFANG(ROWMAT,COSTH,SINTH,COSPH,SINPH,ROTATE)
         THETA(I) = ATAN2(SINTH,COSTH)
         PHI(I)   = ATAN2(SINPH,COSPH)
  10  CONTINUE
      .
      . {\sl Transform to degrees}
      .
      CALL GSROTM(IROT,THETA(1),PHI(1),THETA(2),PHI(2),THETA(3),PHI(3))

CALL GPROTM (IROT) Prints the rotation matrix elements and angles.

IROT
( INTEGER) rotation matrix number: if IROT=0 all rotation matrixes will be printed, if IROT<0, matrix number |IROT| will be printed without header information.

GEOM299


next up previous index
Next: GEOM299 The rotation Up: GEOM200 Rotation matrices Previous: GEOM200 Rotation matrices


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995