]> git.mxchange.org Git - flightgear.git/blob - src/ATC/ATC.cxx
Major re-work of the comm frequency storage and lookup. Only a small core amount...
[flightgear.git] / src / ATC / ATC.cxx
1 // Implementation of FGATC - ATC subsystem base class.
2 //
3 // Written by David Luff, started February 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 "ATC.hxx"
22
23 FGATC::~FGATC() {
24 }
25
26 void FGATC::Update() {
27 }
28
29 void FGATC::AddPlane(string pid) {
30 }
31
32 int FGATC::RemovePlane() {
33     return 0;
34 }
35
36 void FGATC::SetDisplay() {
37 }
38
39 void FGATC::SetNoDisplay() {
40 }
41
42 atc_type FGATC::GetType() {
43     return INVALID;
44 }
45
46 void FGATC::SetData(ATCData* d) {
47         lon = d->lon;
48         lat = d->lat;
49         elev = d->elev;
50         x = d->x;
51         y = d->y;
52         z = d->z;
53         range = d->range;
54         ident = d->ident;
55         name = d->name;
56         freq = d->freq;
57 }
58
59 ostream& operator << (ostream& os, atc_type atc) {
60     switch(atc) {
61     case(INVALID):
62         return(os << "INVALID");
63     case(ATIS):
64         return(os << "ATIS");
65     case(GROUND):
66         return(os << "GROUND");
67     case(TOWER):
68         return(os << "TOWER");
69     case(APPROACH):
70         return(os << "APPROACH");
71     case(DEPARTURE):
72         return(os << "DEPARTURE");
73     case(ENROUTE):
74         return(os << "ENROUTE");
75     }
76     return(os << "ERROR - Unknown switch in atc_type operator << ");
77 }