All Classes Functions Typedefs
MyMFDData.hpp
1 // ==============================================================
2 // ORBITER AUX LIBRARY: Multiple Vessels Support
3 // http://sf.net/projects/enjomitchsorbit
4 // Part of the ORBITER SDK
5 //
6 // Copyright (C) 2008 Mohd "Computerex" Ali - original concept
7 // Copyright (C) 2011 Szymon "Enjo" Ender - object oriented design,
8 // simplifications, fixes
9 // All rights reserved
10 //
11 // Multiple Vessels Support is free software: you can redistribute it
12 // and/or modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation, either version
14 // 3 of the License, or (at your option) any later version.
15 //
16 // Multiple Vessels Support is distributed in the hope that it will
17 // be useful, but WITHOUT ANY WARRANTY; without even the implied
18 // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with Multiple Vessels Support. If not, see
23 // <http://www.gnu.org/licenses/>.
24 // ==============================================================
25 
26 #ifndef MYMFDDATA_HPP_INCLUDED
27 #define MYMFDDATA_HPP_INCLUDED
28 
29 #include "Autopilot/AutopilotType.hpp"
30 #include "../MFDData.hpp"
31 #include "Types.hpp"
32 #include "Globals.hpp"
33 
34 #include <orbitersdk.h>
35 
36 
38 {
39 public:
40  MyMFDData( VESSEL * vessel );
41  ~MyMFDData();
42  void Update();
43  void SwitchAutopilot( AutopilotType type );
44  AutopilotType GetAutopilotType() const;
45  void MECO();
46  void MainEngineOn();
47  void HoverEngineOn();
48  TGTPARAM & GetTargetParams();
49 
50  OBJHANDLE hRef;
51  TGTPARAM m_tgtParam;
52  BODYPHYS m_bodyPhys;
53  char strTarget[BUFLEN];
54  double m_longitude, m_latitude, m_radius;
55  bool m_isTgtSet;
56  bool m_drawHUD;
57 
58 private:
59  BODYPHYS GetPlanetParameters (OBJHANDLE hRef) const;
60  TGTPARAM CheckTgtPosition();
61  void UpdatePositionVelocity();
62  void UpdateTargetParams();
63  void CheckPlanetChange();
64 
65 
66  AutopilotType autopilotType;
67 
68 
69 };
70 
71 #endif // MYMFDDATA_HPP_INCLUDED