1 /*
2  * CRRCsim - the Charles River Radio Control Club Flight Simulator Project
3  *
4  * Copyright (C) 1993 Bruce Jackson (original author)
5  * Copyright (C) 2000 Jan Edward Kansky
6  * Copyright (C) 2005, 2006, 2008 Jens Wilhelm Wulf
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2
10  * as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  *
22  */
23 
24 /**
25  * \file ls_constants.h
26  *
27  * LaRCSim constants definition header file
28  *
29  * REFERENCES:
30  *
31  * [ 7]    Anon: "Aeronautical Vest Pocket Handbook, 17th edition",
32  *                Pratt & Whitney Aircraft Group, Dec. 1977
33  */
34 
35 #ifndef _LS_CONSTANTS
36 #define _LS_CONSTANTS
37 
38 #ifndef M_PI
39 # define M_PI 3.14159265358979323846
40 #endif
41 
42 /* Define constants (note: many factors will need to change for other
43         systems of measure)     */
44 
45 /* miscellaneous units conversions (ref [7]) */
46 #define DEG_TO_RAD           (M_PI/180.0)
47 #define RAD_TO_DEG           (180.0/M_PI)
48 #define K_TO_R               (1.8)
49 #define R_TO_K               (0.55555556)
50 #define NSM_TO_PSF           (0.02088547)
51 #define PSF_TO_NSM           (47.8801826)
52 #define KCM_TO_SCF           (0.00194106)
53 #define SCF_TO_KCM           (515.183616)
54 #define LBF_TO_N             (4.44822)
55 #define N_TO_LBF             (1.0/LBF_TO_N)
56 #define NM_TO_LBFFT          (1.0/1.355818)
57 #define FT_TO_M              (0.3048)
58 #define M_TO_FT              (1.0/FT_TO_M)
59 #define SLUG_TO_KG           (14.5939041995)
60 #define KG_TO_SLUG           (1.0/SLUG_TO_KG)
61 #define KG_M_M_TO_SLUG_FT_FT (1.0/(SLUG_TO_KG*FT_TO_M*FT_TO_M))
62 
63 
64 #endif /* _LS_CONSTANTS_H */
65 
66 
67 /*------------------------- end of ls_constants.h -------------------------*/
68