1 // FGTower - a class to provide tower control at towered airports.
3 // Written by David Luff, started March 2002.
5 // Copyright (C) 2002 David C. Luff - david.luff@nottingham.ac.uk
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.
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.
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.
21 #include <Main/globals.hxx>
24 #include "ATCdisplay.hxx"
29 TowerPlaneRec::TowerPlaneRec() :
32 clearedToDepart(false),
33 longFinalReported(false),
34 longFinalAcknowledged(false),
36 finalAcknowledged(false)
40 TowerPlaneRec::TowerPlaneRec(string ID) :
42 clearedToDepart(false),
43 longFinalReported(false),
44 longFinalAcknowledged(false),
46 finalAcknowledged(false)
51 TowerPlaneRec::TowerPlaneRec(Point3D pt) :
54 clearedToDepart(false),
55 longFinalReported(false),
56 longFinalAcknowledged(false),
58 finalAcknowledged(false)
63 TowerPlaneRec::TowerPlaneRec(string ID, Point3D pt) :
65 clearedToDepart(false),
66 longFinalReported(false),
67 longFinalAcknowledged(false),
69 finalAcknowledged(false)
84 void FGTower::Init() {
88 void FGTower::Update() {
89 // Each time step, what do we need to do?
90 // We need to go through the list of outstanding requests and acknowedgements
91 // and process at least one of them.
92 // We need to go through the list of planes under our control and check if
93 // any need to be addressed.
94 // We need to check for planes not under our control coming within our
95 // control area and address if necessary.
97 // Hardwired for testing
100 //cout << "Registering message in tower.cxx ****************************\n";
101 //globals->get_ATC_display()->RegisterSingleMessage((string)"Cessna eight-two-zero Cleared for takeoff", 2);
106 void FGTower::RequestLandingClearance(string ID) {
107 cout << "Request Landing Clearance called...\n";
109 void FGTower::RequestDepartureClearance(string ID) {
110 cout << "Request Departure Clearance called...\n";
112 //void FGTower::ReportFinal(string ID);
113 //void FGTower::ReportLongFinal(string ID);
114 //void FGTower::ReportOuterMarker(string ID);
115 //void FGTower::ReportMiddleMarker(string ID);
116 //void FGTower::ReportInnerMarker(string ID);
117 //void FGTower::ReportGoingAround(string ID);
118 void FGTower::ReportRunwayVacated(string ID) {
119 cout << "Report Runway Vacated Called...\n";