/*  
 *  - - - - - - - - - - - 
 *   g a l _ k e p 2 p v  
 *  - - - - - - - - - - - 
 *  
 *  This routine is part of the General Astrodynamics Library  
 *
 *  Description:
 *
 *     This routine computes position and velocity from the classical orbital elements.
 *  
 *  Status: 
 *  
 *     Classical Model.  
 *  
 *  Given:  
 *
 *     gm             double        Gravitational parameter
 *     ecc              d           Eccentricity
 *     raan             d           Longitude of the ascending mode (radians) 
 *     argp             d           Argument of Pericentre (radians) 
 *     inc              d           Inclination (radians)
 *     p                d           Semi-Latus Rectum (m)
 *     v                d           True Anomaly (radians)
 *     truelon          d           True Longitude (radians)
 *     u                d           Argument of Latitude (radians)
 *     lonper           d           True Longitude of Periapsis (radians)
 *  
 *  Returned:  
 *  
 *     pv             d[2][3]       Position & Velocity Vectors
 * 
 *
 *  Notes:
 *
 *  1) If a parameter is undefined or unknown then set the value to GAL_UNDEFINED is returned. GAL_UNDEFINED is defined in gal_const.h .
 *
 *  Called:
 *
 *     gal_pxp                      cross product of two p vectors
 *     gal_pm                       modulus of a p vector
 *     gal_pdp                      p vector dot product
 *     gal_anp                      Normalize angle into the range 0 <= a < 2pi
 *
 *  References:
 *
 *     Fundamentals of Astrodynamics and Applications
 *     Vallado, David A. Second Edition 2004
 *     Pages 118-122
 *
 *     Satellite Orbits
 *     Oliver Montenbruck, Eberhard Gill
 *     Springer 2005
 *     Pages 28-32
 *
 *     Methods of Orbit Determination for the Micro Computer
 *     Boulet, Dan
 *     Willmann-Bell 1991
 *     Pages 149-157
 *
 *  This revision:  
 * 
 *     2008 September 20 
 *  
 *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end. 
 *  
 *-----------------------------------------------------------------------  
 */  

#ifndef _GAL_KEP2PV_H_  
#define _GAL_KEP2PV_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_kep2pv
  (
    double gm,
    double ecc, 
    double raan,
    double argp,
    double inc,
    double p,
    double v,
    double truelon,
    double u,
    double lonper,
    double pv[2][3]
  ) ;
 
__END_DECLS  
  
#endif /* !_GAL_KEP2PV_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  
 */  
  
