X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2Fapproach.cxx;h=6e75de47cd28c0b70beac0c901ccd8f974f5a00f;hb=0603aba9ae0d9deb23bd9c00a5a3768b37f317d8;hp=296e3446b102337ac349cd4c060b43bfe566cf35;hpb=32e9505eedffe7f98de028513de8a809a366bd98;p=flightgear.git diff --git a/src/ATCDCL/approach.cxx b/src/ATCDCL/approach.cxx index 296e3446b..6e75de47c 100644 --- a/src/ATCDCL/approach.cxx +++ b/src/ATCDCL/approach.cxx @@ -30,6 +30,8 @@ #include "ATCDialog.hxx" #include +#include + #include #include #include @@ -559,26 +561,15 @@ double FGApproach::round_alt( const bool hl, double alt ) { void FGApproach::get_active_runway() { //cout << "Entering FGApproach::get_active_runway()\n"; - FGEnvironment stationweather = - ((FGEnvironmentMgr *)globals->get_subsystem("environment")) - ->getEnvironment(lat, lon, elev); - - double hdg = stationweather.get_wind_from_heading_deg(); - - FGRunway runway; - if ( globals->get_runways()->search( ident, int(hdg), &runway) ) { - active_runway = runway._rwy_no; - active_rw_hdg = runway._heading; - active_rw_lon = runway._lon; - active_rw_lat = runway._lat; - active_rw_len = runway._length; - //cout << "Active runway is: " << active_runway << " heading = " - // << active_rw_hdg - // << " lon = " << active_rw_lon - // << " lat = " << active_rw_lat <getActiveRunwayForUsage(); + active_runway = runway->ident(); + active_rw_hdg = runway->headingDeg(); + active_rw_lon = runway->longitude(); + active_rw_lat = runway->latitude(); + active_rw_len = runway->lengthFt(); } // ========================================================================