]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlanCreate.cxx
Improve timing statistics
[flightgear.git] / src / AIModel / AIFlightPlanCreate.cxx
index d276cc96ae26b63e9dbecc262903e6e881321c65..a0a396d8fe02ea0874f77432e78b2d4d41911943 100644 (file)
@@ -27,6 +27,7 @@
 #include <simgear/props/props.hxx>
 #include <simgear/props/props_io.hxx>
 
+#include <Airports/simple.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/dynamics.hxx>
 #include "AIAircraft.hxx"
@@ -419,13 +420,13 @@ void FGAIFlightPlan::createTakeOff(FGAIAircraft * ac, bool firstFlight,
     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
@@ -558,7 +559,7 @@ void FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
 
     // 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;
@@ -801,7 +802,7 @@ void FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
 
     if (reposition) {
         double tempDistance;
-        double minDistance = HUGE_VAL;
+        //double minDistance = HUGE_VAL;
         string wptName;
         tempDistance = SGGeodesy::distanceM(current, initialTarget);
         time_t eta =
@@ -836,7 +837,7 @@ void FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
                                    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();