From 5d522e478403106cd0bf2ab7bfa6d8c561d6da13 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sun, 27 Nov 2005 17:25:39 +0000 Subject: [PATCH] Vivian MEAZZA: use coords of tuned in carrier, not of the first one --- src/Instrumentation/tacan.cxx | 10 +++------- src/Instrumentation/tacan.hxx | 6 +----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Instrumentation/tacan.cxx b/src/Instrumentation/tacan.cxx index 5df347a2b..061a6bcfc 100755 --- a/src/Instrumentation/tacan.cxx +++ b/src/Instrumentation/tacan.cxx @@ -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); diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index 573f4b111..d6a649beb 100755 --- a/src/Instrumentation/tacan.hxx +++ b/src/Instrumentation/tacan.hxx @@ -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;