]> git.mxchange.org Git - flightgear.git/blob - src/AIModel/AIScenario.hxx
David Culp:
[flightgear.git] / src / AIModel / AIScenario.hxx
1 // FGAIScenario - class for loading an AI scenario
2 // Written by David Culp, started May 2004
3 // - davidculp2@comcast.net
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 #ifndef _FG_AISCENARIO_HXX
20 #define _FG_AISCENARIO_HXX
21
22 #include <simgear/compiler.h>
23 #include <vector>
24 #include <string>
25 SG_USING_STD(vector);
26 SG_USING_STD(string);
27
28
29 class FGAIScenario {
30
31 public:
32
33   typedef struct {
34    string callsign;
35    string aitype;       // can be aircraft, ship, storm, thermal
36    string aircraft_class;
37    string model_path;
38    string flightplan;
39    double repeat;       // in seconds
40    double latitude;     // used if no flightplan defined
41    double longitude;    // used if no flightplan defined
42    double altitude;     // used if no flightplan defined
43    double speed;        // used if no flightplan defined
44    double heading;      // used if no flightplan defined
45    double roll;         // used if no flightplan defined
46    double azimuth;      // used by ballistic objects
47    double elevation;    // used by ballistic objects
48    double rudder;       // used by ship objects 
49    double strength;     // used by thermal objects
50    double diameter;     // used by thermal objects
51   } entry;
52
53    FGAIScenario(string filename);
54    ~FGAIScenario();
55
56    entry* getNextEntry( void );
57    int nEntries( void );
58
59 private:
60
61     typedef vector <entry*> entry_vector_type;
62     typedef entry_vector_type::iterator entry_vector_iterator;
63
64     entry_vector_type       entries;
65     entry_vector_iterator   entry_iterator;
66
67
68 };    
69
70
71 #endif  // _FG_AISCENARIO_HXX
72