head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.37; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.53; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.00; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.55; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# constants.h

Go to the documentation of this file.

    00001 // constants.h -- various constant definitions
    00002 //
    00003 // Written by Curtis Olson, started February 2000.
    00004 //
    00005 // Copyright (C) 2000  Curtis L. Olson  - curt@@flightgear.org
    00006 //
    00007 // This library is free software; you can redistribute it and/or
    00008 // modify it under the terms of the GNU Library General Public
    00009 // License as published by the Free Software Foundation; either
    00010 // version 2 of the License, or (at your option) any later version.
    00011 //
    00012 // This library is distributed in the hope that it will be useful,
    00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015 // Library General Public License for more details.
    00016 //
    00017 // You should have received a copy of the GNU Library General Public
    00018 // License along with this library; if not, write to the
    00019 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020 // Boston, MA  02111-1307, USA.
    00021 //
    00022 // $Id: constants.h,v 1.14 2002/03/11 21:47:09 curt Exp $
    00023
    00029 #ifndef _SG_CONSTANTS_H
    00030 #define _SG_CONSTANTS_H
    00031
    00032
    00033 #include <simgear/compiler.h>
    00034
    00035 #ifdef SG_HAVE_STD_INCLUDES
    00036 #  include <cmath>
    00037 #else
    00038 #  ifdef SG_MATH_EXCEPTION_CLASH
    00039 #    define exception C_exception
    00040 #  endif
    00041 #  include <math.h>
    00042 #endif
    00043
    00044 #include <plib/sg.h>
    00045
    00046
    00047 // Make sure PI is defined in its various forms
    00048
    00049 // SG_PI and SGD_PI (float and double) come from plib/sg.h
    00050
    00052 #define SGD_2PI      6.28318530717958647692
    00053
    00055 #ifdef M_PI_2
    00056 #  define  SGD_PI_2  M_PI_2
    00057 #else
    00058 #  define  SGD_PI_2  1.57079632679489661923
    00059 #endif
    00060
    00062 #define SGD_PI_4     0.78539816339744830961
    00063
    00065 #ifdef M_E
    00066 #  define SG_E     M_E
    00067 #else
    00068 #  define SG_E     2.7182818284590452354
    00069 #endif
    00070
    00072 #define SG_ONE_SECOND 4.848136811E-6
    00073
    00074
    00077 #define SG_EARTH_RAD 6378.155
    00078
    00079
    00080 // Earth parameters for WGS 84, taken from LaRCsim/ls_constants.h
    00081
    00083 #define SG_EQUATORIAL_RADIUS_FT  20925650.
    00084
    00086 #define SG_EQUATORIAL_RADIUS_M   6378138.12
    00087
    00089 #define SG_EQ_RAD_SQUARE_FT 437882827922500.
    00090
    00092 #define SG_EQ_RAD_SQUARE_M   40680645877797.1344
    00093
    00094 // Conversions
    00095
    00097 #define SG_ARCSEC_TO_RAD    4.84813681109535993589e-06
    00098
    00100 #define SG_RAD_TO_ARCSEC    206264.806247096355156
    00101
    00103 #define SG_FEET_TO_METER    0.3048
    00104
    00106 #define SG_METER_TO_FEET    3.28083989501312335958
    00107
    00109 #define SG_METER_TO_NM      0.00053995680
    00110
    00112 #define SG_NM_TO_METER      1852.0000
    00113
    00115 #define SG_NM_TO_RAD        0.00029088820866572159
    00116
    00118 #define SG_RAD_TO_NM        3437.7467707849392526
    00119
    00121 #define SG_EPSILON 0.0000001
    00122
    00123
    00126 #define SG_BINOBJ_VERSION 6
    00127
    00129 #define SG_SCENERY_FILE_FORMAT "0.4"
    00130
    00131
    00132 #endif // _SG_CONSTANTS_H

@ 1.3 log @Oops, try again. @ text @d113 1 a113 1