]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ground.cxx
Return position
[flightgear.git] / src / ATC / ground.cxx
index 9c78282fbc0993882e189a94aeeee787301a484b..c152a622bd86e6d78767302041a9333455798c5a 100644 (file)
@@ -60,7 +60,7 @@ FGGround::FGGround() {
        
        // Init the property nodes - TODO - need to make sure we're getting surface winds.
        wind_from_hdg = fgGetNode("/environment/wind-from-heading-deg", true);
-       wind_speed_knots = fgGetNode("/environment/wind-speed-kts", true);
+       wind_speed_knots = fgGetNode("/environment/wind-speed-kt", true);
        
        // TODO - get the actual airport elevation
        aptElev = 0.0;
@@ -76,7 +76,7 @@ FGGround::FGGround(string id) {
        
        // Init the property nodes - TODO - need to make sure we're getting surface winds.
        wind_from_hdg = fgGetNode("/environment/wind-from-heading-deg", true);
-       wind_speed_knots = fgGetNode("/environment/wind-speed-kts", true);
+       wind_speed_knots = fgGetNode("/environment/wind-speed-kt", true);
        
        // TODO - get the actual airport elevation
        aptElev = 0.0;
@@ -356,10 +356,6 @@ void FGGround::DoRwyDetails() {
        //cout << "GetRwyDetails called" << endl;
        
        // Based on the airport-id and wind get the active runway
-       SGPath path( globals->get_fg_root() );
-       path.append( "Airports" );
-       path.append( "runways.mk4" );
-       FGRunways r_ways( path.c_str() );
        
        //wind
        double hdg = wind_from_hdg->getDoubleValue();
@@ -368,7 +364,7 @@ void FGGround::DoRwyDetails() {
        //cout << "Heading = " << hdg << '\n';
        
        FGRunway runway;
-       bool rwyGood = r_ways.search(ident, int(hdg), &runway);
+       bool rwyGood = globals->get_runways()->search(ident, int(hdg), &runway);
        if(rwyGood) {
                activeRwy = runway.rwy_no;
                rwy.rwyID = runway.rwy_no;
@@ -457,6 +453,7 @@ Gate* FGGround::GetGateNode() {
 
 // WARNING - This is hardwired to my prototype logical network format
 // and will almost certainly change when Bernie's stuff comes on-line.
+// Returns NULL if it can't find a valid node.
 node* FGGround::GetThresholdNode(string rwyID) {
        // For now go through all the nodes and parse their names
        // Maybe in the future we'll map threshold nodes by ID