]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlanCreateCruise.cxx
commradio: improvements for atis speech
[flightgear.git] / src / AIModel / AIFlightPlanCreateCruise.cxx
index 87592197b9ee5c476b29a95d9eb4de2026f1eda0..709378f90013bc8d16d5278b4e21962b99f39f8d 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *
  **************************************************************************/
@@ -25,9 +25,8 @@
 
 #include <fstream>
 #include <iostream>
-#include <simgear/route/waypoint.hxx>
 
-#include <Airports/simple.hxx>
+#include <Airports/airport.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/dynamics.hxx>
 
@@ -39,6 +38,7 @@
 #include "performancedata.hxx"
 
 using std::iostream;
+using std::string;
 
 /*
 void FGAIFlightPlan::evaluateRoutePart(double deplat,
@@ -296,7 +296,7 @@ bool FGAIFlightPlan::createCruise(FGAIAircraft *ac, bool firstFlight, FGAirport
   wpt = createInAir(ac, "Cruise", SGGeod::fromDeg(longitude, latitude), alt, vCruise);
   pushBackWaypoint(wpt); 
   
-  string rwyClass = getRunwayClassFromTrafficType(fltType);
+  const string& rwyClass = getRunwayClassFromTrafficType(fltType);
   double heading = ac->getTrafficRef()->getCourse();
   arr->getDynamics()->getActiveRunway(rwyClass, 2, activeRunway, heading);
   FGRunway* rwy = arr->getRunwayByIdent(activeRunway);