]> git.mxchange.org Git - flightgear.git/blob - src/ATC/tower.cxx
Patch from Julian Foad:
[flightgear.git] / src / ATC / tower.cxx
1 // FGTower - a class to provide tower control at towered airports.
2 //
3 // Written by David Luff, started March 2002.
4 //
5 // Copyright (C) 2002  David C. Luff - david.luff@nottingham.ac.uk
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 #include <Main/globals.hxx>
22
23 #include "tower.hxx"
24 #include "ATCdisplay.hxx"
25
26 FGTower::FGTower() {
27 }
28
29 FGTower::~FGTower() {
30 }
31
32 void FGTower::Init() {
33     display = false;
34 }
35
36 void FGTower::Update() {
37     // Each time step, what do we need to do?
38     // We need to go through the list of outstanding requests and acknowedgements
39     // and process at least one of them.
40     // We need to go through the list of planes under our control and check if
41     // any need to be addressed.
42     // We need to check for planes not under our control coming within our 
43     // control area and address if necessary.
44
45     // Hardwired for testing
46     static int play = 0;
47     if(play == 200) {
48         //cout << "Registering message in tower.cxx ****************************\n";
49         //globals->get_ATC_display()->RegisterSingleMessage((string)"Cessna eight-two-zero Cleared for takeoff", 2);
50     }
51     ++play;
52 }