X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Ftacan.cxx;h=92bb7df0edff6473607339a0fb1f78db7ad1e7b8;hb=c6045147544badd6daefdcab9d4de1ed6936533b;hp=ecab85bcb3542259acba15855f63c7c173accf70;hpb=864fd40ee9814103a25bee7a3f87b95931a254fc;p=flightgear.git diff --git a/src/Instrumentation/tacan.cxx b/src/Instrumentation/tacan.cxx index ecab85bcb..92bb7df0e 100755 --- a/src/Instrumentation/tacan.cxx +++ b/src/Instrumentation/tacan.cxx @@ -17,7 +17,7 @@ #include "tacan.hxx" -SG_USING_STD(vector); +using std::vector; /** @@ -293,7 +293,7 @@ TACAN::search (double frequency_mhz, double longitude_rad, if ( freq_valid ) { - string str1( mobile_tacan->get_name() ); + string str1( mobile_tacan->name() ); SGPropertyNode * branch = fgGetNode("ai/models", true); vector carrier = branch->getChildren("carrier"); @@ -315,7 +315,7 @@ TACAN::search (double frequency_mhz, double longitude_rad, _mobile_elevation_ft = mobile_tacan->get_elev_ft(); _mobile_range_nm = mobile_tacan->get_range(); _mobile_bias = mobile_tacan->get_multiuse(); - _mobile_name = mobile_tacan->get_name(); + _mobile_name = mobile_tacan->name(); _mobile_ident = mobile_tacan->get_trans_ident(); _mobile_valid = true; SG_LOG( SG_INSTR, SG_DEBUG, " carrier transmitter valid " << _mobile_valid ); @@ -327,10 +327,6 @@ TACAN::search (double frequency_mhz, double longitude_rad, } } - SG_LOG( SG_INSTR, SG_DEBUG, "name " << _mobile_name); - SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _mobile_lat << "lon " << _mobile_lon); - SG_LOG( SG_INSTR, SG_DEBUG, "elev " << _mobile_elevation_ft); - //try any AI tankers second if ( !_mobile_valid) { @@ -357,7 +353,7 @@ TACAN::search (double frequency_mhz, double longitude_rad, _mobile_elevation_ft = tanker[i]->getDoubleValue("position/altitude-ft"); _mobile_range_nm = mobile_tacan->get_range(); _mobile_bias = mobile_tacan->get_multiuse(); - _mobile_name = mobile_tacan->get_name(); + _mobile_name = mobile_tacan->name(); _mobile_ident = mobile_tacan->get_trans_ident(); _mobile_valid = true; SG_LOG( SG_INSTR, SG_DEBUG, " tanker transmitter valid " << _mobile_valid ); @@ -368,11 +364,6 @@ TACAN::search (double frequency_mhz, double longitude_rad, } } } - - SG_LOG( SG_INSTR, SG_DEBUG, "tanker name " << _mobile_name); - SG_LOG( SG_INSTR, SG_DEBUG, "lat " << _mobile_lat << "lon " << _mobile_lon); - SG_LOG( SG_INSTR, SG_DEBUG, "elev " << _mobile_elevation_ft); - SG_LOG( SG_INSTR, SG_DEBUG, "range " << _mobile_range_nm); } //try any mp tankers third, if we haven't found the tanker in the ai aircraft @@ -401,7 +392,7 @@ TACAN::search (double frequency_mhz, double longitude_rad, _mobile_elevation_ft = mp_tanker[i]->getDoubleValue("position/altitude-ft"); _mobile_range_nm = mobile_tacan->get_range(); _mobile_bias = mobile_tacan->get_multiuse(); - _mobile_name = mobile_tacan->get_name(); + _mobile_name = mobile_tacan->name(); _mobile_ident = mobile_tacan->get_trans_ident(); _mobile_valid = true; @@ -424,19 +415,18 @@ TACAN::search (double frequency_mhz, double longitude_rad, } // try the TACAN/VORTAC list next - FGNavRecord *tacan - = globals->get_tacanlist()->findByFreq( frequency_mhz, longitude_rad, - latitude_rad, altitude_m); + FGNavRecord *tacan = globals->get_tacanlist()->findByFreq( frequency_mhz, + SGGeod::fromRadM(longitude_rad, latitude_rad, altitude_m)); _transmitter_valid = (tacan != NULL); if ( _transmitter_valid ) { SG_LOG( SG_INSTR, SG_DEBUG, "transmitter valid " << _transmitter_valid ); - _transmitter_pos = tacan->get_pos(); + _transmitter_pos = tacan->geod(); _transmitter_range_nm = tacan->get_range(); _transmitter_bias = tacan->get_multiuse(); - _transmitter_name = tacan->get_name(); + _transmitter_name = tacan->name(); _name_node->setStringValue(_transmitter_name.c_str()); _transmitter_ident = tacan->get_trans_ident(); _ident_node->setStringValue(_transmitter_ident.c_str());