- if (pushBackNode < 0) {
- //cerr << "Initializing PushBackRoute " << endl;
- intVec pushBackNodes;
- int nAINodes = dep->getDynamics()->getGroundNetwork()->getNrOfNodes();
- int hits = 0;
- parking->setPushBackPoint(0); // default in case no network was found.
-
- // Collect all the nodes that are classified as having pushBack hold status
- for (int i = 0; i < nAINodes; i++) {
- if (dep->getDynamics()->getGroundNetwork()->findNode(i)->getHoldPointType() == 3) {
- pushBackNodes.push_back(i);
- }
- }
-
- // For each node found in step 1, check if it can be reached
- FGTaxiRoute route;
- for (intVecIterator nodes = pushBackNodes.begin();
- nodes != pushBackNodes.end();
- nodes++) {
- route = dep->getDynamics()->getGroundNetwork()->findShortestRoute(gateId, *nodes, false);
- if (!(route.empty())) {
- //cerr << "Found Pushback route of size " << route.size() << endl;
- hits++;
- parking->setPushBackRoute(new FGTaxiRoute(route));
- parking->setPushBackPoint(*nodes);
- pushBackNode = *nodes;
- }
- }
- if (hits == 0) {
- SG_LOG(SG_GENERAL, SG_INFO, "No pushback route found for gate " << gateId << " at " << dep->getId());
- }
- if (hits > 1) {
- SG_LOG(SG_GENERAL, SG_WARN, hits << " pushback routes found for gate " << gateId << " at " << dep->getId());
- }
- }
- if (pushBackNode > 0) {