/*  
 *  - - - - - - - - - - -  
 *   g a l _ c 2 t c i o  
 *  - - - - - - - - - - -  
 *  
 *  This routine is part of the General Astrodynamics Library  
 *  
 *  Description: 
 *  
 *  Assemble the celestial to terrestrial matrix from CIO-based  
 *  components (the celestial-to-intermediate matrix, the Earth Rotation  
 *  Angle and the polar motion matrix).  
 *  
 *  This routine is an independent translation of a FORTRAN routine  
 *  that is part of IAU's SOFA software collection.  
 *  
 *  Status:
 *  
 *     support routine.  
 *  
 *  Given:
 *  
 *     rc2i             d[3][3]     celestial-to-intermediate matrix  
 *     era                 d        Earth rotation angle  
 *     rpom             d[3][3]     polar-motion matrix  
 *  
 *  Returned:
 *  
 *     rc2t             d[3][3]     celestial-to-terrestrial matrix  
 *  
 *  Notes:  
 *  
 *  1) This routine constructs the rotation matrix that transforms  
 *     vectors in the celestial system into vectors in the terrestrial  
 *     system.  It does so starting from precomputed components, namely  
 *     the matrix which rotates from celestial coordinates to the  
 *     intermediate frame, the Earth rotation angle and the polar motion  
 *     matrix.  One use of the present routine is when generating a  
 *     series of celestial-to-terrestrial matrices where only the Earth  
 *     Rotation Angle changes, avoiding the considerable overhead of  
 *     recomputing the precession-nutation more often than necessary to  
 *     achieve given accuracy objectives.  
 *  
 *  2) The relationship between the arguments is as follows:  
 *  
 *        [TRS]  =  rpom * R_3(era) * rc2i * [CRS]  
 *  
 *               =  rc2t * [CRS]  
 *  
 *     where [CRS] is a vector in the Geocentric Celestial Reference  
 *     System and [TRS] is a vector in the International Terrestrial  
 *     Reference System (see IERS Conventions 2003).  
 *  
 *  Called:
 *  
 *     gal_cr             copy r-matrix  
 *     gal_rz             rotate around Z-axis  
 *     gal_rxr            product of two r-matrices  
 *  
 *  References:  
 *  
 *     McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),  
 *     IERS Technical Note No. 32, BKG  
 *  
 *  This revision:
 *  
 *     2007 May 9 ( c version 2008 January 18 )  
 *  
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.  
 *  
 *-----------------------------------------------------------------------  
 */  
  
#ifndef _GAL_C2TCIO_H_  
#define _GAL_C2TCIO_H_ 1  

#undef __BEGIN_DECLS  
#undef __END_DECLS  
#ifdef __cplusplus  
#define __BEGIN_DECLS extern "C" {  
#define __END_DECLS }  
#else  
#define __BEGIN_DECLS /* empty */  
#define __END_DECLS /* empty */  
#endif
  
__BEGIN_DECLS  
  
void  
gal_c2tcio  
 (  
    double rc2i[3][3],  
    double era,  
    double rpom[3][3],  
    double rc2t[3][3]  
 ) ;  
  
__END_DECLS  
  
#endif /* !_GAL_C2TCIO_H_ */  

/*  
 *  gal - General Astrodynamics Library  
 *  Copyright (C) 2008 Paul C. L. Willmott  
 *  
 *  This program is free software; you can redistribute it and/or modify  
 *  it under the terms of the GNU General Public License as published by  
 *  the Free Software Foundation; either version 2 of the License, or  
 *  (at your option) any later version.  
 *  
 *  This program is distributed in the hope that it will be useful,  
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of  
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
 *  GNU General Public License for more details.  
 *  
 *  You should have received a copy of the GNU General Public License along  
 *  with this program; if not, write to the Free Software Foundation, Inc.,  
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  
 *  
 *  Contact:  
 *  
 *  Paul Willmott  
 *  vp9mu@amsat.org  
 */  
