c#> irco_transmat.dc2 c Subroutine: IRCO_TRANSMAT c c Purpose: defines transformation matrix from Euler angles c c Category WORLD COORDINATES, IRAS c c File: irco.shl c c Author: Do Kester c c Person resp.: Do Kester c c Address: guspace!do or rugfx4!do (uucp) c c Use: call irco_transmat( c zold, I double precision c theta, I double precision c znew, I double precision c mat ) O double precision array(3,3) c c Description: c MAT is a right-handed rotation matrix with its z-axis directing to c the north pole and its x-axis pointing to longitude = 0. c 90 - ZOLD is the longitude of the ascending node in the old system c oldlong = 90 - ZOLD => ZOLD = 90 - oldlong c THETA is the angle between the poles of the old and the new system c 90 + ZNEW is the longitude of the ascending node in the new system c newlong = 90 + ZNEW => ZNEW = newlong - 90 c The rotation matrix follows the description in Lieske etal. 1977 c c Externals: c c Updates: 5 jan 1990 DK, documentation only c#< subroutine irco_transmat( zold, theta, znew, mat ) double precision znew, theta, zold, mat(3,3) double precision cosn, sinn, cost, sint, coso, sino coso = dcos( zold ) sino = dsin( zold ) cost = dcos( theta ) sint = dsin( theta ) cosn = dcos( znew ) sinn = dsin( znew ) c print '(6f15.8)', coso, sino, cost, sint, cosn, sinn mat(1,1) = coso * cost * cosn - sino * sinn mat(2,1) = coso * cost * sinn + sino * cosn mat(3,1) = coso * sint mat(1,2) =-sino * cost * cosn - coso * sinn mat(2,2) =-sino * cost * sinn + coso * cosn mat(3,2) =-sino * sint mat(1,3) = -sint * cosn mat(2,3) = -sint * sinn mat(3,3) = cost return end