All Classes Functions
globals.h
1 // ==============================================================
2 // ORBITER MODULE: LaunchMFD
3 // Part of the ORBITER SDK
4 //
5 // Copyright (C) 2004 rjcroy - robust time based pitch autopilot (borrowed code)
6 // Copyright (C) 2004 Dave "Daver" Rowbotham - conversion of rjcroy's autopolot to C++ (borrowed code)
7 // Copyright (C) 2004 Erik H. "Sputnik" Anderson - conversion of the autopilot to energy based (borrowed code)
8 // Copyright (C) 2007 "Vanguard" - dressing up azimuth calcualtions into an MFD (author)
9 // Copyright (C) 2007 Pawel "She'da'Lier" Stiasny - yaw error visual representation (contributor)
10 // Copyright (C) 2008 Mohd "Computerex" Ali - borrowed his code (multiple vessels support) (borrowed code)
11 // Copyright (C) 2008 Chris "Kwan" Jeppesen - borrowed his code (peg guidance) (borrowed code)
12 // Copyright (C) 2008 Steve "agentgonzo" Arch - peg integration, offplane correction, compass, hud display (co-developer)
13 // Copyright (C) 2007-2012 Szymon "Enjo" Ender - everything else ;> (author and maintainer)
14 // All rights reserved
15 //
16 // globals.h - global data, structs, #defines
17 // Authors:
18 // Steve "agentgonzo" Arch - very handy drawing macros
19 // Szymon "Enjo" Ender - adapting the macros to new Orbiter interface
20 //
21 // This module calculates the appropriate launch azimuth given
22 // desired orbital inclination and desired orbit altitude. This
23 // MFD takes the planets rotation into account, which provides a
24 // much more accurate azimuth. The calculations are performed
25 // 'on the fly' (technically and methaphorically), meaning that
26 // you get info about necessary course corrections.
27 //
28 // This file is part of LaunchMFD.
29 //
30 // LaunchMFD is free software: you can redistribute it and/or modify
31 // it under the terms of the GNU General Public License as published by
32 // the Free Software Foundation, either version 3 of the License, or
33 // (at your option) any later version.
34 //
35 // LaunchMFD is distributed in the hope that it will be useful,
36 // but WITHOUT ANY WARRANTY; without even the implied warranty of
37 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 // GNU General Public License for more details.
39 //
40 // You should have received a copy of the GNU General Public License
41 // along with LaunchMFD. If not, see <http://www.gnu.org/licenses/>.
42 // ==============================================================
43 
44 
45 #ifndef __GLOBALS_H
46 #define __GLOBALS_H
47 
48 #include <orbitersdk.h>
49 
50 #define SMALL_DOUBLE 0.00000001
51 // localisation
52 //#define LANG_PL
53 //#define LANG_EN
54 // orbiter version
55 //#define ORB2006
56 //#define ORB2009
57 // Above defined in project settings
58 
59 #if !defined ORB2006 && !defined ORB2009
60  #error "Oriter version not defined. Define either ORB2006 or ORB2009"
61 #endif
62 #if !defined LANG_EN && !defined LANG_PL
63  #error "Language version not defined. Define either LANG_EN or LANG_PL in this file"
64 #endif
65 
66 #ifdef ORB2006
67  #define MY_MFD MFD
68  #define MFD_RETURN_TYPE void
69  #define MFD_RETURN_VALUE(boolean)
70 #else
71  #define MY_MFD MFD2
72  #define MFD_RETURN_TYPE bool
73  #define MFD_RETURN_VALUE(boolean) boolean
74 #endif
75 
76 #endif