X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2FAILocalTraffic.hxx;h=a4e1505f64495ae15d9de65c99d44b2f44c245a9;hb=4a79d82ba62fa4e5be759fa0fc4b20220e8da303;hp=690ebd2e7cf4c429f43427e9d5fc9ed4cfdc019e;hpb=a739fad66484506ebb71fc802bf8f1a0c2ab4c6c;p=flightgear.git diff --git a/src/ATC/AILocalTraffic.hxx b/src/ATC/AILocalTraffic.hxx index 690ebd2e7..a4e1505f6 100644 --- a/src/ATC/AILocalTraffic.hxx +++ b/src/ATC/AILocalTraffic.hxx @@ -17,21 +17,22 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef _FG_AILocalTraffic_HXX #define _FG_AILocalTraffic_HXX -#include -#include #include #include
-#include "tower.hxx" #include "AIPlane.hxx" #include "ATCProjection.hxx" #include "ground.hxx" +class FGGround; +class FGTower; +struct Gate; + #include SG_USING_STD(string); @@ -64,7 +65,7 @@ public: ~FGAILocalTraffic(); // Initialise - bool Init(const string& callsign, string ICAO, OperatingState initialState = PARKED, PatternLeg initialLeg = DOWNWIND); + bool Init(const string& callsign, const string& ICAO, OperatingState initialState = PARKED, PatternLeg initialLeg = DOWNWIND); // Run the internal calculations void Update(double dt); @@ -121,9 +122,9 @@ protected: FGATCAlignedProjection ortho; // Orthogonal mapping of the local area with the threshold at the origin // and the runway aligned with the y axis. - void GetAirportDetails(string id); + void GetAirportDetails(const string& id); - void GetRwyDetails(string id); + void GetRwyDetails(const string& id); double responseCounter; // timer in seconds to allow response to requests to be a little while after them // Will almost certainly get moved to FGAIPlane. @@ -159,8 +160,8 @@ private: bool inAir; // True when off the ground // environment - some of this might get moved into FGAIPlane - SGPropertyNode* wind_from_hdg; //degrees - SGPropertyNode* wind_speed_knots; //knots + SGPropertyNode_ptr wind_from_hdg; //degrees + SGPropertyNode_ptr wind_speed_knots; //knots // Pattern details that (may) change int numInPattern; // Number of planes in the pattern (this might get more complicated if high performance GA aircraft fly a higher pattern eventually) @@ -200,6 +201,7 @@ private: bool contactGround; // we have been told to contact ground bool changeFreq; // true when we need to change frequency bool _taxiToGA; // Temporary mega-hack indicating we are to taxi to the GA parking and disconnect from tower control. + bool _removeSelf; // Indicates that we wish to remove this instance. The use of a variable is a hack to allow time for messages to purge before removal, due to the fagility of the current dialog system. atc_type changeFreqType; // the service we need to change to bool freeTaxi; // False if the airport has a facilities file with a logical taxi network defined, true if we need to calculate our own taxiing points. @@ -214,7 +216,7 @@ private: void CalculateSoD(double base_leg_pos, double downwind_leg_pos, bool pattern_direction); - void ExitRunway(Point3D orthopos); + void ExitRunway(const Point3D& orthopos); void StartTaxi(); @@ -223,6 +225,9 @@ private: void GetNextTaxiNode(); void DoGroundElev(); + + // Set when the plane should be invisible *regardless of distance from user*. + bool _invisible; }; #endif // _FG_AILocalTraffic_HXX