/*  
 *  - - - - - - - - - -  
 *   g a l _ g m g e t  
 *  - - - - - - - - - -  
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine makes a copy of the selected gravity model.
 *  
 *  Status: 
 *  
 *     support routine.  
 *  
 *  Given:  
 *
 *     gmi              i           Identifier of the required gravity model (Note 1)
 *     maxn             i           Maximum degree to return
 *     maxm             i           Maximum order to return
 *     norm             i           1 = spherical terms are to be normalized
 *                                  0 = spherical terms are to be unnormalized
 *  
 *  Returned:  
 *  
 *     *gal_gmget    gal_gm_t       Pointer to new allocated copy of gravity model
 *  
 *  Notes:  
 *  
 *  1) The header file gal_gm.h defines the following constants for the gravity model
 *     identifiers:
 *
 *     GAL_GMEA_EGM96               Earth Gravity Model 1996     
 *     GAL_GMEA_JGM3                Joint Gravity Model 3      
 *     GAL_GMEA_WGS72               World Geodetic System 1972  
 *     GAL_GMEA_WGS66               World Geodetic System 1966
 *     GAL_GMMO_GLGM1               Goddard Lunar Gravity Model-1    
 *     GAL_GMMO_GLGM2               Goddard Lunar Gravity Model-2       
 *     GAL_GMVE_MGNP180U            Magellan MGNP180U Venus Gravity Model
 *     GAL_GMVE_MGNP120PSAAP        Magellan MGNP120PSAAP Venus Gravity Model
 *     GAL_GMMA_GMM2B               Goddard Mars Model 2B  
 *     GAL_GMMA_MGM1025             Improved Goddard Mars Model 2B      
 * 
 *  2) If the identifier parameter is unknown or if the routine was unable to
 *     allocate memory then NULL is returned.
 *  
 *  Called:  
 *  
 *     gal_gmcpy                    Copy gravity model
 *  
 *  This revision:  
 * 
 *     2008 March 30 
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end. 
 *  
 *-----------------------------------------------------------------------  
 */  

#ifndef _GAL_GMGET_H_  
#define _GAL_GMGET_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  

gal_gm_t *
gal_gmget
  (
    int gmi,
    int maxn,
    int maxm,
    int norm
  ) ;  
 
__END_DECLS  
  
#endif /* !_GAL_GMGET_ */ 

/*
 *  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  
 */  
  
