]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIAircraft.hxx
Make the scenerio's work again (now for real) and a small number of updates.
[flightgear.git] / src / AIModel / AIAircraft.hxx
index 4048deb9e3a8252cc092407a461136774301c967..33cf99e5e4e402c5964def17eec688fb7bd11cf2 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "AIManager.hxx"
 #include "AIBase.hxx"
-#include "AIFlightPlan.hxx"
 
 #include <string>
 SG_USING_STD(string);
@@ -47,7 +46,7 @@ private:
        
 public:
 
-        enum aircraft_e {LIGHT=0, WW2_FIGHTER, JET_TRANSPORT, JET_FIGHTER};
+        enum aircraft_e {LIGHT=0, WW2_FIGHTER, JET_TRANSPORT, JET_FIGHTER, TANKER};
         static const PERF_STRUCT settings[];
        
        FGAIAircraft(FGAIManager* mgr);
@@ -67,33 +66,26 @@ public:
         void ClimbTo(double altitude);
         void TurnTo(double heading);
         void ProcessFlightPlan( double dt );
-        //double getHeading(double lat1, double lon1, double lat2, double lon2);
 
-protected:
-        static FGAIAircraft *_self;
-       
+        inline void SetTanker(bool setting) { isTanker = setting; };
+
 private:
 
         bool hdg_lock;
         bool alt_lock;
-        FGAIFlightPlan *fp;
         double dt_count;  
         double dt; 
 
         const PERF_STRUCT *performance;
         bool use_perf_vs;
+        SGPropertyNode* refuel_node;
+        bool isTanker;
 
        void Run(double dt);
         double sign(double x); 
 
-        static bool _getGearDown();
+        bool _getGearDown() const;
 };
 
-inline bool FGAIAircraft::_getGearDown() {
-    return ((fgGetFloat("/position/altitude-agl-ft") < 150.0)
-             && (fgGetFloat("/velocities/airspeed-kt")
-                   < _self->performance->land_speed*1.5));
-}
-
 
 #endif  // _FG_AIAircraft_HXX