/*  
 *  - - - - - - - - - - -  
 *   g a l _ n u t 0 0 b  
 *  - - - - - - - - - - -  
 *  
 *  This routine is part of the General Astrodynamics Library  
 *  
 *  Description: 
 *  
 *  Nutation, IAU 2000B model.  
 *  
 *  This routine is an independent translation of a FORTRAN routine  
 *  that is part of IAU's SOFA software collection.  
 *  
 *  Status:
 *  
 *     canonical model.  
 *  
 *  Given:
 *  
 *     date1,date2         d        TT as a 2-part Julian Date (Note 1)  
 *  
 *  Returned:
 *  
 *     *dpsi,*deps         d        nutation, luni-solar + planetary (Note 2)  
 *  
 *  Notes:  
 *  
 *  1) The TT date date1+date2 is a Julian Date, apportioned in any  
 *     convenient way between the two arguments.  For example,  
 *     JD(TT)=2450123.7 could be expressed in any of these ways,  
 *     among others:  
 *  
 *            date1         date2  
 *  
 *         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)  
 *  
 *     The JD method is the most natural and convenient to use in  
 *     cases where the loss of several decimal digits of resolution  
 *     is acceptable.  The J2000 method is best matched to the way  
 *     the argument is handled internally and will deliver the  
 *     optimum resolution.  The MJD method and the date & time methods  
 *     are both good compromises between resolution and convenience.  
 *  
 *  2) The nutation components in longitude and obliquity are in radians  
 *     and with respect to the equinox and ecliptic of date.  The  
 *     obliquity at J2000 is assumed to be the Lieske et al. (1977) value  
 *     of 84381.448 arcsec.  (The errors that result from using this  
 *     routine with the IAU 2006 value of 84381.406 arcsec can be  
 *     neglected.)  
 *  
 *     The nutation model consists only of luni-solar terms, but includes  
 *     also a fixed offset which compensates for certain long-period  
 *     planetary terms (Note 7).  
 *  
 *  3) This routine is an implementation of the IAU 2000B abridged  
 *     nutation model formally adopted by the IAU General Assembly in  
 *     2000.  The routine computes the MHB_2000_SHORT luni-solar nutation  
 *     series (Luzum 2001), but without the associated corrections for  
 *     the precession rate adjustments and the offset between the GCRS  
 *     and J2000 mean poles.  
 *  
 *  4) The full IAU 2000A (MHB2000) nutation model contains nearly 1400  
 *     terms.  The IAU 2000B model (McCarthy & Luzum 2003) contains only  
 *     77 terms, plus additional simplifications, yet still delivers  
 *     results of 1 mas accuracy at present epochs.  This combination of  
 *     accuracy and size makes the IAU 2000B abridged nutation model  
 *     suitable for most practical applications.  
 *  
 *     The routine delivers a pole accurate to 1 mas from 1900 to 2100  
 *     (usually better than 1 mas, very occasionally just outside 1 mas).  
 *     The full IAU 2000A model, which is implemented in the routine  
 *     gal_nut00a (q.v.), delivers considerably greater accuracy at  
 *     current epochs;  however, to realize this improved accuracy,  
 *     corrections for the essentially unpredictable free-core-nutation  
 *     (FCN) must also be included.  
 *  
 *  5) The present routine provides classical nutation.  The  
 *     MHB_2000_SHORT algorithm, from which it is adapted, deals also  
 *     with (i) the offsets between the GCRS and mean poles and (ii) the  
 *     adjustments in longitude and obliquity due to the changed  
 *     precession rates.  These additional functions, namely frame bias  
 *     and precession adjustments, are supported by the SOFA routines  
 *     gal_bi00 and gal_pr00.  
 *  
 *  6) The MHB_2000_SHORT algorithm also provides "total" nutations,  
 *     comprising the arithmetic sum of the frame bias, precession  
 *     adjustments, and nutation (luni-solar + planetary).  These total  
 *     nutations can be used in combination with an existing IAU 1976  
 *     precession implementation, such as gal_pmat76, to deliver GCRS-to-  
 *     true predictions of mas accuracy at current epochs.  However, for  
 *     symmetry with the gal_nut00a routine (q.v. for the reasons), the  
 *     SOFA routines do not generate the "total nutations" directly.  
 *     Should they be required, they could of course easily be generated  
 *     by calling gal_bi00, gal_pr00 and the present routine and adding  
 *     the results.  
 *  
 *  7) The IAU 2000B model includes "planetary bias" terms that are fixed  
 *     in size but compensate for long-period nutations.  The amplitudes  
 *     quoted in McCarthy & Luzum (2003), namely Dpsi = -1.5835 mas and  
 *     Depsilon = +1.6339 mas, are optimized for the "total nutations"  
 *     method described in Note 6.  The Luzum (2001) values used in this  
 *     SOFA implementation, namely -0.135 mas and +0.388 mas, are  
 *     optimized for the "rigorous" method, where frame bias, precession  
 *     and nutation are applied separately and in that order.  During the  
 *     interval 1995-2050, the SOFA implementation delivers a maximum  
 *     error of 1.001 mas (not including FCN).  
 *  
 *  References:  
 *  
 *     Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions  
 *     for the precession quantities based upon the IAU /1976/ system of  
 *     astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)  
 *  
 *     Luzum, B., private communication, 2001 (Fortran code  
 *     MHB_2000_SHORT)  
 *  
 *     McCarthy, D.D. & Luzum, B.J., "An abridged model of the  
 *     precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.  
 *     85, 37-49 (2003)  
 *  
 *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,  
 *     Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)  
 *  
 *  This revision:
 *  
 *     2007 June 26 ( c version 2008 January 19 )  
 *  
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.  
 *  
 *-----------------------------------------------------------------------  
 */  
  
#ifndef _GAL_NUT00B_H_  
#define _GAL_NUT00B_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_nut00b  
 (  
    double date1,  
    double date2,  
    double *dpsi,  
    double *deps  
 ) ;  
  
__END_DECLS  
  
#endif /* !_GAL_NUT00B_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  
 */  
