aptElev = 0.0;
}
-FGGround::FGGround(string id) {
+FGGround::FGGround(const string& id) {
ATCmgr = globals->get_ATC_mgr();
networkLoadOK = false;
ground_traffic.erase(ground_traffic.begin(), ground_traffic.end());
// eg " taxi holding point G2 runway "
trns += ConvertRwyNumToSpokenString(activeRwy);
if(_display) {
+ fgSetString("/sim/messages/ground", trns.c_str());
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
}
g->planePtr->RegisterTransmission(1); // cleared to taxi
sprintf(buf, "%.2f", f);
trns += buf;
if(_display) {
+ fgSetString("/sim/messages/ground", trns.c_str());
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
}
g->planePtr->RegisterTransmission(2); // contact tower
}
-node* FGGround::GetHoldShortNode(string rwyID) {
+node* FGGround::GetHoldShortNode(const string& rwyID) {
return(NULL); // TODO - either implement me or remove me!!!
}
// WARNING - This is hardwired to my prototype logical network format
// and will almost certainly change when Bernie's stuff comes on-line.
// Returns NULL if it can't find a valid node.
-node* FGGround::GetThresholdNode(string rwyID) {
+node* FGGround::GetThresholdNode(const string& rwyID) {
// For now go through all the nodes and parse their names
// Maybe in the future we'll map threshold nodes by ID
//cout << "Size of network is " << network.size() << '\n';
};
// Get a path from a node to a runway threshold
-ground_network_path_type FGGround::GetPath(node* A, string rwyID) {
+ground_network_path_type FGGround::GetPath(node* A, const string& rwyID) {
node* b = GetThresholdNode(rwyID);
if(b == NULL) {
SG_LOG(SG_ATC, SG_ALERT, "ERROR - unable to find path to runway theshold in ground.cxx for airport " << ident << '\n');
// Get a path from a node to a runway hold short point
// Bit of a hack this at the moment!
-ground_network_path_type FGGround::GetPathToHoldShort(node* A, string rwyID) {
+ground_network_path_type FGGround::GetPathToHoldShort(node* A, const string& rwyID) {
ground_network_path_type path = GetPath(A, rwyID);
path.pop_back(); // That should be the threshold stripped of
path.pop_back(); // and that should be the arc from hold short to threshold
// Return a list of exits from a given runway
// It is up to the calling function to check for non-zero size of returned array before use
-node_array_type FGGround::GetExits(string rwyID) {
+node_array_type FGGround::GetExits(const string& rwyID) {
// FIXME - get a 07L or similar in here and we're stuffed!!!
return(runways[atoi(rwyID.c_str())].exits);
}
-void FGGround::RequestDeparture(PlaneRec plane, FGAIEntity* requestee) {
+void FGGround::RequestDeparture(const PlaneRec& plane, FGAIEntity* requestee) {
// For now we'll just automatically clear all planes to the runway hold.
// This communication needs to be delayed 20 sec or so from receiving the request.
// Even if display=false we still need to start the timer in case display=true when communication starts.