]> git.mxchange.org Git - flightgear.git/commitdiff
itm.cpp: don't polute the global namespace
authoradrian <adrian@localhost.com>
Thu, 8 Dec 2011 18:16:11 +0000 (20:16 +0200)
committeradrian <adrian@localhost.com>
Thu, 8 Dec 2011 18:16:11 +0000 (20:16 +0200)
src/Radio/itm.cpp
src/Radio/radio.cxx

index bf42ee2e821e5568248d1a6f3b8def3bd449a622..d5c3e7f8a4265ded3e535dc1df99e672dfbcc94c 100644 (file)
 #include <assert.h>
 #include <stdio.h>
 
-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
+
+}
index f5ec063cec2eb537975a760f5f9452f1a44a8857..e8133b0aabe4c2ec0392b80e0f8f0dd93a021c5b 100644 (file)
@@ -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 ) )