]> git.mxchange.org Git - flightgear.git/commitdiff
Vivian MEAZZA: use coords of tuned in carrier, not of the first one
authormfranz <mfranz>
Sun, 27 Nov 2005 17:25:39 +0000 (17:25 +0000)
committermfranz <mfranz>
Sun, 27 Nov 2005 17:25:39 +0000 (17:25 +0000)
src/Instrumentation/tacan.cxx
src/Instrumentation/tacan.hxx

index 5df347a2be3dd2ad1b8fce401dd1b11447183f2b..061a6bcfcac17de08a62e3b5f54a3b90244238b3 100755 (executable)
@@ -118,11 +118,9 @@ TACAN::init ()
     _time_node = node->getChild("indicated-time-min", 0, true);
     _name_node = node->getChild("name", 0, true);
     _bearing_node = node->getChild("indicated-bearing-true-deg", 0, true);
-    _carrier_lat_node = fgGetNode("/ai/models/carrier/position/latitude-deg", true);
-    _carrier_lon_node = fgGetNode("/ai/models/carrier/position/longitude-deg", true);
-
     SGPropertyNode *cnode = fgGetNode("/ai/models/carrier", num, true );
     _carrier_name_node = cnode->getChild("name", 0, true);
+    
 }
 
 void
@@ -309,8 +307,8 @@ TACAN::search (double frequency_mhz, double longitude_rad,
             unsigned int loc1= str1.find( str2, 0 );
             if ( loc1 != string::npos && str2 != "" ) {
                 SG_LOG( SG_INSTR, SG_DEBUG, " string found" );
-                _carrier_lat = _carrier_lat_node->getDoubleValue();
-                _carrier_lon = _carrier_lon_node->getDoubleValue();
+                _carrier_lat = carrier[i]->getDoubleValue("position/latitude-deg");
+                _carrier_lon = carrier[i]->getDoubleValue("position/longitude-deg");
                 _carrier_elevation_ft = carrier_tacan->get_elev_ft();
                 _carrier_range_nm = carrier_tacan->get_range();
                 _carrier_bias = carrier_tacan->get_multiuse();
@@ -324,8 +322,6 @@ TACAN::search (double frequency_mhz, double longitude_rad,
             }
         }
 
-        //_name_node->setStringValue(_transmitter_name.c_str());
-
         SG_LOG( SG_INSTR, SG_DEBUG, "name " << _carrier_name);
         SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _carrier_lat << "lon " << _carrier_lon);
         SG_LOG( SG_INSTR, SG_DEBUG, "elev " << _carrier_elevation_ft);
index 573f4b111465c8918f8f0fa635e038b8cf12bdae..d6a649beb01545316a8313b01b6e6759b5ed21cf 100755 (executable)
@@ -69,13 +69,9 @@ private:
     SGPropertyNode_ptr _bearing_node;
     SGPropertyNode_ptr _ident_node;
     SGPropertyNode_ptr _name_node;
-    
-    SGPropertyNode_ptr _carrier_lat_node;
-    SGPropertyNode_ptr _carrier_lon_node;
+
     SGPropertyNode_ptr _carrier_name_node;
-    
     SGPropertyNode_ptr _channel_node;
-   
 
     double _last_distance_nm;
     double _last_frequency_mhz;