;+ ; NAME: ; oc_x2t_rotmat ; PURPOSE: (one line) ; Return the matrix for rotating J2000 XYZ to target coords ; DESCRIPTION: ; Return the matrix for rotating J2000 XYZ to target coords ; CATEGORY: ; Occultations ; CALLING SEQUENCE: ; R = oc_x2t_rotmat(targ, et) ; INPUTS: ; targ = target (string or id) ; et = ephemeris time (TDB seconds after J2000) ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; R - rotation matrix for rotating an vector ; XYZ in J2000 coordinates to ; xyz in target's coordinate system ; ; XYZ are the J2000 rectangular coordinates ; X = cos(ra_s) cos(dec_s) ; Y = sin(ra_s) cos(dec_s) ; Z = sin(dec_s) ; ; xyz are defined in terms of the targets pole and central meridian ; unit vector is on the equator at zero longitude ; unit vector is on the equator at 90 deg longitude ; unit vector is toward the North pole, ; ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; ; ; Since r is a rotation matrix, the inverse equals the transpose, ; and we simply call oc_x2t_rotmat ; ; USE: ; The matrix is defined so that ; xyz_targ = R ## XYZ_j2000 ; XYZ_j2000, xyz_targ column vectors ; where xyz_targ and XYZ_j2000 are column vectors (Array[1,3]) and ## is the ; IDL operator for ordinary matrix multiplication (inner product). ; It is usually more convenient to use XYZ_j2000 and xyz_targ as row vectors ; (Array[3]). In this case we have ; xyz_targ = transpose(R) # XYZ_j2000 ; xyz_targ, XYZ_j2000 row vectors ; ; MODIFICATION HISTORY: ; 2007 Sep 12 Leslie A Young SwRI ;- function oc_x2t_rotmat, targ, et return, transpose(oc_t2x_rotmat(targ, et)) end