#include <string>
#include <vector>
-SG_USING_STD(string);
-SG_USING_STD(vector);
-SG_USING_STD(sort);
-SG_USING_STD(random_shuffle);
+using std::string;
+using std::vector;
+using std::sort;
+using std::random_shuffle;
#include "simple.hxx"
#include "dynamics.hxx"
currentlyActive = &ulActive;
}
//
- currRunwayGroup->setActive(_ap->getId(),
+ currRunwayGroup->setActive(_ap,
windSpeed,
windHeading,
maxTail,
string FGAirportDynamics::chooseRunwayFallback()
{
- FGEnvironment
- stationweather = ((FGEnvironmentMgr *) globals->get_subsystem("environment"))
- ->getEnvironment(getLatitude(),
- getLongitude(),
- getElevation());
-
- double windSpeed = stationweather.get_wind_speed_kt();
- double windHeading = stationweather.get_wind_from_heading_deg();
- if (windSpeed == 0) {
- windHeading = 270; // This forces West-facing rwys to be used in no-wind situations
- //which is consistent with Flightgear's initial setup.
- }
-
- return globals->get_runways()->search(_ap->getId(), int(windHeading));
+ FGRunway* rwy = _ap->getActiveRunwayForUsage();
+ return rwy->ident();
}
void FGAirportDynamics::addParking(FGParking& park) {