/*  
 *  - - - - - - - - - - - -
 *   g a l _ t 2 i p v 0 0
 *  - - - - - - - - - - - -
 *  
 *  This routine is part of the General Astrodynamics Library  
 *  
 *  Description: 
 *  
 *     This routine converts a position & velocity vector 
 *     in the ITRF reference frame to the CIRS reference frame (IAU 2000 Resolutions).  
 *  
 *  Status:
 *  
 *     support routine.  
 *  
 *  Given:
 *  
 *     itrf             d[2][3]     ITRF position & velocity vector ( m, m/s )
 *     tta                 d        TT date part 1 ( see Note 1 )
 *     ttb                 d        TT date part 2 ( see Note 1 )
 *     ut1a                d        UT1 date part 1
 *     ut1b                d        UT1 date part 2
 *     lod                 d        Excess length of day ( seconds ) 
 *     xp                  d        x coordinate of the pole (radians, Note 2) 
 *     yp                  d        y coordinate of the pole (radians, Note 2) 
 *  
 *  Returned:
 *  
 *     cirs             d[2][3]     CIRS position & velocity vector ( m, m/s )
 *  
 *  Notes:
 *
 *  1) The Julian Date is apportioned in any convenient way between  
 *     the arguments tt1 and tt2.  For example, JD=2450123.7 could  
 *     be expressed in any of these ways, among others:  
 *  
 *               tta          ttb  
 *  
 *         2450123.7          0.0   (JD method)  
 *         2451545.0      -1421.3   (J2000 method)  
 *         2400000.5      50123.2   (MJD method)  
 *         2450123.5          0.2   (date & time method)  
 *  
 *  2) xp and yp are the "coordinates of the pole", in seconds, which  
 *     position the Celestial Intermediate Pole in the International  
 *     Terrestrial Reference System (see IERS Conventions 2003).  In a  
 *     geocentric right-handed triad u,v,w, where the w-axis points at  
 *     the north geographic pole, the v-axis points towards the origin  
 *     of longitudes and the u axis completes the system, xp = +u and  
 *     yp = -v.  
 *
 *  Called:
 *
 *     gal_era00                     Earth rotation angle (IAU 2000 model)                  
 *     gal_rx                        Rotate an r-matrix about the x-axis
 *     gal_ry                        Rotate an r-matrix about the y-axis
 *     gal_rz                        Rotate an r-matrix about the z-axis
 *     gal_rxpv                      Multiply a pv-vector by an r-matrix
 *     gal_zp                        Zero a p-vector
 *     gal_pxp                       p-vector outer (=vector=cross) product
 *     gal_sp00                      The TIO locator s', positioning the 
 *                                   Terrestrial Intermediate Origin  
 *                                   on the equator of the Celestial 
 *                                   Intermediate Pole.
 *     gal_ir                        Initialize an r-matrix to the identity matrix
 *     gal_cpv                       Copy a position/velocity vector
 *     gal_ppp                       P-vector addition
 *
 *  References:
 *
 *     SOFA Tools for Earth Attitude
 *     IAU Standards for Fundamental Astronomy Review Board
 *     2007
 *     http://www.iau-sofa.rl.ac.uk
 *
 *     Fundamentals of Astrodynamics and Applications
 *     Vallado, David A. Second Edition 2004
 *     Pages 217-219
 *
 *  This revision:
 *  
 *     2008 May 25   
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.  
 *  
 *-----------------------------------------------------------------------  
 */  
  
#ifndef _GAL_T2IPV00A_H_  
#define _GAL_T2IPV00A_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_t2ipv00  
 ( 
   double itrf[2][3],
   const double tta,
   const double ttb,
   const double ut1a,
   const double ut1b,
   const double lod,
   const double xp,
   const double yp,
   double cirs[2][3]
 ) ;  
  
__END_DECLS  
  
#endif /* !_GAL_T2IPV00A_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  
 */  
