]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/atis.cxx
Use the 'all but self' capability of the scenery elevaton code instead of
[flightgear.git] / src / ATCDCL / atis.cxx
index 0957d18ac002b1088c4bcee5d6e1895149fc16cd..d3be4ea23bfbe8fb9b42aa937fa2eec05ffe4b3a 100644 (file)
 #include <stdlib.h>    // atoi()
 #include <stdio.h>     // sprintf
 #include <string>
-SG_USING_STD(string);
+using std::string;
 
-#include STL_IOSTREAM
-SG_USING_STD(cout);
+#include <iostream>
+using std::cout;
 
 #include <simgear/misc/sg_path.hxx>
 
@@ -210,8 +210,10 @@ void FGATIS::UpdateTransmission() {
                                            + ConvertNumToSpokenDigits(tempstr2) + " degrees";
        }
        
-       string rwy_no = globals->get_runways()->search(ident, int(hdg));
-       if(rwy_no != "NN") {
+  const FGAirport* apt = fgFindAirportID(ident);
+  assert(apt);
+       string rwy_no = apt->getActiveRunwayForUsage()->ident();
+  if(rwy_no != "NN") {
                transmission += " / Landing_and_departing_runway ";
                transmission += ConvertRwyNumToSpokenString(atoi(rwy_no.c_str()));
                //cout << "in atis.cxx, r.rwy_no = " << rwy_no << " r.id = " << r->id << " r.heading = " << r->heading << endl;