/*  
 *  - - - - - - - - - - -  
 *   g a l _ c 2 i x y s  
 *  - - - - - - - - - - -  
 *  
 *  This routine is part of the General Astrodynamics Library  
 *  
 *  Description: 
 *  
 *  Form the celestial to intermediate-frame-of-date matrix given the CIP  
 *  x,y and the CIO locator s.  
 *  
 *  This routine is an independent translation of a FORTRAN routine  
 *  that is part of IAU's SOFA software collection.  
 *  
 *  Status:
 *  
 *     support routine.  
 *  
 *  Given:
 *  
 *     x,y                 d        Celestial Intermediate Pole (Note 1)  
 *     s                   d        the CIO locator s (Note 2)  
 *  
 *  Returned:
 *  
 *     rc2i             d[3][3]     celestial-to-intermediate matrix (Note 3)  
 *  
 *  Notes:  
 *  
 *  1) The Celestial Intermediate Pole coordinates are the x,y components  
 *     of the unit vector in the Geocentric Celestial Reference System.  
 *  
 *  2) The CIO locator s (in radians) positions the Celestial  
 *     Intermediate Origin on the equator of the CIP.  
 *  
 *  3) The matrix rc2i is the first stage in the transformation from  
 *     celestial to terrestrial coordinates:  
 *  
 *        [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), era is the Earth  
 *     Rotation Angle and rpom is the polar motion matrix.  
 *  
 *  Called:
 *  
 *     gal_ir             initialize r-matrix to identity  
 *     gal_rz             rotate around Z-axis  
 *     gal_ry             rotate around Y-axis  
 *  
 *  References:  
 *  
 *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),  
 *     IERS Technical Note No. 32, BKG (2004)  
 *  
 *  This revision:
 *  
 *     2006 October 10 ( c version 2008 January 18 )  
 *  
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.  
 *  
 *-----------------------------------------------------------------------  
 */  
  
#ifndef _GAL_C2IXYS_H_  
#define _GAL_C2IXYS_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_c2ixys  
 (  
    double x,  
    double y,  
    double s,  
    double rc2i[3][3]  
 ) ;  
  
__END_DECLS  
  
#endif /* !_GAL_C2IXYS_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  
 */  
