-
- FGAIShip(object_type ot = otShip);
- virtual ~FGAIShip();
-
- 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 setFlightPlan(FGAIFlightPlan* f);
- void setName(const string&);
- void setRudder(float r);
- void setRoll(double rl);
-
- void ProcessFlightPlan( double dt );
-
- void AccelTo(double speed);
- void PitchTo(double angle);
- void RollTo(double angle);
- void YawTo(double angle);
- void ClimbTo(double altitude);
- void TurnTo(double heading);
- bool hdg_lock;
-
- virtual const char* getTypeString(void) const { return "ship"; }
-
+
+ FGAIShip(object_type ot = otShip);
+ virtual ~FGAIShip();
+
+ 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 setFlightPlan(FGAIFlightPlan* f);
+// void setName(const string&);
+ void setRudder(float r);
+ void setRoll(double rl);
+ void ProcessFlightPlan( double dt);
+ 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 setCurrName(const string&);
+ void setNextName(const string&);
+ void setPrevName(const string&);
+ void setLeadAngleGain(double g);
+ void setLeadAngleLimit(double l);
+ void setLeadAngleProp(double p);
+ void setRudderConstant(double rc);
+ void setSpeedConstant(double sc);
+ void setFixedTurnRadius(double ft);
+ void setTunnel(bool t);
+ void setInitialTunnel(bool t);
+
+ void setWPNames();
+ void setWPPos();
+ double sign(double x);
+
+ bool _hdg_lock;
+ bool _serviceable;
+ bool _waiting;
+ bool _new_waypoint;
+ bool _tunnel, _initial_tunnel;
+ bool _restart;
+
+ virtual const char* getTypeString(void) const { return "ship"; }
+ double _rudder_constant, _speed_constant, _hdg_constant, _limit ;
+ double _elevation_m, _elevation_ft;
+ double _missed_range, _tow_angle, _wait_count, _missed_count,_wp_range;
+ double _dt_count, _next_run;
+
+ FGAIFlightPlan::waypoint* prev; // the one behind you
+ FGAIFlightPlan::waypoint* curr; // the one ahead
+ FGAIFlightPlan::waypoint* next; // the next plus 1
+