X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Ftrafficcontrol.cxx;h=dc7d8c5f30743e5e150486055a3f8d45299c13d3;hb=960f6881c993a32613e542d1475ad0d1ae97b927;hp=b0adba5412816aae54071083d07e4361272bd393;hpb=fa842a42b6e0b312049fff5c653675ad4ae69753;p=flightgear.git diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index b0adba541..dc7d8c5f3 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -399,6 +399,10 @@ void FGTrafficRecord::setHeadingAdjustment(double heading) bool FGTrafficRecord::pushBackAllowed() { + // With the user ATC / AI integration, checking whether the user's aircraft is near no longer works, because + // this will effectively block the user's aircraft itself from receiving pushback clearance. + // So, what can we do? + /* double course, az2, dist; SGGeod curr(SGGeod::fromDegM(getLongitude(), getLatitude(), getAltitude())); @@ -409,7 +413,13 @@ bool FGTrafficRecord::pushBackAllowed() SGGeodesy::inverse(curr, user, course, az2, dist); //cerr << "Distance to user : " << dist << endl; return (dist > 250); + */ + + // In essence, we should check whether the pusbback route itself, as well as the associcated + // taxiways near the pushback point are free of traffic. + // To do so, we need to + return true; } @@ -1023,6 +1033,8 @@ bool FGStartupController::checkTransmissionState(int st, time_t now, time_t star trans_num->setIntValue(-1); // PopupCallback(n); cerr << "Selected transmission message" << n << endl; + FGATCManager *atc = (FGATCManager*) globals->get_subsystem("atc"); + atc->getATCDialog()->removeEntry(1); } else { cerr << "creading message for " << i->getAircraft()->getCallSign() << endl; transmit(&(*i), msgId, msgDir, false); @@ -1092,6 +1104,7 @@ void FGStartupController::updateAircraftInformation(int id, double lat, double l } checkTransmissionState(5, now, (startTime + 140), i, MSG_INITIATE_CONTACT, ATC_AIR_TO_GROUND); checkTransmissionState(6, now, (startTime + 150), i, MSG_ACKNOWLEDGE_INITIATE_CONTACT, ATC_GROUND_TO_AIR); + checkTransmissionState(7, now, (startTime + 180), i, MSG_REQUEST_PUSHBACK_CLEARANCE, ATC_AIR_TO_GROUND);