/*  
 *  - - - - - - - - - - - - - -
 *   g a l _ i n i t s g p 4 p  
 *  - - - - - - - - - - - - - - 
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine initializes the spg4 propagator. All the initialization is
 *     consolidated here instead of having multiple loops inside other routines.
 *  
 *  Status: 
 *  
 *     SGP4 support routine.  
 *  
 *  Given:  
 *
 *     satn             d           Satellite NORAD Catalog Number
 *     *gm           gal_gm_t       Pointer to gravity model structure
 *     ecco             d           Eccentricity [0.0:1.0]
 *     epoch            d           Epoch time in days from Jan 0, 1950. 0 hr
 *     inclo            d           Inclination of satellite
 *     *no              d           Mean Motion of satellite
 *  
 *  Returned:  
 *  
 *     *no              d           Mean Motion of satellite
 *     *method          c           Flag for deep space 'd', 'n'
 *     *ainv            d           1.0 / a
 *     *ao              d           Semi Major Axis
 *     *con41           d           
 *     *con42           d           1.0 - 5.0 cos(i)
 *     *cosio           d           Cosine of Inclination
 *     *cosio2          d           cosio squared
 *     *eccsq           d           Eccentricity squared
 *     *omeosq          d           1.0 - ecco * ecco
 *     *posq            d           Semi-parameter squared
 *     *rp              d           Radius of Perigee
 *     *rteosq          d           Square root of (1.0 - ecco*ecco)
 *     *sinio           d           Sine of inclination
 *     *gsto            d           GST at time of observation (rad)
 *   
 *  Notes:  
 *  
 *  1) This routine is a translation from c++ to c of David Vallado's SGP4UNIT.initl 
 *     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_INITSGP4P_H_  
#define _GAL_INITSGP4P_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_initsgp4p
  (
    int satn,      
    gal_gm_t *gm,
    double ecco,   
    double epoch,  
    double inclo,   
    double *no,
    char   *method,
    double *ainv,  
    double *ao,    
    double *con41,  
    double *con42, 
    double *cosio,
    double *cosio2,
    double *eccsq, 
    double *omeosq, 
    double *posq,
    double *rp,    
    double *rteosq,
    double *sinio , 
    double *gsto
  ) ;
  
__END_DECLS  
  
#endif /* !_GAL_INITSGP4P_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  
 */  
  
