Returns the rotation matrix for a coordinate transformation from the International Celestial Reference Frame (ICRF) frame to the IAU rotating frame associated with a body. The IAU orientation models use three Euler angles to describe the pole and prime meridian location (ra, dec, and w).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | w |
right ascension of the pole [rad] |
||
real(kind=wp), | intent(in) | :: | dec |
declination of the pole [rad] |
||
real(kind=wp), | intent(in) | :: | ra |
prime meridian location [rad] |
the rotation matrix
pure function iau_rotation_matrix(w,dec,ra) result(rotmat) use vector_module, only: rotation_matrix,x_axis,y_axis,z_axis implicit none real(wp),intent(in) :: w !! right ascension of the pole [rad] real(wp),intent(in) :: dec !! declination of the pole [rad] real(wp),intent(in) :: ra !! prime meridian location [rad] real(wp),dimension(3,3) :: rotmat !! the rotation matrix real(wp),parameter :: pi2 = pi / two real(wp),dimension(3,3) :: tmp !it is a 3-1-3 rotation: tmp = matmul( rotation_matrix(x_axis,pi2-dec), rotation_matrix(z_axis,pi2+ra) ) rotmat = matmul( rotation_matrix(z_axis,w), tmp ) end function iau_rotation_matrix