Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1664 | pj | 1 | #define _ATCSIM_HEADER_ |
2 | |||
3 | #ifndef _INPUT_ |
||
4 | #include "input.h" |
||
5 | #endif |
||
6 | |||
7 | #ifndef _CONST_ |
||
8 | #include "constants.h" |
||
9 | #endif |
||
10 | |||
11 | #ifndef _ATC_HEADER_ |
||
12 | #include "atc.h" |
||
13 | #endif |
||
14 | |||
15 | #include <modules/cabs.h> |
||
16 | |||
17 | /* useful colors... */ |
||
18 | int white; |
||
19 | int black; |
||
20 | int red; |
||
21 | int gray; |
||
22 | int green; |
||
23 | int blue; |
||
24 | |||
25 | extern void scenario_jetcontrol(); |
||
26 | extern void init_jetcontrol(); |
||
27 | |||
28 | extern void read_airports_info(); |
||
29 | extern void read_aeroplanes_info(); |
||
30 | |||
31 | extern void init_planes(); |
||
32 | extern void init_atcs(); |
||
33 | |||
34 | typedef struct |
||
35 | { |
||
36 | int id; |
||
37 | char airportname[25]; //name of the airport |
||
38 | int x; |
||
39 | int y; |
||
40 | int airportsize; |
||
41 | } airport; |
||
42 | |||
43 | typedef struct |
||
44 | { |
||
45 | int id; //id of the plane, which is the id of the task |
||
46 | int model_id; //to map to the model that we are using |
||
47 | int curr_speed; |
||
48 | int curr_altitude; |
||
49 | int src_airport_id; |
||
50 | int dest_airport_id; |
||
51 | int currx; |
||
52 | int curry; |
||
53 | int xtemp; //temp destination when redirected |
||
54 | int ytemp; //temp destination when redirected |
||
55 | int dept_time; |
||
56 | int arr_time; |
||
57 | int zone_id; //to specify which zone the plane is flying in |
||
58 | int is_flying; |
||
59 | } aeroplane; //this struct will be global and contain all information about an aeroplane |
||
60 | |||
61 | |||
62 | typedef struct |
||
63 | { |
||
64 | int model_id; |
||
65 | char model[20]; |
||
66 | int year_of_manu; |
||
67 | int max_passengers; |
||
68 | int weight; |
||
69 | int planesize; |
||
70 | int min_speed; |
||
71 | int max_speed; |
||
72 | int min_altitude; |
||
73 | int max_altitude; |
||
74 | } aeroplane_model_info; |
||
75 | |||
76 | typedef struct |
||
77 | { |
||
78 | int id; |
||
79 | int x; |
||
80 | int y; |
||
81 | } atc; |
||
82 | |||
83 | |||
84 | typedef struct |
||
85 | { |
||
86 | char written; |
||
87 | int xtemp; |
||
88 | int ytemp; |
||
89 | } atcplanecab; |
||
90 | |||
91 | CAB plane_atc_cab_id[NPLANECABS]; |
||
92 | CAB atc_plane_cab_id[NPLANECABS]; |