virtual bool init(bool search_in_AI_path=false);
virtual void bind();
- virtual void unbind();
virtual void update(double dt);
+ virtual void reinit();
+
void setFlightPlan(FGAIFlightPlan* f);
- void setName(const string&);
void setRudder(float r);
void setRoll(double rl);
void ProcessFlightPlan( double dt);
void setRudderConstant(double rc);
void setSpeedConstant(double sc);
void setFixedTurnRadius(double ft);
+ void setRollFactor(double rf);
+
+ 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;
-
+ 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, _wp_range;
+ 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
+ FGAIWaypoint* prev; // the one behind you
+ FGAIWaypoint* curr; // the one ahead
+ FGAIWaypoint* next; // the next plus 1
protected:
- string _name; // The name of this ship.
-
private:
-
- virtual void reinit() { init(); }
-
void setRepeat(bool r);
+ void setRestart(bool r);
void setMissed(bool m);
void setServiceable(bool s);
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 getDaySeconds();
double _roll_constant, _roll_factor;
double _sp_turn_radius_ft, _rd_turn_radius_ft, _fixed_turn_radius;
double _old_range, _range_rate;
- double _dt_count, _missed_count;
- double _next_run;
double _missed_time_sec;
double _start_sec;
double _day;
bool _repeat;
bool _fp_init;
bool _missed;
+
};