/*  
 *  - - - - - - - - - - - 
 *   g a l _ s g p 4 g m  
 *  - - - - - - - - - - - 
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine gets the gravity model parameters required by SGP4
 *  
 *  Status: 
 *  
 *     SGP4 support routine.  
 *  
 *  Given:  
 *
 *     *gm           gal_gm_t       Pointer to gravity model structure
 *  
 *  Returned:  
 *  
 *     *tumin           d           Minutes in one time unit
 *     *mu              d           Earth gravitational parameter
 *     *re              d           Radius of the earth in km
 *     *xke             d           Reciprocal of tumin
 *     *j2              d           Un-normalized second zonal harmonic value 
 *     *j3              d           Un-normalized third  zonal harmonic value 
 *     *j4              d           Un-normalized fourth zonal harmonic value
 *     *j3oj2           d           j3 divided by j2
 *  
 *  Called:  
 * 
 *     gal_gmuzh                    Calculate un-normalized zonal harmonic 
 *     gal_facexp_alloc             Allocate factorial exponent lookup table
 *     gal_facexp_free              Deallocate factorial exponent lookup table
 *
 *  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 May 30
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end. 
 *  
 *-----------------------------------------------------------------------  
 */  

#ifndef _GAL_SGP4GM_H_  
#define _GAL_SGP4GM_H_ 1  

#include "gal_gm.h"
  
#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_sgp4gm
  (
    gal_gm_t *gm,
    double *tumin,
    double *mu,
    double *re,
    double *xke,
    double *j2,
    double *j3,
    double *j4,
    double *j3oj2
  ) ;
  
__END_DECLS  
  
#endif /* !_GAL_SGP4GM_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  
 */  
  
