| 1 | // Extracted from trafficcontrol.hxx - classes to manage AIModels based air traffic control |
| 2 | // Written by Durk Talsma, started September 2006. |
| 3 | // |
| 4 | // This program is free software; you can redistribute it and/or |
| 5 | // modify it under the terms of the GNU General Public License as |
| 6 | // published by the Free Software Foundation; either version 2 of the |
| 7 | // License, or (at your option) any later version. |
| 8 | // |
| 9 | // This program is distributed in the hope that it will be useful, but |
| 10 | // WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | // General Public License for more details. |
| 13 | // |
| 14 | // You should have received a copy of the GNU General Public License |
| 15 | // along with this program; if not, write to the Free Software |
| 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | // |
| 18 | // $Id$ |
| 19 | |
| 20 | #ifndef TOWER_CONTROLLER_HXX |
| 21 | #define TOWER_CONTROLLER_HXX |
| 22 | |
| 23 | #include <Airports/airports_fwd.hxx> |
| 24 | |
| 25 | #include <osg/Geode> |
| 26 | #include <osg/Geometry> |
| 27 | #include <osg/MatrixTransform> |
| 28 | #include <osg/Shape> |
| 29 | |
| 30 | #include <simgear/compiler.h> |
| 31 | #include <simgear/constants.h> |
| 32 | #include <simgear/debug/logstream.hxx> |
| 33 | #include <simgear/structure/SGReferenced.hxx> |
| 34 | #include <simgear/structure/SGSharedPtr.hxx> |
| 35 | |
| 36 | #include <ATC/ATCController.hxx> |
| 37 | #include <ATC/trafficcontrol.hxx> |
| 38 | |
| 39 | /****************************************************************************** |
| 40 | * class FGTowerControl |
| 41 | *****************************************************************************/ |
| 42 | class FGTowerController : public FGATCController |
| 43 | { |
| 44 | private: |
| 45 | ActiveRunwayVec activeRunways; |
| 46 | /**Returns the frequency to be used. */ |
| 47 | int getFrequency(); |
| 48 | |
| 49 | public: |
| 50 | FGTowerController(FGAirportDynamics *parent); |
| 51 | virtual ~FGTowerController(); |
| 52 | |
| 53 | virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute, |
| 54 | double lat, double lon, |
| 55 | double hdg, double spd, double alt, double radius, int leg, |
| 56 | FGAIAircraft *aircraft); |
| 57 | void signOff(int id); |
| 58 | bool hasInstruction(int id); |
| 59 | FGATCInstruction getInstruction(int id); |
| 60 | virtual void updateAircraftInformation(int id, SGGeod geod, |
| 61 | double heading, double speed, double alt, double dt); |
| 62 | |
| 63 | virtual void render(bool); |
| 64 | virtual std::string getName(); |
| 65 | virtual void update(double dt); |
| 66 | }; |
| 67 | |
| 68 | #endif |