]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/trafficcontrol.cxx
prepare for festival volume
[flightgear.git] / src / ATC / trafficcontrol.cxx
index 3e27f919047cf58d21dcbcb86856c2ec663c2399..2b0d20c6793bbe2924c29e13b9d0d084941f8538 100644 (file)
@@ -47,6 +47,7 @@
 #include <Airports/groundnetwork.hxx>
 #include <Airports/dynamics.hxx>
 #include <Airports/simple.hxx>
+#include <Radio/radio.hxx>
 
 using std::sort;
 
@@ -743,7 +744,8 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent,
                 || (onBoardRadioFreqI1 == stationFreq)) {
             if (rec->allowTransmissions()) {
                
-               if( fgGetBool( "/instrumentation/use-itm-attenuation", false ) ) {
+               if( fgGetBool( "/sim/radio/use-itm-attenuation", false ) ) {
+                       //cerr << "Using ITM radio propagation" << endl;
                        FGRadio* radio = new FGRadio();
                        SGGeod sender_pos;
                        double sender_alt_ft, sender_alt;
@@ -759,7 +761,9 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent,
                                      sender_pos= SGGeod::fromDegM( rec->getLongitude(),
                                             rec->getLatitude(), sender_alt );
                                }
-                       radio->receiveText(sender_pos, stationFreq, text, ground_to_air);
+                               double frequency = ((double)stationFreq) / 100;
+                       radio->receiveText(sender_pos, frequency, text, ground_to_air);
+                       delete radio;
                }
                else {
                        fgSetString("/sim/messages/atc", text.c_str());