From: adrian Date: Thu, 8 Dec 2011 18:16:11 +0000 (+0200) Subject: itm.cpp: don't polute the global namespace X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=24ff2792189c41a4bf3bfa3297b272bd70a09fa3;p=flightgear.git itm.cpp: don't polute the global namespace --- diff --git a/src/Radio/itm.cpp b/src/Radio/itm.cpp index bf42ee2e8..d5c3e7f8a 100644 --- a/src/Radio/itm.cpp +++ b/src/Radio/itm.cpp @@ -39,12 +39,14 @@ #include #include -const double THIRD = (1.0/3.0); -const double f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa - using namespace std; +namespace ITM { + +const double THIRD = (1.0/3.0); +const double f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa + struct prop_type { // General input @@ -1849,3 +1851,5 @@ void area(long ModVar, double deltaH, double tht_m, double rht_m, double dist_km errnum = prop.kwx; } #endif + +} diff --git a/src/Radio/radio.cxx b/src/Radio/radio.cxx index f5ec063ce..e8133b0aa 100644 --- a/src/Radio/radio.cxx +++ b/src/Radio/radio.cxx @@ -391,14 +391,14 @@ double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, i if((transmission_type == 3) || (transmission_type == 4)) { // the sender and receiver roles are switched - point_to_point(itm_elev, receiver_height, transmitter_height, + ITM::point_to_point(itm_elev, receiver_height, transmitter_height, eps_dielect, sgm_conductivity, eno, frq_mhz, radio_climate, pol, conf, rel, dbloss, strmode, p_mode, horizons, errnum); if( _root_node->getBoolValue( "use-clutter-attenuation", false ) ) calculate_clutter_loss(frq_mhz, itm_elev, materials, receiver_height, transmitter_height, p_mode, horizons, clutter_loss); } else { - point_to_point(itm_elev, transmitter_height, receiver_height, + ITM::point_to_point(itm_elev, transmitter_height, receiver_height, eps_dielect, sgm_conductivity, eno, frq_mhz, radio_climate, pol, conf, rel, dbloss, strmode, p_mode, horizons, errnum); if( _root_node->getBoolValue( "use-clutter-attenuation", false ) )