]> git.mxchange.org Git - flightgear.git/commitdiff
Return landing type. Simple AIPlane always returns full stop for now - more advanced...
authordaveluff <daveluff>
Mon, 22 Sep 2003 23:53:56 +0000 (23:53 +0000)
committerdaveluff <daveluff>
Mon, 22 Sep 2003 23:53:56 +0000 (23:53 +0000)
src/ATC/AIPlane.cxx
src/ATC/AIPlane.hxx

index 407d09a13494feb950ccac60fb8a2f2414593bd9..7d224f65f1562c0b59c07302b46883dcc6a826ac 100644 (file)
@@ -74,3 +74,40 @@ void FGAIPlane::Transmit(string msg) {
 
 void FGAIPlane::RegisterTransmission(int code) {
 }
+
+
+// Return what type of landing we're doing on this circuit
+LandingType FGAIPlane::GetLandingOption() {
+       return(FULL_STOP);
+}
+
+
+ostream& operator << (ostream& os, PatternLeg pl) {
+       switch(pl) {
+       case(TAKEOFF_ROLL):   return(os << "TAKEOFF ROLL");
+       case(CLIMBOUT):       return(os << "CLIMBOUT");
+       case(TURN1):          return(os << "TURN1");
+       case(CROSSWIND):      return(os << "CROSSWIND");
+       case(TURN2):          return(os << "TURN2");
+       case(DOWNWIND):       return(os << "DOWNWIND");
+       case(TURN3):          return(os << "TURN3");
+       case(BASE):           return(os << "BASE");
+       case(TURN4):          return(os << "TURN4");
+       case(FINAL):          return(os << "FINAL");
+       case(LANDING_ROLL):   return(os << "LANDING ROLL");
+       case(LEG_UNKNOWN):    return(os << "UNKNOWN");
+       }
+       return(os << "ERROR - Unknown switch in PatternLeg operator << ");
+}
+
+
+ostream& operator << (ostream& os, LandingType lt) {
+       switch(lt) {
+       case(FULL_STOP):      return(os << "FULL STOP");
+       case(STOP_AND_GO):    return(os << "STOP AND GO");
+       case(TOUCH_AND_GO):   return(os << "TOUCH AND GO");
+       case(AIP_LT_UNKNOWN): return(os << "UNKNOWN");
+       }
+       return(os << "ERROR - Unknown switch in LandingType operator << ");
+}
+
index 5815570eb25a6c1a502a058b2bbeab3d53fa08b7..a757bf26ad0d12b20069c47243350f734e5a74ff 100644 (file)
@@ -44,6 +44,17 @@ enum PatternLeg {
        LEG_UNKNOWN
 };
 
+ostream& operator << (ostream& os, PatternLeg pl);
+
+enum LandingType {
+       FULL_STOP,
+       STOP_AND_GO,
+       TOUCH_AND_GO,
+       AIP_LT_UNKNOWN
+};
+
+ostream& operator << (ostream& os, LandingType lt);
+
 /*****************************************************************
 *
 *  FGAIPlane - this class is derived from FGAIEntity and adds the 
@@ -69,6 +80,9 @@ public:
        
        // Return the current pattern leg the plane is flying.
        inline PatternLeg GetLeg() {return leg;}
+       
+       // Return what type of landing we're doing on this circuit
+       LandingType GetLandingOption();
 
 protected:
        PlaneRec plane;