FlightGear next
GroundController.hxx
Go to the documentation of this file.
1// GroundController.hxx - forked from groundnetwork.cxx
2//
3// Written by Durk Talsma, started June 2005.
4//
5// Copyright (C) 2004 Durk Talsma.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20//
21// $Id$
22
23#ifndef ATC_GROUND_CONTROLLER_HXX
24#define ATC_GROUND_CONTROLLER_HXX
25
26#include <simgear/compiler.h>
27
28#include <string>
29
32
35
36
37/**************************************************************************************
38 * class FGGroundController
39 *************************************************************************************/
41{
42private:
43 bool hasNetwork;
44 bool networkInitialized;
45 int count;
46 int version;
47
49 int getFrequency();
50
51
52 void signOff(int id);
53 void checkSpeedAdjustment(int id, double lat, double lon,
54 double heading, double speed, double alt);
55 void checkHoldPosition(int id, double lat, double lon,
56 double heading, double speed, double alt);
57
58
59 void updateStartupTraffic(TrafficVectorIterator i, int& priority, time_t now);
60 bool updateActiveTraffic(TrafficVectorIterator i, int& priority, time_t now);
61public:
64
65 void setVersion (int v) { version = v;};
66 int getVersion() { return version; };
67
68 bool exists() {
69 return hasNetwork;
70 };
71
72 virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute,
73 double lat, double lon, double hdg, double spd, double alt,
74 double radius, int leg, FGAIAircraft *aircraft);
75 virtual void updateAircraftInformation(int id, SGGeod geod, double heading, double speed, double alt, double dt);
76 virtual void handover(SGSharedPtr<FGTrafficRecord> aiObject, int leg);
77
78 bool checkForCircularWaits(int id);
79 virtual void render(bool);
80 virtual std::string getName() const;
81 virtual void update(double dt);
82
83 void addVersion(int v) {version = v; };
84};
85
86
87#endif
#define i(x)
Class representing a kind of ground radar.
FGGroundController(FGAirportDynamics *par)
virtual std::string getName() const
virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute, double lat, double lon, double hdg, double spd, double alt, double radius, int leg, FGAIAircraft *aircraft)
virtual void handover(SGSharedPtr< FGTrafficRecord > aiObject, int leg)
We share the traffic record much like real life.
virtual void updateAircraftInformation(int id, SGGeod geod, double heading, double speed, double alt, double dt)
The ground network can deal with the following states: 0 = Normal; no action required 1 = "Acknowledg...
virtual void render(bool)
Draw visible taxi routes.
bool checkForCircularWaits(int id)
Check whether situations occur where the current aircraft is waiting for itself due to higher order i...
virtual void update(double dt)
std::list< SGSharedPtr< FGTrafficRecord > >::const_iterator TrafficVectorIterator