- arr->getDynamics()->getActiveRunway(rwyClass, 2, activeRunway);
- if (!(globals->get_runways()->search(arr->getId(),
- activeRunway,
- &rwy)))
- {
- SG_LOG(SG_INPUT, SG_ALERT, "Failed to find runway " <<
- activeRunway <<
- " at airport " << arr->getId()<< " of class " << rwyClass << " (5)");
- exit(1);
- }
- heading = rwy._heading;
- azimuth = heading + 180.0;
- while ( azimuth >= 360.0 ) { azimuth -= 360.0; }
-
+ double heading = ac->getTrafficRef()->getCourse();
+ arr->getDynamics()->getActiveRunway(rwyClass, 2, activeRunway, heading);
+ rwy = arr->getRunwayByIdent(activeRunway);
+ // begin descent 110km out
+ SGGeod beginDescentPoint = rwy->pointOnCenterline(-110000);