/*  
 *  - - - - - - - - - - -
 *   g a l _ d s p a c e  
 *  - - - - - - - - - - -
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine provides deep space contributions to mean elements for
 *     perturbing third body. These effects have been averaged over one
 *     revolution of the sun and moon. For earth resonance effects, the
 *     effects have been averaged over no revolutions of the satellite.
 *     (mean motion)
 *  
 *  Status: 
 *  
 *     SGP4 support routine.  
 *  
 *  Given:  
 *
 *     d2201            d            
 *     d2211            d            
 *     d3210            d            
 *     d3222            d            
 *     d4410            d            
 *     d4422            d            
 *     d5220            d            
 *     d5232            d            
 *     d5421            d            
 *     d5433            d           
 *     dedt             d           
 *     del1             d            
 *     del2             d            
 *     del3             d           
 *     didt             d           
 *     dmdt             d           
 *     dnodt            d           
 *     domdt            d           
 *     irez             i           Flag for resonance           
 *                                  0 = none 
 *                                  1 = one day
 *                                  2 = half day
 *     argpo            d           Argument of Perigee
 *     argpdot          d           Argument of Perigee Dot (rate)
 *     t                d           Time
 *     tc               d           
 *     gsto             d           Greenwich Sidereal Time
 *     xfact            d           
 *     xlamo            d           
 *     no               d           Mean Motion
 *     *atime           d           
 *     *em              d           Eccentricity
 *     ft               d           
 *     *argpm           d           Argument of Perigee
 *     *inclm           d           Inclination
 *     *xli             d           
 *     *mm              d           Mean Anomaly
 *     *xni             d           Mean Motion
 *     *nodem           d           Right Ascension of Ascending Node
 *  
 *  Returned:  
 *  
 *     *atime           d           
 *     *em              d           Eccentricity
 *     *argpm           d           Argument of Perigee
 *     *inclm           d           Inclination
 *     *xli             d           
 *     *mm              d           Mean Anomaly
 *     *xni             d           Mean Motion
 *     *nodem           d           Right Ascension of Ascending Node
 *     *dndt            d           
 *     *nm              d           Mean Motion
 *
 *  Notes:  
 *  
 *  1) This routine is a translation from c++ to c of David Vallado's SGP4UNIT.dspace 
 *     routine ( 2007 November 16 ). 
 *
 *  References:
 *
 *     NORAD Spacetrack Report #3 1980
 *     Hoots, Roehrich 
 *
 *     NORAD Spacetrack Report #6 1986
 *     Hoots 
 *
 *     Hoots, Schumacher and Glover 2004
 *
 *     Revisting Spacetrack Report #3
 *     Vallado, David, Crawford, Paul, Hujsak, Richard, Kelso, T.S.
 *     AIAA 2006-6753
 *
 *  This revision:  
 * 
 *     2008 April 6 
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end. 
 *  
 *-----------------------------------------------------------------------  
 */  

#ifndef _GAL_DSPACE_H_  
#define _GAL_DSPACE_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_dspace
  (
    int    irez,
    double d2201,  
    double d2211,  
    double d3210,   
    double d3222,  
    double d4410,
    double d4422,  
    double d5220,  
    double d5232,   
    double d5421,  
    double d5433,
    double dedt,   
    double del1,   
    double del2,    
    double del3,   
    double didt,
    double dmdt,   
    double dnodt,  
    double domdt,   
    double argpo,  
    double argpdot,
    double t,      
    double tc,     
    double gsto,    
    double xfact,  
    double xlamo,
    double no,
    double *atime, 
    double *em,    
    double *argpm,  
    double *inclm, 
    double *xli,
    double *mm,    
    double *xni,   
    double *nodem,  
    double *dndt,  
    double *nm
  ) ; 
   
__END_DECLS  
  
#endif /* !_GAL_DSPACE_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  
 */  
  
