#ifndef XM_CONSTANTS_H_
/*
 **************************************************************************
 *                  +------------------------------------+
 *                  | THIS FILE MUST MATCH constants.inc |
 *                  +------------------------------------+
 *
 * Description: Defines useful run-time constants
 * Author:      JGS 4/2/90
 * Author:      Copy of constants.inc / based on XM44
 * Version:     $Id: constants.h,v 1.1 2009/08/11 00:25:53 ntn Exp $
 **************************************************************************
*/

#include "cdefs.h"

/*

  Do not take off the "+e0" endings on the double precision constants!
  These force the idl processor to make the initializers in FORTRAN double
  which is required for FORTRAN 90.

*/

/*
  Mathematically interesting constants
*/

const real_4 e = 2.718281828f;
const real_4 pi = 3.141592654f;
const real_4 halfpi = 1.570796327f;
const real_4 twopi = 6.283185308f;
const real_8 de = 2.718281828459045e+0;
const real_8 dpi = 3.141592653589793238462643e+0;
const real_8 dhalfpi = 1.570796326794896619231322e+0;
const real_8 dtwopi = 6.283185307179586476925287e+0;


/*
  Standard trigonometric windows
*/

const char standard_windows[] = "NONE,BART,HANN,HAMM,BLACK,BH61,BH67,BH74,BH92,";


/*
  Radial conversion factors
*/

const real_4 rad2deg = 57.295779513f;
const real_4 deg2rad = 1.745329252e-02f;
const real_8 drad2deg = 57.295779513082320876798155e+0;
const real_8 ddeg2rad = 1.7453292519943295769237e-02;


/*
  Distance conversion factors (nm = nautical miles, sm = statute miles)
*/

const real_8 feet2meters = 0.3048e+0;  	/* Exact by international agreement */
const real_8 nm2meters = 1852.0e+0;	/* Exact by international agreement */
const real_8 nm2feet = 6076.11548556e+0;
const real_8 sm2meters = 1609.344e+0;	/* Exact by international agreement */
const real_8 sm2feet = 5280.0e+0;	/* Exact by international agreement */


/*
  Constants associated with System Simulator package

  Source: WGS 84 (Dept. of Defense World Geodetic Survey 1984 - Its
          Definition and Relationships with local Geodetic Systems)
          Defense Mapping Agency, Building 56, U.S. Naval Observatory
          Washington DC 20305-3000
*/

const real_8 earth_eccentricity = 0.0818191908426e+0;
const real_8 earth_equatorial_radius = 6378137.0e+0;	     /* in meters */
const real_8 earth_angular_velocity = 7292115.8553e-11; /* rad per mean solar sec */
/*
  The correction below for the preceding constant is multiplied by # of
  Julian centuries from Epoch J2000
*/
const real_8 angular_velocity_precessing_cor = 4.3e-15;

const real_8 def_earth_angular_velocity = 7292115e-11;	/* +- .15E-11 */
const real_8 iau_earth_angular_velocity = 7292115.1467e-11;

const real_8 earth_flattening_factor = 0.00335281066474e+0; /* 1/298.257223563 */
const real_8 polar_radius_in_meters = 6356752.3142e+0;
const real_8 polar_radius_of_curvature = 6399593.6258e+0;
const real_8 mass_of_earth_w_atmos = 5.9733328e+24;
const real_8 earth_grav_constant_w_atmos = 3986005e+08;	    /* +- .6 */
const real_8 earth_grav_constant_wo_atmos = 3986001.5e+08;    /* +- .6 */

const real_8 speed_of_light = 299792458e+0;	/* +- 1.2 m/sec */

#define XM_CONSTANTS_H_
#endif /* XM_CONSTANTS_H_ */
