00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef _SG_CONSTANTS_H
00029 #define _SG_CONSTANTS_H
00030
00031
00032 #include <simgear/compiler.h>
00033
00034 #include <cmath>
00035
00036
00037 #include <plib/sg.h>
00038
00039
00040
00041
00042
00043
00045 #define SGD_2PI 6.28318530717958647692
00046
00048 #ifdef M_PI_2
00049 # define SGD_PI_2 M_PI_2
00050 #else
00051 # define SGD_PI_2 1.57079632679489661923
00052 #endif
00053
00055 #define SGD_PI_4 0.78539816339744830961
00056
00058 #ifdef M_E
00059 # define SG_E M_E
00060 #else
00061 # define SG_E 2.7182818284590452354
00062 #endif
00063
00065 #define SG_ONE_SECOND 4.848136811E-6
00066
00067
00070 #define SG_EARTH_RAD 6378.155
00071
00072
00073 #define SG_MAX_ELEVATION_M 9000.0
00074
00075
00076
00078 #define SG_EQUATORIAL_RADIUS_FT 20925650.
00079
00081 #define SG_EQUATORIAL_RADIUS_M 6378138.12
00082
00084 #define SG_EQ_RAD_SQUARE_FT 437882827922500.
00085
00087 #define SG_EQ_RAD_SQUARE_M 40680645877797.1344
00088
00089
00090
00092 #define SG_ARCSEC_TO_RAD 4.84813681109535993589e-06
00093
00095 #define SG_RAD_TO_ARCSEC 206264.806247096355156
00096
00098 #define SG_FEET_TO_METER 0.3048
00099
00101 #define SG_METER_TO_FEET 3.28083989501312335958
00102
00104 #define SG_METER_TO_NM 0.0005399568034557235
00105
00107 #define SG_NM_TO_METER 1852.0000
00108
00110 #define SG_METER_TO_SM 0.0006213699494949496
00111
00113 #define SG_SM_TO_METER 1609.3412196
00114
00116 #define SG_NM_TO_RAD 0.00029088820866572159
00117
00119 #define SG_RAD_TO_NM 3437.7467707849392526
00120
00122 #define SG_MPS_TO_KT 1.9438444924406046432
00123
00125 #define SG_KT_TO_MPS 0.5144444444444444444
00126
00128 #define SG_FPS_TO_KT 0.5924838012958962841
00129
00131 #define SG_KT_TO_FPS 1.6878098571011956874
00132
00134 #define SG_MPS_TO_MPH 2.2369362920544020312
00135
00137 #define SG_MPH_TO_MPS 0.44704
00138
00140 #define SG_MPS_TO_KMH 3.6
00141
00143 #define SG_KMH_TO_MPS 0.2777777777777777778
00144
00146 #define SG_PA_TO_INHG 0.0002952998330101010
00147
00149 #define SG_INHG_TO_PA 3386.388640341
00150
00151
00153 #define SG_EPSILON 0.0000001
00154
00157 #define SG_BINOBJ_VERSION 6
00158
00160 #define SG_SCENERY_FILE_FORMAT "0.4"
00161
00162
00163 #endif // _SG_CONSTANTS_H