/*  
 *  - - - - - - - - - - - - - -
 *   g a l _ p l r o t e l 0 0  
 *  - - - - - - - - - - - - - -
 *  
 *  This routine is part of the General Astrodynamics Library  
 *  
 *  Description: 
 *  
 *     This routine returns the rotational elements
 *     of a selected planet (IAU/IAG 2000).  
 *  
 *  Status:
 *  
 *     canonical routine.  
 *  
 *  Given:
 *  
 *     body                i        Planet identifier code ( see Note 2 )
 *     tdb1                d        TDB date part 1 ( see Note 1 )
 *     tdb2                d        TDB date part 2 ( see Note 1 )
 *  
 *  Returned:
 *  
 *     *alpha              d        Right ascension of planet spin axis ( radians ) 
 *     *delta              d        Declination of planet spin axis ( radians ) 
 *     *w                  d        Prime meridian angle ( radians ) 
 *     *omega              d        Rotation Rate ( radians second^-1 )
 *     gal_plrotel00       i        0 = success
 *                                  1 = invlaid planet identifier
 *  
 *  Notes:
 *
 *  1) The Julian Date is apportioned in any convenient way between  
 *     the arguments tdb1 and tdb2.  For example, JD=2450123.7 could  
 *     be expressed in any of these ways, among others:  
 *  
 *              tdb1         tdb2  
 *  
 *         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) The following constants defined in the header file gal_const.h 
 *     are valid for use with this routine:
 *
 *     GAL_SSB_SU = 0,   The Sun               
 *     GAL_SSB_ME = 1,   Mercury               
 *     GAL_SSB_VE = 2,   Venus                 
 *     GAL_SSB_EA = 3,   Earth                 
 *     GAL_SSB_MA = 4,   Mars                  
 *     GAL_SSB_JU = 5,   Jupiter               
 *     GAL_SSB_SA = 6,   Saturn                
 *     GAL_SSB_UR = 7,   Uranus                
 *     GAL_SSB_NE = 8,   Neptune               
 *     GAL_SSB_PL = 10,  Pluto                 
 *
 *  3) Planetary coordinate systems are defined relative to their
 *     mean axis of rotation and various definitions of longitude
 *     depending on the body. The longitude systems of most of those
 *     bodies with observable rigid surfaces have been defined by
 *     references to a surface feature such as a crater. Approximate
 *     expressions for these rotational elements with respect to the
 *     J2000 inertial coordinate system have been derived. The
 *     International Celestial Reference Frame (ICRF) is the reference
 *     coordinate frame of epoch 2000 which is January 1.5 TDB. The 
 *     variable quantities are expressed in units of days or Julian
 *     centuries of 36525 days.
 *
 *     The north pole is that pole of rotation that lies on the north
 *     side of the invariable plane of the solar system. The direction
 *     of the north pole is specified by the value of its right
 *     ascension ra and declination dec, whereas the location of the prime
 *     meridian is specified by the angle that is measured along the 
 *     planet's equator in an easterly direction with respect to the
 *     planet's north pole from the node Q (located at right ascension
 *     90 degrees + ra) of the planet's equator on the standard equator to
 *     the point B where the prime meridian crosses the planet's equator.
 *     The right ascension of the point Q is 90 degrees + ra and the 
 *     inclination of the planet's equator to the standard equator is 
 *     90 degrees - dec. Because the prime meridian is assumed to rotate
 *     uniformly with the planet, W accordingly varies linearly with
 *     time. In addition, ra, dec, and W may vary with time due to a
 *     precession of the axis of rotation of the planet. If W increases
 *     with time, the planet has direct (or prograde) rotation and if W 
 *     decreases with time, the rotation is said to the retrograde.
 *
 *  References:
 *
 *     Satellite Orbits, Oliver Montenbruck & Eberhard Gill
 *     Springer 2005, Pages 167, 191
 *
 *     Explanatory Supplement to the Astronomical Almanac
 *     P. Kenneth Seidelmann Ed. Page 51
 *
 *     Report of the IAU/IAG Working Group on Cartographic
 *     Coordinates and Rotational Elements of the Planets
 *     and Satellites: 2000, P. K. Seidelmann et al.
 *
 *  This revision:
 *  
 *     2008 December 29  
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.  
 *  
 *-----------------------------------------------------------------------  
 */  
  
#ifndef _GAL_PLROTEL00_H_  
#define _GAL_PLROTEL00_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  
  
int  
gal_plrotel00  
 ( 
   int body,
   double tdb1,
   double tdb2,
   double *alpha,
   double *delta,
   double *w,
   double *omega
 ) ;  
  
__END_DECLS  
  
#endif /* !_GAL_PLROTEL00_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  
 */  
