// << dist_to_go << ": Lead distance "
// << lead_dist << " " << curr->name
// << " Ground target speed " << groundTargetSpeed << endl;
- double bearing;
+ double bearing = 0;
if (speed > 50) { // don't do bearing calculations for ground traffic
bearing = getBearing(fp->getBearing(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr));
if (bearing < minBearing) {
_elevation(0.0),
_rotation(0.0),
_formate_to_ac(false),
+_elapsed_time(0),
_aero_stabilised(false),
_drag_area(0.007),
_life_timer(0.0),
_slave_load_to_ac(false),
_contents_lb(0),
_report_collision(false),
-_report_expiry(false),
_report_impact(false),
_external_force(false),
+_report_expiry(false),
_impact_report_node(fgGetNode("/ai/models/model-impact", true)),
-_old_height(0),
-_elapsed_time(0),
-hs(0)
+hs(0),
+_old_height(0)
{
no_roll = false;
using namespace simgear;
FGAIBase::FGAIBase(object_type ot) :
+ _name(""),
+ _parent(""),
props( NULL ),
model_removed( fgGetNode("/ai/models/model-removed", true) ),
manager( NULL ),
fp( NULL ),
-
_impact_lat(0),
_impact_lon(0),
_impact_elev(0),
_impact_pitch(0),
_impact_roll(0),
_impact_speed(0),
-
_refID( _newAIModelID() ),
_otype(ot),
- _initialized(false),
- _parent(""),
- _name("")
+ _initialized(false)
{
tgt_heading = hdg = tgt_altitude_ft = tgt_speed = 0.0;
FGAIShip(otEscort),
_relbrg (0),
-_stn_truebrg(0),
_parent_speed(0),
-_stn_limit(0),
-_stn_angle_limit(0),
-_stn_speed(0),
+_interval(0),
+_stn_truebrg(0),
_stn_height(0),
+_stn_speed(0),
+_stn_angle_limit(0),
+_stn_limit(0),
_max_speed(0),
-_interval(0),
_MPControl(false),
_patrol(false),
_stn_deg_true(false)
double vTaxi = ac->getPerformance()->vTaxi();
double vRotate = ac->getPerformance()->vRotate();
double vTakeoff = ac->getPerformance()->vTakeoff();
- double vClimb = ac->getPerformance()->vClimb();
+ //double vClimb = ac->getPerformance()->vClimb();
double accelMetric = (accel * SG_NM_TO_METER) / 3600;
double vTaxiMetric = (vTaxi * SG_NM_TO_METER) / 3600;
double vRotateMetric = (vRotate * SG_NM_TO_METER) / 3600;
double vTakeoffMetric = (vTakeoff * SG_NM_TO_METER) / 3600;
- double vClimbMetric = (vClimb * SG_NM_TO_METER) / 3600;
+ //double vClimbMetric = (vClimb * SG_NM_TO_METER) / 3600;
// Acceleration = dV / dT
// Acceleration X dT = dV
// dT = dT / Acceleration
// Create a slow descent path that ends 250 lateral to the runway.
double initialTurnRadius = getTurnRadius(vDescent, true);
- double finalTurnRadius = getTurnRadius(vApproach, true);
+ //double finalTurnRadius = getTurnRadius(vApproach, true);
// get length of the downwind leg for the intended runway
double distanceOut = apt->getDynamics()->getApproachController()->getRunway(rwy->name())->getApproachDistance(); //12 * SG_NM_TO_METER;
if (reposition) {
double tempDistance;
- double minDistance = HUGE_VAL;
+ //double minDistance = HUGE_VAL;
string wptName;
tempDistance = SGGeodesy::distanceM(current, initialTarget);
time_t eta =
const string & fltType)
{
double vTouchdown = ac->getPerformance()->vTouchdown();
- double vTaxi = ac->getPerformance()->vTaxi();
+ //double vTaxi = ac->getPerformance()->vTaxi();
//string rwyClass = getRunwayClassFromTrafficType(fltType);
//double heading = ac->getTrafficRef()->getCourse();
_range_ft(0),
_relbrg (0),
_parent_speed(0),
-_dt_count(0),
-_next_run(0),
_parent_x_offset(0),
_parent_y_offset(0),
_parent_z_offset(0),
+_dt_count(0),
+_next_run(0),
_break_count(0)
{
double rear_elev_m = 0;
double elev_front = 0;
double elev_rear = 0;
- double max_alt = 10000;
+ //double max_alt = 10000;
if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodFront, 3000),
elev_front, &_material, 0)){
void FGAIGroundVehicle::setTowSpeed(){
- double diff = _range_ft - _x_offset;
+ //double diff = _range_ft - _x_offset;
double x = 0;
if (_range_ft > _x_offset * 3) x = 50;
string parent_next_name = _selected_ac->getStringValue("waypoint/name-next");
bool parent_waiting = _selected_ac->getBoolValue("waypoint/waiting");
- bool parent_restart = _selected_ac->getBoolValue("controls/restart");
+ //bool parent_restart = _selected_ac->getBoolValue("controls/restart");
if (parent_next_name == "END" && fp->getNextWaypoint()->name != "END" ){
SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
FGAIShip::FGAIShip(object_type ot) :
FGAIBase(ot),
+
+
+_waiting(false),
+_new_waypoint(true),
+_tunnel(false),
+_initial_tunnel(false),
+_restart(false),
+_hdg_constant(0.01),
_limit(100),
_elevation_m(0),
_elevation_ft(0),
_tow_angle(0),
+_missed_count(0),
+_wp_range(0),
_dt_count(0),
_next_run(0),
+_roll_constant(0.001),
+_roll_factor(-0.0083335),
+_old_range(0),
+_range_rate(0),
+_missed_time_sec(30),
+_day(86400),
_lead_angle(0),
_xtrack_error(0),
-_tunnel(false),
-_initial_tunnel(false),
_curr_alt(0),
_prev_alt(0),
_until_time(""),
_fp_init(false),
-_missed(false),
-_waiting(false),
-_new_waypoint(true),
-_missed_count(0),
-_wait_count(0),
-_missed_time_sec(30),
-_day(86400),
-_wp_range(0),
-_old_range(0),
-_range_rate(0),
-_roll_constant(0.001),
-_hdg_constant(0.01),
-_roll_factor(-0.0083335),
-_restart(false)
-
+_missed(false)
{
invisible = false;
}
if (trigger && (*submodel_iterator)->count != 0) {
- int id = (*submodel_iterator)->id;
+ //int id = (*submodel_iterator)->id;
string name = (*submodel_iterator)->name;
SG_LOG(SG_GENERAL, SG_DEBUG,
IC.mass = sm->weight * lbs_to_slugs;
int id = sm->id;
- int sub_id = sm->sub_id;
+ //int sub_id = sm->sub_id;
string name = sm->name;
string arrTimeGen = tokens[6];
string repeat = "WEEK";
string requiredAircraft = tokens[9];
-
+
if (weekdays.size() != 7) {
SG_LOG(SG_GENERAL, SG_ALERT, "Found misconfigured weekdays string" << weekdays);
exit(1);
if (fgGetBool("/sim/traffic-manager/dumpdata") == true) {
SG_LOG(SG_GENERAL, SG_ALERT, "Traffic Dump AC," << homePort << "," << registration << "," << requiredAircraft
<< "," << acType << "," << livery << ","
- << airline << "," << offset << "," << radius << "," << flighttype << "," << isHeavy << "," << mdl);
+ << airline << "," << m_class << "," << offset << "," << radius << "," << flighttype << "," << isHeavy << "," << mdl);
}
//scheduledAircraft.push_back(new FGAISchedule(mdl,
// livery,