1
0
Fork 0

Vivian MEAZZA: use coords of tuned in carrier, not of the first one

This commit is contained in:
mfranz 2005-11-27 17:25:39 +00:00
parent e80e60ab7e
commit 5d522e4784
2 changed files with 4 additions and 12 deletions

View file

@ -118,11 +118,9 @@ TACAN::init ()
_time_node = node->getChild("indicated-time-min", 0, true); _time_node = node->getChild("indicated-time-min", 0, true);
_name_node = node->getChild("name", 0, true); _name_node = node->getChild("name", 0, true);
_bearing_node = node->getChild("indicated-bearing-true-deg", 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 ); SGPropertyNode *cnode = fgGetNode("/ai/models/carrier", num, true );
_carrier_name_node = cnode->getChild("name", 0, true); _carrier_name_node = cnode->getChild("name", 0, true);
} }
void void
@ -309,8 +307,8 @@ TACAN::search (double frequency_mhz, double longitude_rad,
unsigned int loc1= str1.find( str2, 0 ); unsigned int loc1= str1.find( str2, 0 );
if ( loc1 != string::npos && str2 != "" ) { if ( loc1 != string::npos && str2 != "" ) {
SG_LOG( SG_INSTR, SG_DEBUG, " string found" ); SG_LOG( SG_INSTR, SG_DEBUG, " string found" );
_carrier_lat = _carrier_lat_node->getDoubleValue(); _carrier_lat = carrier[i]->getDoubleValue("position/latitude-deg");
_carrier_lon = _carrier_lon_node->getDoubleValue(); _carrier_lon = carrier[i]->getDoubleValue("position/longitude-deg");
_carrier_elevation_ft = carrier_tacan->get_elev_ft(); _carrier_elevation_ft = carrier_tacan->get_elev_ft();
_carrier_range_nm = carrier_tacan->get_range(); _carrier_range_nm = carrier_tacan->get_range();
_carrier_bias = carrier_tacan->get_multiuse(); _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, "name " << _carrier_name);
SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _carrier_lat << "lon " << _carrier_lon); SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _carrier_lat << "lon " << _carrier_lon);
SG_LOG( SG_INSTR, SG_DEBUG, "elev " << _carrier_elevation_ft); SG_LOG( SG_INSTR, SG_DEBUG, "elev " << _carrier_elevation_ft);

View file

@ -70,13 +70,9 @@ private:
SGPropertyNode_ptr _ident_node; SGPropertyNode_ptr _ident_node;
SGPropertyNode_ptr _name_node; SGPropertyNode_ptr _name_node;
SGPropertyNode_ptr _carrier_lat_node;
SGPropertyNode_ptr _carrier_lon_node;
SGPropertyNode_ptr _carrier_name_node; SGPropertyNode_ptr _carrier_name_node;
SGPropertyNode_ptr _channel_node; SGPropertyNode_ptr _channel_node;
double _last_distance_nm; double _last_distance_nm;
double _last_frequency_mhz; double _last_frequency_mhz;
double _time_before_search_sec; double _time_before_search_sec;