/*  
 *  - - - - - - - - - - 
 *   g a l _ d s c o m  
 *  - - - - - - - - - - 
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine provides deep space common items used by both the secular
 *     and periodics routines.  
 *  
 *  Status: 
 *  
 *     SGP4 support routine.  
 *  
 *  Given:  
 *
 *     epoch            d
 *     ep               d           Eccentricity
 *     argpp            d           Argument of Perigee
 *     tc               d
 *     inclp            d           Inclination
 *     nodep            d           Right Ascension of Ascending Node
 *     np               d           Mean Motion
 *  
 *  Returned:  
 *  
 *     *sinim           d           
 *     *cosim           d           
 *     *sinomm          d            
 *     *cosomm          d            
 *     *snodm           d            
 *     *cnodm           d           
 *     *day             d           
 *     *e3              d           
 *     *ee2             d           
 *     *em              d           Eccentricity
 *     *emsq            d           Eccentricity squared
 *     *gam             d           
 *     *peo             d           
 *     *pgho            d           
 *     *pho             d           
 *     *pinco           d           
 *     *plo             d           
 *     *rtemsq          d           
 *     *se2             d           
 *     *se3             d           
 *     *sgh2            d           
 *     *sgh3            d           
 *     *sgh4            d           
 *     *sh2             d           
 *     *sh3             d           
 *     *si2             d            
 *     *si3             d           
 *     *sl2             d           
 *     *sl3             d           
 *     *sl4             d           
 *     *s1              d            
 *     *s2              d           
 *     *s3              d           
 *     *s4              d           
 *     *s5              d           
 *     *s6              d           
 *     *s7              d           
 *     *ss1             d           
 *     *ss2             d           
 *     *ss3             d           
 *     *ss4             d           
 *     *ss5             d           
 *     *ss6             d           
 *     *ss7             d           
 *     *sz1             d           
 *     *sz2             d           
 *     *sz3             d           
 *     *sz11            d           
 *     *sz12            d           
 *     *sz13            d           
 *     *sz21            d           
 *     *sz22            d           
 *     *sz23            d           
 *     *sz31            d           
 *     *sz32            d           
 *     *sz33            d           
 *     *xgh2            d           
 *     *xgh3            d           
 *     *xgh4            d           
 *     *xh2             d           
 *     *xh3             d           
 *     *xi2             d           
 *     *xi3             d           
 *     *xl2             d           
 *     *xl3             d           
 *     *xl4             d           
 *     *nm              d           Mean Motion
 *     *z1              d           
 *     *z2              d           
 *     *z3              d           
 *     *z11             d           
 *     *z12             d           
 *     *z13             d           
 *     *z21             d           
 *     *z22             d           
 *     *z23             d           
 *     *z31             d           
 *     *z32             d           
 *     *z33             d           
 *     *zmol            d           
 *     *zmos            d           
 *  
 *  Notes:  
 *  
 *  1) This routine is a translation from c++ to c of David Vallado's SGP4UNIT.dscom 
 *     routine ( 2007 November 16 ). This routine used to be called dpper, but the 
 *     functions inside weren't well organized.
 *
 *  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_DSCOM_H_  
#define _GAL_DSCOM_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_dscom
  (
    double epoch, 
    double ep,   
    double argpp, 
    double tc,  
    double inclp,
    double nodep, 
    double np,
    double *snodm,
    double *cnodm,
    double *sinim,
    double *cosim,
    double *sinomm,
    double *cosomm,
    double *day,  
    double *e3,   
    double *ee2,
    double *em,
    double *emsq, 
    double *gam, 
    double *peo,
    double *pgho, 
    double *pho,
    double *pinco,
    double *plo,  
    double *rtemsq,
    double *se2,  
    double *se3,
    double *sgh2, 
    double *sgh3,
    double *sgh4, 
    double *sh2, 
    double *sh3,
    double *si2, 
    double *si3, 
    double *sl2, 
    double *sl3, 
    double *sl4,
    double *s1,
    double *s2, 
    double *s3,  
    double *s4, 
    double *s5,
    double *s6,  
    double *s7,  
    double *ss1, 
    double *ss2, 
    double *ss3,
    double *ss4, 
    double *ss5, 
    double *ss6, 
    double *ss7, 
    double *sz1,
    double *sz2, 
    double *sz3,
    double *sz11,
    double *sz12, 
    double *sz13,
    double *sz21, 
    double *sz22,
    double *sz23, 
    double *sz31, 
    double *sz32,
    double *sz33, 
    double *xgh2, 
    double *xgh3,  
    double *xgh4, 
    double *xh2,
    double *xh3, 
    double *xi2, 
    double *xi3, 
    double *xl2, 
    double *xl3,
    double *xl4, 
    double *nm,  
    double *z1,  
    double *z2,  
    double *z3,
    double *z11, 
    double *z12, 
    double *z13,  
    double *z21,  
    double *z22,
    double *z23,  
    double *z31,
    double *z32,  
    double *z33, 
    double *zmol,
    double *zmos
  ) ; 
   
__END_DECLS  
  
#endif /* !_GAL_DSCOM_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  
 */  
  