]> git.mxchange.org Git - flightgear.git/blob - src/AIModel/AIManager.hxx
Fix the nmea and garmin output to a) fake a GSA sentence, b) fix a y2k bug
[flightgear.git] / src / AIModel / AIManager.hxx
1 // AIManager.hxx - experimental! - David Culp - based on:
2 // AIMgr.hxx - definition of FGAIMgr 
3 // - a global management class for FlightGear generated AI traffic
4 //
5 // Written by David Luff, started March 2002.
6 //
7 // Copyright (C) 2002  David C Luff - david.luff@nottingham.ac.uk
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of the
12 // License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 // General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 #ifndef _FG_AIMANAGER_HXX
24 #define _FG_AIMANAGER_HXX
25
26 #include <simgear/structure/subsystem_mgr.hxx>
27 #include <Main/fg_props.hxx>
28 #include <list>
29 #include "AIBase.hxx"
30
31 SG_USING_STD(list);
32
33  struct PERF_STRUCT {
34    double accel;
35    double decel;
36    double climb_rate;
37    double descent_rate;
38    double takeoff_speed;
39    double climb_speed;
40    double cruise_speed;
41    double descent_speed;
42    double land_speed;
43   };
44
45
46 class FGAIManager : public SGSubsystem
47 {
48
49 private:
50
51     // A list of pointers to AI objects
52     typedef list <FGAIBase*> ai_list_type;
53     typedef ai_list_type::iterator ai_list_iterator;
54     typedef ai_list_type::const_iterator ai_list_const_iterator;
55
56     // Everything put in this list should be created dynamically
57     // on the heap and ***DELETED WHEN REMOVED!!!!!***
58     ai_list_type ai_list;
59     ai_list_iterator ai_list_itr;
60
61 public:
62
63     enum object_type { otAircraft, otShip, otBallistic, otRocket };
64
65     FGAIManager();
66     ~FGAIManager();
67
68     void init();
69     void bind();
70     void unbind();
71     void update(double dt);
72
73
74 private:
75
76     bool initDone;
77
78 };
79
80 #endif  // _FG_AIMANAGER_HXX