FlightGear next
ActiveRunwayQueue Class Reference

#include <trafficcontrol.hxx>

Public Member Functions

 ActiveRunwayQueue (const std::string &apt, const std::string &r, int cc)
 
const std::string & getRunwayName () const
 
int getCleared () const
 Get id of cleared AI Aircraft.
 
double getApproachDistance () const
 
void addToQueue (SGSharedPtr< FGTrafficRecord > ac)
 
void setCleared (int number)
 
void requestTimeSlot (SGSharedPtr< FGTrafficRecord > eta)
 Fetch next slot for the active runway.
 
void updateFirst (SGSharedPtr< FGTrafficRecord > eta, time_t newETA)
 Update the first and move all records backwards.
 
int getrunwayQueueSize ()
 
const SGSharedPtr< FGTrafficRecordgetFirstAircraftInDepartureQueue () const
 
const SGSharedPtr< FGTrafficRecordgetFirstOfStatus (int stat) const
 Fetch the first aircraft in the departure queue with a certain status.
 
const SGSharedPtr< FGTrafficRecordget (int id) const
 Fetch the first aircraft in the departure queue with a certain status.
 
void removeFromQueue (int id)
 
void updateDepartureQueue ()
 
void printRunwayQueue () const
 Output the contents of the departure queue vector nicely formatted.
 

Public Attributes

const time_t SEPARATION = 120
 Separation between aircraft in seconds.
 

Detailed Description

Definition at line 425 of file trafficcontrol.hxx.

Constructor & Destructor Documentation

◆ ActiveRunwayQueue()

ActiveRunwayQueue::ActiveRunwayQueue ( const std::string & apt,
const std::string & r,
int cc )

Definition at line 63 of file trafficcontrol.cxx.

Member Function Documentation

◆ addToQueue()

void ActiveRunwayQueue::addToQueue ( SGSharedPtr< FGTrafficRecord > ac)

Definition at line 282 of file trafficcontrol.cxx.

◆ get()

const SGSharedPtr< FGTrafficRecord > ActiveRunwayQueue::get ( int id) const

Fetch the first aircraft in the departure queue with a certain status.

Definition at line 245 of file trafficcontrol.cxx.

◆ getApproachDistance()

double ActiveRunwayQueue::getApproachDistance ( ) const
inline

Definition at line 452 of file trafficcontrol.hxx.

◆ getCleared()

int ActiveRunwayQueue::getCleared ( ) const
inline

Get id of cleared AI Aircraft.

Definition at line 447 of file trafficcontrol.hxx.

◆ getFirstAircraftInDepartureQueue()

const SGSharedPtr< FGTrafficRecord > ActiveRunwayQueue::getFirstAircraftInDepartureQueue ( ) const

Definition at line 272 of file trafficcontrol.cxx.

◆ getFirstOfStatus()

const SGSharedPtr< FGTrafficRecord > ActiveRunwayQueue::getFirstOfStatus ( int stat) const

Fetch the first aircraft in the departure queue with a certain status.

Definition at line 259 of file trafficcontrol.cxx.

◆ getRunwayName()

const std::string & ActiveRunwayQueue::getRunwayName ( ) const
inline

Definition at line 442 of file trafficcontrol.hxx.

◆ getrunwayQueueSize()

int ActiveRunwayQueue::getrunwayQueueSize ( )
inline

Definition at line 468 of file trafficcontrol.hxx.

◆ printRunwayQueue()

void ActiveRunwayQueue::printRunwayQueue ( ) const

Output the contents of the departure queue vector nicely formatted.

Definition at line 233 of file trafficcontrol.cxx.

◆ removeFromQueue()

void ActiveRunwayQueue::removeFromQueue ( int id)

Definition at line 71 of file trafficcontrol.cxx.

◆ requestTimeSlot()

void ActiveRunwayQueue::requestTimeSlot ( SGSharedPtr< FGTrafficRecord > trafficRecord)

Fetch next slot for the active runway.

Parameters
trafficRecordtraffic record containing the arrival time
Returns
newEta: next slot available; starts at eta paramater and adds SEPARATION as needed

Definition at line 98 of file trafficcontrol.cxx.

◆ setCleared()

void ActiveRunwayQueue::setCleared ( int number)
inline

Definition at line 462 of file trafficcontrol.hxx.

◆ updateDepartureQueue()

void ActiveRunwayQueue::updateDepartureQueue ( )

Definition at line 85 of file trafficcontrol.cxx.

◆ updateFirst()

void ActiveRunwayQueue::updateFirst ( SGSharedPtr< FGTrafficRecord > trafficRecord,
time_t newETA )

Update the first and move all records backwards.

Parameters
trafficRecordtraffic record containing the arrival time
Returns
newEta: next slot available; starts at eta paramater and adds SEPARATION as needed

Definition at line 206 of file trafficcontrol.cxx.

Member Data Documentation

◆ SEPARATION

const time_t ActiveRunwayQueue::SEPARATION = 120

Separation between aircraft in seconds.

Definition at line 429 of file trafficcontrol.hxx.


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