FlightGear next
FGTowerController Class Reference

#include <TowerController.hxx>

Inherits FGATCController.

Public Member Functions

 FGTowerController (FGAirportDynamics *parent)
 
virtual ~FGTowerController ()
 
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)
 
void signOff (int id)
 Sign off the aircraft with the id from this controller.
 
bool hasInstruction (int id)
 
FGATCInstruction getInstruction (int id)
 
virtual void updateAircraftInformation (int id, SGGeod geod, double heading, double speed, double alt, double dt)
 
virtual void render (bool)
 
virtual std::string getName () const
 
virtual void update (double dt)
 
- Public Member Functions inherited from FGATCController
 FGATCController ()
 
virtual ~FGATCController ()
 
void init ()
 
void setAirportGroundRadar (SGSharedPtr< AirportGroundRadar > groundRadar)
 
bool checkTransmissionState (int minState, int MaxState, TrafficVectorIterator i, time_t now, AtcMsgId msgId, AtcMsgDir msgDir)
 
SGSharedPtr< FGTrafficRecordgetRecord (int id) const
 
virtual void handover (SGSharedPtr< FGTrafficRecord > aiObject, int leg)
 We share the traffic record much like real life.
 
bool hasInstruction (int id)
 
FGATCInstruction getInstruction (int id)
 
bool hasActiveTraffic ()
 
TrafficVectorgetActiveTraffic ()
 
double getDt ()
 
void setDt (double dt)
 
void transmit (FGTrafficRecord *rec, FGAirportDynamics *parent, AtcMsgId msgId, AtcMsgDir msgDir, bool audible)
 
std::string getGateName (FGAIAircraft *aircraft)
 

Additional Inherited Members

- Public Types inherited from FGATCController
enum  AtcMsgId {
  MSG_ANNOUNCE_ENGINE_START , MSG_REQUEST_ENGINE_START , MSG_PERMIT_ENGINE_START , MSG_DENY_ENGINE_START ,
  MSG_ACKNOWLEDGE_ENGINE_START , MSG_REQUEST_PUSHBACK_CLEARANCE , MSG_PERMIT_PUSHBACK_CLEARANCE , MSG_HOLD_PUSHBACK_CLEARANCE ,
  MSG_ACKNOWLEDGE_SWITCH_GROUND_FREQUENCY , MSG_INITIATE_CONTACT , MSG_ACKNOWLEDGE_INITIATE_CONTACT , MSG_REQUEST_TAXI_CLEARANCE ,
  MSG_ISSUE_TAXI_CLEARANCE , MSG_ACKNOWLEDGE_TAXI_CLEARANCE , MSG_HOLD_POSITION , MSG_ACKNOWLEDGE_HOLD_POSITION ,
  MSG_RESUME_TAXI , MSG_ACKNOWLEDGE_RESUME_TAXI , MSG_REPORT_RUNWAY_HOLD_SHORT , MSG_ACKNOWLEDGE_REPORT_RUNWAY_HOLD_SHORT ,
  MSG_CLEARED_FOR_TAKEOFF , MSG_ACKNOWLEDGE_CLEARED_FOR_TAKEOFF , MSG_SWITCH_TOWER_FREQUENCY , MSG_ACKNOWLEDGE_SWITCH_TOWER_FREQUENCY ,
  MSG_ARRIVAL , MSG_ACKNOWLEDGE_ARRIVAL , MSG_HOLD , MSG_ACKNOWLEDGE_HOLD ,
  MSG_CLEARED_TO_LAND , MSG_ACKNOWLEDGE_CLEARED_TO_LAND , MSG_TAXI_PARK , MSG_ACKNOWLEDGE_TAXI_PARK
}
 
enum  AtcMsgDir { ATC_AIR_TO_GROUND , ATC_GROUND_TO_AIR }
 
- Protected Member Functions inherited from FGATCController
std::string formatATCFrequency3_2 (int)
 
std::string genTransponderCode (const std::string &fltRules)
 
bool isUserAircraft (FGAIAircraft *)
 
void clearTrafficControllers ()
 
TrafficVectorIterator searchActiveTraffic (int id) const
 Search activeTraffic vector to find matching id.
 
void eraseDeadTraffic ()
 
- Protected Attributes inherited from FGATCController
bool _isDestroying = false
 
bool initialized
 
bool available
 
time_t lastTransmission
 
TrafficVector activeTraffic
 
std::default_random_engine generator
 
double dt_count
 
osg::Group * group
 
FGAirportDynamicsparent = nullptr
 
SGSharedPtr< AirportGroundRadarairportGroundRadar
 

Detailed Description

Definition at line 42 of file TowerController.hxx.

Constructor & Destructor Documentation

◆ FGTowerController()

FGTowerController::FGTowerController ( FGAirportDynamics * parent)

Definition at line 67 of file TowerController.cxx.

◆ ~FGTowerController()

FGTowerController::~FGTowerController ( )
virtual

Definition at line 73 of file TowerController.cxx.

Member Function Documentation

◆ announcePosition()

void FGTowerController::announcePosition ( int id,
FGAIFlightPlan * intendedRoute,
int currentRoute,
double lat,
double lon,
double hdg,
double spd,
double alt,
double radius,
int leg,
FGAIAircraft * aircraft )
virtual

Implements FGATCController.

Definition at line 78 of file TowerController.cxx.

◆ getInstruction()

FGATCInstruction FGTowerController::getInstruction ( int id)

Definition at line 327 of file TowerController.cxx.

◆ getName()

string FGTowerController::getName ( ) const
virtual

Implements FGATCController.

Definition at line 346 of file TowerController.cxx.

◆ hasInstruction()

bool FGTowerController::hasInstruction ( int id)

Definition at line 312 of file TowerController.cxx.

◆ render()

void FGTowerController::render ( bool visible)
virtual

Implements FGATCController.

Definition at line 341 of file TowerController.cxx.

◆ signOff()

void FGTowerController::signOff ( int id)
virtual

Sign off the aircraft with the id from this controller.

Parameters
idthe id of the aircraft

Reimplemented from FGATCController.

Definition at line 273 of file TowerController.cxx.

◆ update()

void FGTowerController::update ( double dt)
virtual

Implements FGATCController.

Definition at line 351 of file TowerController.cxx.

◆ updateAircraftInformation()

void FGTowerController::updateAircraftInformation ( int id,
SGGeod geod,
double heading,
double speed,
double alt,
double dt )
virtual

Implements FGATCController.

Definition at line 154 of file TowerController.cxx.


The documentation for this class was generated from the following files: