X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIShip.hxx;h=e7bda357044546f3d53f51fb962709be296a1a43;hb=8a089f6d6f9e7851e73fd118cb9a5f5583cfe517;hp=f4a622310c6b5ef3d09a08132245809adc8daea9;hpb=bec023b43c8d3863a288227cf8432f884000f719;p=flightgear.git diff --git a/src/AIModel/AIShip.hxx b/src/AIModel/AIShip.hxx index f4a622310..e7bda3570 100644 --- a/src/AIModel/AIShip.hxx +++ b/src/AIModel/AIShip.hxx @@ -24,6 +24,7 @@ #include "AIBase.hxx" #include "AIFlightPlan.hxx" +#include class FGAIManager; @@ -41,7 +42,7 @@ public: virtual void unbind(); virtual void update(double dt); void setFlightPlan(FGAIFlightPlan* f); - void setName(const string&); +// void setName(const string&); void setRudder(float r); void setRoll(double rl); void ProcessFlightPlan( double dt); @@ -54,36 +55,64 @@ public: 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 protected: - string _name; // The name of this ship. +// string _name; // The name of this ship. private: - FGAIFlightPlan::waypoint* prev; // the one behind you - FGAIFlightPlan::waypoint* curr; // the one ahead - FGAIFlightPlan::waypoint* next; // the next plus 1 + virtual void reinit() { init(); } void setRepeat(bool r); + void setRestart(bool r); void setMissed(bool m); - void setWPNames(); + void setServiceable(bool s); void Run(double dt); void setStartTime(const string&); void setUntilTime(const string&); + //void setWPPos(); + void setWPAlt(); + void setXTrackError(); + + SGGeod wppos; + const SGMaterial* _material; double getRange(double lat, double lon, double lat2, double lon2) const; double getCourse(double lat, double lon, double lat2, double lon2) const; - double sign(double x); double getDaySeconds(); double processTimeString(const string& time); @@ -92,14 +121,17 @@ private: float _rudder, _tgt_rudder; - double _rudder_constant, _roll_constant, _speed_constant, _hdg_constant, _roll_factor; - double _sp_turn_radius_ft, _rd_turn_radius_ft; - double _wp_range, _old_range, _range_rate; - double _dt_count, _missed_count, _wait_count; - double _next_run; + double _roll_constant, _roll_factor; + double _sp_turn_radius_ft, _rd_turn_radius_ft, _fixed_turn_radius; + double _old_range, _range_rate; double _missed_time_sec; double _start_sec; double _day; + double _lead_angle; + double _lead_angle_gain, _lead_angle_limit, _proportion; + double _course; + double _xtrack_error; + double _curr_alt, _prev_alt; string _prev_name, _curr_name, _next_name; string _path; @@ -107,8 +139,8 @@ private: bool _repeat; bool _fp_init; - bool _new_waypoint; - bool _missed, _waiting; + bool _missed; + };