]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/tacan.cxx
replace depreciated plib symbols with their new forms
[flightgear.git] / src / Instrumentation / tacan.cxx
index 082867d12cba883fe173ae7258b0af1e39c7b61b..93dd2576b7d8338d53cc8df079ac8c7ae331b649 100755 (executable)
@@ -186,7 +186,7 @@ TACAN::update (double delta_time_sec)
                                           
                                 // On timeout, scan again
     _time_before_search_sec -= delta_time_sec;
-    if (_time_before_search_sec < 0 and frequency_mhz > 0)
+    if (_time_before_search_sec < 0 && frequency_mhz > 0)
         search(frequency_mhz, longitude_rad,
                latitude_rad, altitude_m);
 
@@ -215,7 +215,7 @@ TACAN::update (double delta_time_sec)
     
                      
      //select the nearer
-     if ( carrier_distance <= distance and _carrier_valid) { 
+     if ( carrier_distance <= distance && _carrier_valid) { 
          SG_LOG( SG_INSTR, SG_DEBUG, "carrier_distance_nm " << carrier_distance);
          SG_LOG( SG_INSTR, SG_DEBUG, "distance_nm " << distance);
          bearing = carrier_bearing;
@@ -298,7 +298,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
         string str2 ( _carrier_name_node->getStringValue());
         SG_LOG( SG_INSTR, SG_DEBUG, "strings 1 " << str1 << " 2 " << str2 );
         unsigned int loc1= str1.find( str2, 0 );
-          if( loc1 != string::npos and str2 != "" ){
+          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();
@@ -353,7 +353,7 @@ TACAN::search (double frequency_mhz, double longitude_rad,
 }
 
 double
-TACAN::searchChannel (string _channel){
+TACAN::searchChannel (const string& _channel){
     
     double frequency_khz = 0;
     
@@ -365,7 +365,7 @@ TACAN::searchChannel (string _channel){
         frequency_khz = freq->get_freq();
         SG_LOG( SG_INSTR, SG_DEBUG, "freq output " << frequency_khz  );
         //check sanity
-        if (frequency_khz >9620 and  frequency_khz <= 12130)return frequency_khz/100;
+        if (frequency_khz >9620 && frequency_khz <= 12130)return frequency_khz/100;
     }
     return frequency_khz = 0;
 } // end TACAN::searchChannel