]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/gps.cxx
Add back power button binding, but move the location to /instrumentation/nav
[flightgear.git] / src / Instrumentation / gps.cxx
index b8dcb6d58d58c0a76c2e3c89125ec6eed7df7864..e1fe6077bdfcda9559f6888f2c098d105167ffc5 100644 (file)
@@ -325,12 +325,12 @@ GPS::update (double delta_time_sec)
             FGAirport a;
             //cout << "Airport found" << endl;
             a = globals->get_airports()->search(longitude_deg, latitude_deg, false);
-            _wp1_ID_node->setStringValue(a.id.c_str());
-            wp1_longitude_deg = a.longitude;
-            wp1_latitude_deg = a.latitude;
-            _wp1_name_node->setStringValue(a.name.c_str());
+            _wp1_ID_node->setStringValue(a._id.c_str());
+            wp1_longitude_deg = a._longitude;
+            wp1_latitude_deg = a._latitude;
+            _wp1_name_node->setStringValue(a._name.c_str());
             _get_nearest_airport_node->setBoolValue(false);
-            _last_wp1_ID = wp1_ID = a.id.c_str();
+            _last_wp1_ID = wp1_ID = a._id.c_str();
         }
         
         // If the waypoint 0 ID has changed, try to find the new ID
@@ -341,11 +341,11 @@ GPS::update (double delta_time_sec)
             if (waypont_type == "airport") {
                 FGAirport a;
                 a = globals->get_airports()->search( wp0_ID );
-                if ( a.id == wp0_ID ) {
+                if ( a._id == wp0_ID ) {
                     //cout << "Airport found" << endl;
-                    wp0_longitude_deg = a.longitude;
-                    wp0_latitude_deg = a.latitude;
-                    _wp0_name_node->setStringValue(a.name.c_str());
+                    wp0_longitude_deg = a._longitude;
+                    wp0_latitude_deg = a._latitude;
+                    _wp0_name_node->setStringValue(a._name.c_str());
                 }
             }
             else if (waypont_type == "nav") {
@@ -380,11 +380,11 @@ GPS::update (double delta_time_sec)
             if (waypont_type == "airport") {
                 FGAirport a;
                 a = globals->get_airports()->search( wp1_ID );
-                if ( a.id == wp1_ID ) {
+                if ( a._id == wp1_ID ) {
                     //cout << "Airport found" << endl;
-                    wp1_longitude_deg = a.longitude;
-                    wp1_latitude_deg = a.latitude;
-                    _wp1_name_node->setStringValue(a.name.c_str());
+                    wp1_longitude_deg = a._longitude;
+                    wp1_latitude_deg = a._latitude;
+                    _wp1_name_node->setStringValue(a._name.c_str());
                 }
             }
             else if (waypont_type == "nav") {