]> git.mxchange.org Git - flightgear.git/commitdiff
Return landing type
authordaveluff <daveluff>
Mon, 22 Sep 2003 23:54:41 +0000 (23:54 +0000)
committerdaveluff <daveluff>
Mon, 22 Sep 2003 23:54:41 +0000 (23:54 +0000)
src/ATC/AILocalTraffic.cxx
src/ATC/AILocalTraffic.hxx

index bfd67bc07110ffe370ce127fe50ce9fea166dbe8..d052bc5c7e8fade03a354e0fc1dee3489c49c0b6 100644 (file)
@@ -139,6 +139,7 @@ void FGAILocalTraffic::GetRwyDetails() {
        }
 }
 
+
 /* 
 There are two possible scenarios during initialisation:
 The first is that the user is flying towards the airport, and hence the traffic
@@ -273,6 +274,17 @@ bool FGAILocalTraffic::Init(string ICAO, OperatingState initialState, PatternLeg
        return(true);
 }
 
+
+// Return what type of landing we're doing on this circuit
+LandingType FGAILocalTraffic::GetLandingOption() {
+       if(circuitsToFly) {
+               return(touchAndGo ? TOUCH_AND_GO : STOP_AND_GO);
+       } else {
+               return(FULL_STOP);
+       }
+}
+       
+
 // Commands to do something from higher level logic
 void FGAILocalTraffic::FlyCircuits(int numCircuits, bool tag) {
        //cout << "FlyCircuits called" << endl;
@@ -350,7 +362,7 @@ void FGAILocalTraffic::FlyCircuits(int numCircuits, bool tag) {
 // Run the internal calculations
 void FGAILocalTraffic::Update(double dt) {
        //cout << "A" << flush;
-       double responseTime = 10.0;             // seconds - this should get more sophisticated at some point
+       //double responseTime = 10.0;           // seconds - this should get more sophisticated at some point
        responseCounter += dt;
        if((contactTower) && (responseCounter >= 8.0)) {
                // Acknowledge request before changing frequency so it gets rendered if the user is on the same freq
index eb8343456dced5b5cdf70618f4abac1c5ee6adc0..fa8390929872d90d1ec3b129f3fb42a1d8092298 100644 (file)
@@ -70,6 +70,9 @@ public:
        // Go out and practice circuits
        void FlyCircuits(int numCircuits, bool tag);
        
+       // Return what type of landing we're doing on this circuit
+       LandingType GetLandingOption();
+       
        // TODO - this will get more complex and moved into the main class
        // body eventually since the position approved to taxi to will have
        // to be passed.