]> git.mxchange.org Git - flightgear.git/commitdiff
Hopefully fix windows compilation error
authoradrian <adrian@localhost.com>
Sun, 4 Dec 2011 20:08:56 +0000 (22:08 +0200)
committeradrian <adrian@localhost.com>
Sun, 4 Dec 2011 20:08:56 +0000 (22:08 +0200)
src/Radio/itm.cpp
src/Radio/radio.cxx
src/Radio/radio.hxx

index 5fe6abc8e4331ca4d64cb3c0118c9aa8e3b4ac74..1b970d067351e63d7ad145eac5617c19fab73b41 100644 (file)
@@ -39,8 +39,8 @@
 #include <assert.h>
 #include <stdio.h>
 
-const float THIRD = (1.0/3.0);
-const float f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa
+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;
index be8dc1ef339927776dbfa7fed458d41f7e8d50a6..4c80a9fe594f06bffa8fa88d6a06286e25c1ed60 100644 (file)
@@ -375,14 +375,14 @@ double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, i
                        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 ) )
-                       clutterLoss(frq_mhz, distance_m, itm_elev, materials, receiver_height, transmitter_height, p_mode, horizons, clutter_loss);
+                       clutterLoss(frq_mhz, itm_elev, materials, receiver_height, transmitter_height, p_mode, horizons, clutter_loss);
        }
        else {
                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 ) )
-                       clutterLoss(frq_mhz, distance_m, itm_elev, materials, transmitter_height, receiver_height, p_mode, horizons, clutter_loss);
+                       clutterLoss(frq_mhz, itm_elev, materials, transmitter_height, receiver_height, p_mode, horizons, clutter_loss);
        }
        
        double pol_loss = 0.0;
@@ -415,11 +415,11 @@ double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, i
 *       We are only worried about clutter loss, terrain influence 
 *       on the first Fresnel zone is calculated in the ITM functions
 ***/
-void FGRadioTransmission::clutterLoss(double freq, double distance_m, double itm_elev[], deque<string> materials,
+void FGRadioTransmission::clutterLoss(double freq, double itm_elev[], deque<string> materials,
        double transmitter_height, double receiver_height, int p_mode,
        double horizons[], double &clutter_loss) {
        
-       distance_m = itm_elev[0] * itm_elev[1]; // only consider elevation points
+       double distance_m = itm_elev[0] * itm_elev[1]; // only consider elevation points
        
        if (p_mode == 0) {      // LOS: take each point and see how clutter height affects first Fresnel zone
                int mat = 0;
index 7b07d927e9e4e4b7eef9411f9c68c88dc5a26751..ef0b19e7fe843a0c216cae62e3fa3287c891f1e5 100644 (file)
@@ -56,7 +56,7 @@ private:
        double polarization_loss();
        double ITM_calculate_attenuation(SGGeod tx_pos, double freq, int ground_to_air);
        double LOS_calculate_attenuation(SGGeod tx_pos, double freq, int ground_to_air);
-       void clutterLoss(double freq, double distance_m, double itm_elev[], std::deque<string> materials,
+       void clutterLoss(double freq, double itm_elev[], std::deque<string> materials,
                        double transmitter_height, double receiver_height, int p_mode,
                        double horizons[], double &clutter_loss);
        void get_material_properties(string mat_name, double &height, double &density);