- void getActiveRunway(const string& trafficType, int action, string& runway, double heading);
-
- void addParking(FGParking& park);
- bool getAvailableParking(double *lat, double *lon,
- double *heading, int *gate, double rad, const string& fltype,
- const string& acType, const string& airline);
- void getParking (int id, double *lat, double* lon, double *heading);
- FGParking *getParking(int i);
- void releaseParking(int id);
- string getParkingName(int i);
- int getNrOfParkings() { return parkings.size(); };
- //FGAirport *getAddress() { return this; };
- //const string &getName() const { return _name;};
- // Returns degrees
-
- // Departure / Arrival procedures
- FGSidStar * getSIDs() { return &SIDs; };
- FGAIFlightPlan * getSID(string activeRunway, double heading);
-
-
- // ATC related functions.
- FGStartupController *getStartupController() { return &startupController; };
- FGGroundNetwork *getGroundNetwork() { return &groundNetwork; };
- FGTowerController *getTowerController() { return &towerController; };
- FGApproachController *getApproachController() { return &approachController; };
-
- const string& getAtisInformation() { return atisInformation; };
- int getGroundFrequency(unsigned leg); //{ return freqGround.size() ? freqGround[0] : 0; };
-
- void setRwyUse(const FGRunwayPreference& ref);
+ void getActiveRunway(const string& trafficType, int action, string& runway, double heading);
+
+ void addParking(FGParking& park);
+
+ /**
+ * retrieve an available parking by GateID, or -1 if no suitable
+ * parking location could be found.
+ */
+ int getAvailableParking(double radius, const std::string& fltype,
+ const std::string& acType, const std::string& airline);
+
+ FGParking *getParking(int i);
+ void releaseParking(int id);
+ std::string getParkingName(int i);
+ int getNrOfParkings() {
+ return parkings.size();
+ };
+
+ /**
+ * Find a parking gate index by name. Note names are often not unique
+ * in our data, so will return the first match.
+ */
+ int findParkingByName(const std::string& name) const;
+
+ // ATC related functions.
+ FGStartupController *getStartupController() {
+ return &startupController;
+ };
+ FGGroundNetwork *getGroundNetwork() {
+ return &groundNetwork;
+ };
+ FGTowerController *getTowerController() {
+ return &towerController;
+ };
+ FGApproachController *getApproachController() {
+ return &approachController;
+ };
+
+ int getGroundFrequency(unsigned leg);
+ int getTowerFrequency (unsigned nr);
+
+ /// get current ATIS sequence letter
+ const std::string getAtisSequence();
+
+ /// get the current ATIS sequence number, updating it if necessary
+ int updateAtisSequence(int interval, bool forceUpdate);
+
+ void setRwyUse(const FGRunwayPreference& ref);