]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/groundnetwork.cxx
Merge branch 'next' into durk-atc
[flightgear.git] / src / Airports / groundnetwork.cxx
index 36fdeeb1797a07bf4b204376a16a5b2b698031d4..a97f8075a00e93dd399a46b4b8f5b3a0bf3f8e02 100644 (file)
@@ -710,6 +710,8 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
             }
         }
         //Check traffic at the tower controller
+        // Note, as of 2011-08-01, this should no longer be necessecary.
+        /*
         if (towerController->hasActiveTraffic()) {
             for (TrafficVectorIterator i =
                  towerController->getActiveTraffic().begin();
@@ -731,6 +733,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
             }
         }
         // Finally, check UserPosition
+        // Note, as of 2011-08-01, this should no longer be necessecary.
         double userLatitude = fgGetDouble("/position/latitude-deg");
         double userLongitude = fgGetDouble("/position/longitude-deg");
         SGGeod user(SGGeod::fromDeg(userLongitude, userLatitude));
@@ -745,7 +748,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
             minbearing = bearing;
             otherReasonToSlowDown = true;
         }
-
+        */
         current->clearSpeedAdjustment();
 
         if (current->checkPositionAndIntentions(*closest)
@@ -761,6 +764,8 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
                 if (closest->getId() != current->getId())
                     current->setSpeedAdjustment(closest->getSpeed() *
                                                 (mindist / 100));
+                    if (closest->getAircraft()->isScheduledForTakeoff())
+                        current->getAircraft()->scheduleForATCTowerDepartureControl();
                 else
                     current->setSpeedAdjustment(0);     // This can only happen when the user aircraft is the one closest
                 if (mindist < maxAllowableDistance) {