]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/groundnetwork.cxx
Remove hard-coded values wherever possible;
[flightgear.git] / src / Airports / groundnetwork.cxx
index f817e30351f6935370094579b5a87b42acc64f4c..4802b97c57cecafb9140340f326dbce836ac5c01 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <math.h>
 #include <algorithm>
+#include <fstream>
 
 
 #include <osg/Geode>
@@ -755,11 +756,11 @@ bool FGGroundNetwork::checkTransmissionState(int minState, int maxState, Traffic
                 FGATCDialogNew::instance()->removeEntry(1);
             } else {
                 //cerr << "creating message for " << i->getAircraft()->getCallSign() << endl;
-                transmit(&(*i), msgId, msgDir, false);
+                transmit(&(*i), &(*parent->getDynamics()), msgId, msgDir, false);
                 return false;
             }
         }
-        transmit(&(*i), msgId, msgDir, true);
+        transmit(&(*i), &(*parent->getDynamics()), msgId, msgDir, true);
         i->updateState();
         lastTransmission = now;
         available = false;
@@ -1097,11 +1098,11 @@ void FGGroundNetwork::checkHoldPosition(int id, double lat,
         if ((origStatus != currStatus) && available) {
             //cerr << "Issueing hold short instrudtion " << currStatus << " " << available << endl;
             if (currStatus == true) { // No has a hold short instruction
-                transmit(&(*current), MSG_HOLD_POSITION, ATC_GROUND_TO_AIR, true);
+                transmit(&(*current), &(*parent->getDynamics()), MSG_HOLD_POSITION, ATC_GROUND_TO_AIR, true);
                 //cerr << "Transmittin hold short instrudtion " << currStatus << " " << available << endl;
                 current->setState(1);
             } else {
-                transmit(&(*current), MSG_RESUME_TAXI, ATC_GROUND_TO_AIR, true);
+                transmit(&(*current), &(*parent->getDynamics()), MSG_RESUME_TAXI, ATC_GROUND_TO_AIR, true);
                 //cerr << "Transmittig resume instrudtion " << currStatus << " " << available << endl;
                 current->setState(2);
             }