+
+
+ } else if (!runway.empty()) {
+ controller = apt->getDynamics()->getTowerController();
+ int stationFreq = apt->getDynamics()->getTowerFrequency(2);
+ if (stationFreq > 0)
+ {
+ //cerr << "Setting radio frequency to in airfrequency: " << stationFreq << endl;
+ fgSetDouble("/instrumentation/comm[0]/frequencies/selected-mhz", ((double) stationFreq / 100.0));
+ }
+ fp = new FGAIFlightPlan;
+ leg = 3;
+ string fltType = "ga";
+ fp->setRunway(runway);
+ fp->createTakeOff(&ai_ac, false, apt, 0, fltType);
+ ai_ac.setTakeOffStatus(2);
+ } else {
+ // We're on the ground somewhere. Handle this case later.
+ }
+
+ if (fp) {
+ fp->getLastWaypoint()->setName( fp->getLastWaypoint()->getName() + string("legend"));