]> git.mxchange.org Git - flightgear.git/blob - src/ATC/AIMgr.hxx
Bugfix. The engine thrust is recalculated based on the current N1 value
[flightgear.git] / src / ATC / AIMgr.hxx
1 // AIMgr.hxx - definition of FGAIMgr 
2 // - a global management class for FlightGear generated AI traffic
3 //
4 // Written by David Luff, started March 2002.
5 //
6 // Copyright (C) 2002  David C Luff - david.luff@nottingham.ac.uk
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22 /*****************************************************************
23 *
24 * WARNING - Curt has some ideas about AI traffic so anything in here
25 * may get rewritten or scrapped.  Contact Curt curt@flightgear.org 
26 * before spending any time or effort on this code!!!
27 *
28 ******************************************************************/
29
30 #ifndef _FG_AIMGR_HXX
31 #define _FG_AIMGR_HXX
32
33 #include <Main/fgfs.hxx>
34 #include <Main/fg_props.hxx>
35
36 #include <list>
37
38 #include "AIEntity.hxx"
39
40 SG_USING_STD(list);
41
42 class FGAIMgr : public FGSubsystem
43 {
44
45 private:
46
47     // A list of pointers to all currently active AI stuff
48     typedef list <FGAIEntity*> ai_list_type;
49     typedef ai_list_type::iterator ai_list_iterator;
50     typedef ai_list_type::const_iterator ai_list_const_iterator;
51
52     // Everything put in this list should be created dynamically
53     // on the heap and ***DELETED WHEN REMOVED!!!!!***
54     ai_list_type ai_list;
55     ai_list_iterator ai_list_itr;
56     // Any member function of FGATCMgr is permitted to leave this iterator pointing
57     // at any point in or at the end of the list.
58     // Hence any new access must explicitly first check for atc_list.end() before dereferencing.
59
60     // Position of the Users Aircraft
61     // (This may be needed to calculate the distance from the user when deciding which 3D model to render)
62     double current_lon;
63     double current_lat;
64     double current_elev;
65     // Pointers to current users position
66     SGPropertyNode *current_lon_node;
67     SGPropertyNode *current_lat_node;
68     SGPropertyNode *current_elev_node;
69
70     //FGATIS atis;
71     //FGGround ground;
72     //FGTower tower;
73     //FGApproach approach;
74     //FGDeparture departure;
75
76 public:
77
78     FGAIMgr();
79     ~FGAIMgr();
80
81     void init();
82
83     void bind();
84
85     void unbind();
86
87     void update(int dt);
88
89 private:
90
91     // Remove a class from the ai_list and delete it from memory
92     //void RemoveFromList(const char* id, atc_type tp);
93
94 };
95
96 #endif  // _FG_AIMGR_HXX