#include "AIManager.hxx"
#include "AIBase.hxx"
-#include "AIFlightPlan.hxx"
#include <string>
SG_USING_STD(string);
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);
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 (!_self) ? false
- : ((fgGetFloat("/position/altitude-agl-ft") < 150.0)
- && (fgGetFloat("/velocities/airspeed-kt")
- < _self->performance->land_speed*1.5));
-}
-
#endif // _FG_AIAircraft_HXX