]> git.mxchange.org Git - flightgear.git/commitdiff
the warning extinguisher hits again...
authortorsten <torsten>
Fri, 21 Aug 2009 14:29:11 +0000 (14:29 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:43:09 +0000 (21:43 +0200)
src/AIModel/AIBallistic.cxx
src/AIModel/AIFlightPlanCreate.cxx
src/AIModel/AIFlightPlanCreatePushBack.cxx
src/AIModel/AIShip.cxx
src/AIModel/submodel.cxx

index 1ea75d7f2c43b2f69b3c0cc79f855955e7278d35..5e3b155095f1dc3147a81dbdbd2d80c7570387c3 100644 (file)
@@ -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;
index f30d44f70ee524a2f78698cc20cf7ec6534ee1fc..560d69db4b437391fb179a111de0efcc0264e497 100644 (file)
@@ -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();
 
index 4ef5f573b7daf516d5ebbf5086c4f2222cd39582..76458f211e12a982b378fa71187ae376ad55ae0d 100644 (file)
@@ -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 );
index 4d6b2c3ad9a84fded1079a6d5b30c5b76273bade..302249cdc77901e0d81536cd87a15a87a183a5f3 100644 (file)
@@ -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") {
 
index 808a963494be8172e3e3f5f12d8746e0c2455886..7b946f0b8e4ae01c707f4318dda4242a21248ba7 100644 (file)
@@ -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