diff --git a/src/ATC/AIPlane.cxx b/src/ATC/AIPlane.cxx index 407d09a13..7d224f65f 100644 --- a/src/ATC/AIPlane.cxx +++ b/src/ATC/AIPlane.cxx @@ -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 << "); +} + diff --git a/src/ATC/AIPlane.hxx b/src/ATC/AIPlane.hxx index 5815570eb..a757bf26a 100644 --- a/src/ATC/AIPlane.hxx +++ b/src/ATC/AIPlane.hxx @@ -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;