-
- enum aircraft_e {LIGHT=0, WW2_FIGHTER, JET_TRANSPORT, JET_FIGHTER};
- static const PERF_STRUCT settings[];
-
- FGAIAircraft(FGAIManager* mgr);
- ~FGAIAircraft();
-
- bool init();
- virtual void bind();
- virtual void unbind();
- void update(double dt);
-
- void SetPerformance(const PERF_STRUCT *ps);
- void SetFlightPlan(FGAIFlightPlan *f);
- void AccelTo(double speed);
- void PitchTo(double angle);
- void RollTo(double angle);
- void YawTo(double angle);
- void ClimbTo(double altitude);
- void TurnTo(double heading);
- void ProcessFlightPlan( double dt );
- //double getHeading(double lat1, double lon1, double lat2, double lon2);
-
+ FGAIAircraft(FGAISchedule *ref=0);
+ ~FGAIAircraft();
+
+ virtual void readFromScenario(SGPropertyNode* scFileNode);
+
+ // virtual bool init(bool search_in_AI_path=false);
+ virtual void bind();
+ virtual void unbind();
+ virtual void update(double dt);
+
+ void setPerformance(const std::string& perfString);
+ void setPerformance(PerformanceData *ps);
+
+ void setFlightPlan(const std::string& fp, bool repat = false);
+ void SetFlightPlan(FGAIFlightPlan *f);
+ void initializeFlightPlan();
+ FGAIFlightPlan* GetFlightPlan() const { return fp; };
+ void ProcessFlightPlan( double dt, time_t now );
+
+ void AccelTo(double speed);
+ void PitchTo(double angle);
+ void RollTo(double angle);
+ void YawTo(double angle);
+ void ClimbTo(double altitude);
+ void TurnTo(double heading);
+
+ void getGroundElev(double dt); //TODO these 3 really need to be public?
+ void doGroundAltitude();
+ bool loadNextLeg ();
+
+ void setAcType(const string& ac) { acType = ac; };
+ void setCompany(const string& comp) { company = comp;};
+
+ void announcePositionToController(); //TODO have to be public?
+ void processATC(FGATCInstruction instruction);
+ FGAISchedule * getTrafficRef() { return trafficRef; };
+
+ virtual const char* getTypeString(void) const { return "aircraft"; }
+
+ // included as performance data needs them, who else?
+ inline PerformanceData* getPerformance() { return _performance; };
+ inline bool onGround() const { return no_roll; };
+ inline double getSpeed() const { return speed; };
+ inline double getRoll() const { return roll; };
+ inline double getPitch() const { return pitch; };
+ inline double getAltitude() const { return altitude_ft; };
+ inline double getVerticalSpeed() const { return vs; };
+ inline double altitudeAGL() const { return props->getFloatValue("position/altitude-agl-ft");};
+ inline double airspeed() const { return props->getFloatValue("velocities/airspeed-kt");};
+ string atGate();
+