From e0b2d43fb480ab079d1f16d68b62e0370d32fa81 Mon Sep 17 00:00:00 2001 From: torsten Date: Fri, 21 Aug 2009 14:29:11 +0000 Subject: [PATCH] the warning extinguisher hits again... --- src/AIModel/AIBallistic.cxx | 32 ++++++++++++---------- src/AIModel/AIFlightPlanCreate.cxx | 6 ++-- src/AIModel/AIFlightPlanCreatePushBack.cxx | 2 +- src/AIModel/AIShip.cxx | 2 +- src/AIModel/submodel.cxx | 10 +++---- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/AIModel/AIBallistic.cxx b/src/AIModel/AIBallistic.cxx index 1ea75d7f2..5e3b15509 100644 --- a/src/AIModel/AIBallistic.cxx +++ b/src/AIModel/AIBallistic.cxx @@ -39,30 +39,32 @@ const double FGAIBallistic::slugs_to_kgs = 14.5939029372; const double FGAIBallistic::slugs_to_lbs = 32.1740485564; FGAIBallistic::FGAIBallistic(object_type ot) : -FGAIBase(ot), - _elevation(0), + FGAIBase(ot), + _height(0.0), + _ht_agl_ft(0.0), + _azimuth(0.0), + _elevation(0.0), + _rotation(0.0), + _formate_to_ac(false), _aero_stabilised(false), _drag_area(0.007), _life_timer(0.0), -_gravity(32.1740485564), + _gravity(32.1740485564), _buoyancy(0), + _wind(true), + _mass(0), _random(false), - _ht_agl_ft(0), _load_resistance(0), _solid(false), + _force_stabilised(false), + _slave_to_ac(false), + _slave_load_to_ac(false), + _contents_lb(0), _report_collision(false), _report_impact(false), -_wind(true), + _external_force(false), _impact_report_node(fgGetNode("/ai/models/model-impact", true)), - _force_stabilised(false), -_external_force(false), -_slave_to_ac(false), -_slave_load_to_ac(false), -_formate_to_ac(false), -_contents_lb(0), -_mass(0), -_height(0), -_old_height(0) + _old_height(0) { no_roll = false; @@ -599,7 +601,7 @@ void FGAIBallistic::Run(double dt) { //calculate velocity due to external force double force_speed_north_deg_sec = 0; double force_speed_east_deg_sec = 0; - double vs_force_fps = 0; +// double vs_force_fps = 0; double hs_force_fps = 0; double v_force_acc_fpss = 0; double force_speed_north_fps = 0; diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index f30d44f70..560d69db4 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -373,13 +373,13 @@ void FGAIFlightPlan::createTakeOff(FGAIAircraft *ac, bool firstFlight, FGAirport double accel = ac->getPerformance()->acceleration(); double vTaxi = ac->getPerformance()->vTaxi(); double vRotate = ac->getPerformance()->vRotate(); - double vTakeoff = ac->getPerformance()->vTakeoff(); +// double vTakeoff = ac->getPerformance()->vTakeoff(); double vClimb = ac->getPerformance()->vClimb(); // Acceleration = dV / dT // Acceleration X dT = dV // dT = dT / Acceleration //d = (Vf^2 - Vo^2) / (2*a) - double accelTime = (vRotate - vTaxi) / accel; +// double accelTime = (vRotate - vTaxi) / accel; //cerr << "Using " << accelTime << " as total acceleration time" << endl; double accelDistance = (vRotate*vRotate - vTaxi*vTaxi) / (2*accel); //cerr << "Using " << accelDistance << " " << accel << " " << vRotate << endl; @@ -430,7 +430,7 @@ void FGAIFlightPlan::createTakeOff(FGAIAircraft *ac, bool firstFlight, FGAirport void FGAIFlightPlan::createClimb(FGAIAircraft *ac, bool firstFlight, FGAirport *apt, double speed, double alt, const string &fltType) { waypoint *wpt; - bool planLoaded = false; +// bool planLoaded = false; string fPLName; double vClimb = ac->getPerformance()->vClimb(); diff --git a/src/AIModel/AIFlightPlanCreatePushBack.cxx b/src/AIModel/AIFlightPlanCreatePushBack.cxx index 4ef5f573b..76458f211 100644 --- a/src/AIModel/AIFlightPlanCreatePushBack.cxx +++ b/src/AIModel/AIFlightPlanCreatePushBack.cxx @@ -163,7 +163,7 @@ void FGAIFlightPlan::createPushBack(FGAIAircraft *ac, //} } else { //cerr << "Creating direct forward departure route fragment" << endl; - double lat2, lon2, az2; + double lat2 = 0.0, lon2 = 0.0, az2 = 0.0; waypoint *wpt; geo_direct_wgs_84 ( 0, lat, lon, heading, 2, &lat2, &lon2, &az2 ); diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index 4d6b2c3ad..302249cdc 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -541,7 +541,7 @@ void FGAIShip::ProcessFlightPlan(double dt) { _old_range = _wp_range; setWPNames(); - if ((_wp_range < sp_turn_radius_nm) || _missed || _waiting && !_new_waypoint) { + if ((_wp_range < sp_turn_radius_nm) || _missed || (_waiting && !_new_waypoint)) { if (_next_name == "END") { diff --git a/src/AIModel/submodel.cxx b/src/AIModel/submodel.cxx index 808a96349..7b946f0b8 100644 --- a/src/AIModel/submodel.cxx +++ b/src/AIModel/submodel.cxx @@ -783,17 +783,17 @@ void FGSubmodelMgr::loadSubmodels() ++subsubmodel_iterator; } - submodel_iterator = submodels.begin(); + //submodel_iterator = submodels.begin(); - while (submodel_iterator != submodels.end()) { - int id = (*submodel_iterator)->id; + //while (submodel_iterator != submodels.end()) { + //int id = (*submodel_iterator)->id; //SG_LOG(SG_GENERAL, SG_DEBUG,"after pushback " // << " id " << id // << " name " << (*submodel_iterator)->name // << " sub id " << (*submodel_iterator)->sub_id); - ++submodel_iterator; - } + //++submodel_iterator; + //} } // end of submodel.cxx -- 2.39.5