]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlanCreate.cxx
Bugfixes and some finetuning:
[flightgear.git] / src / AIModel / AIFlightPlanCreate.cxx
index d50ff58dad68b5b2d3d48968613530291497e80e..5eb04f21bc395204e182b34edeb1ed254883f4b8 100644 (file)
@@ -63,11 +63,11 @@ bool FGAIFlightPlan::create(FGAIAircraft * ac, FGAirport * dep,
     case 1:
         retVal = createPushBack(ac, firstFlight, dep, latitude, longitude,
                                 radius, fltType, aircraftType, airline);
-        // Pregenerate the 
-        if (retVal) {
-            waypoints.back()->setName( waypoints.back()->getName() + string("legend")); 
-            retVal = createTakeoffTaxi(ac, false, dep, radius, fltType, aircraftType, airline);
-        }
+        // Pregenerate the taxi leg.
+        //if (retVal) {
+        //    waypoints.back()->setName( waypoints.back()->getName() + string("legend")); 
+        //    retVal = createTakeoffTaxi(ac, false, dep, radius, fltType, aircraftType, airline);
+        //}
         break;
     case 2:
         retVal =  createTakeoffTaxi(ac, firstFlight, dep, radius, fltType,
@@ -98,7 +98,7 @@ bool FGAIFlightPlan::create(FGAIAircraft * ac, FGAirport * dep,
         break;
     default:
         //exit(1);
-        SG_LOG(SG_INPUT, SG_ALERT,
+        SG_LOG(SG_AI, SG_ALERT,
                "AIFlightPlan::create() attempting to create unknown leg"
                " this is probably an internal program error");
     }
@@ -215,7 +215,7 @@ bool FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft * ac, bool firstFlight,
                                                       &heading, &gateId,
                                                       radius, fltType,
                                                       acType, airline))) {
-            SG_LOG(SG_INPUT, SG_WARN, "Could not find parking for a " <<
+            SG_LOG(SG_AI, SG_WARN, "Could not find parking for a " <<
                    acType <<
                    " of flight type " << fltType <<
                    " of airline     " << airline <<
@@ -357,7 +357,7 @@ void FGAIFlightPlan::createDefaultLandingTaxi(FGAIAircraft * ac,
     double heading, lat, lon;
     aAirport->getDynamics()->getParking(gateId, &lat, &lon, &heading);
     wpt =
-        createOnGround(ac, "END", SGGeod::fromDeg(lon, lat), airportElev,
+        createOnGround(ac, "ENDtaxi", SGGeod::fromDeg(lon, lat), airportElev,
                        ac->getPerformance()->vTaxi());
     pushBackWaypoint(wpt);
 }
@@ -909,7 +909,7 @@ bool FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
 
 
     FGAIWaypoint *wpt;
-    double aptElev = apt->getElevation();
+    //double aptElev = apt->getElevation();
     double currElev = 0;
     char buffer[12];
     FGRunway * rwy = apt->getRunwayByIdent(activeRunway);
@@ -1039,7 +1039,7 @@ bool FGAIFlightPlan::createParking(FGAIAircraft * ac, FGAirport * apt,
     pushBackWaypoint(wpt);
 
     wpt =
-        createOnGround(ac, "END", SGGeod::fromDeg(lon, lat), aptElev,
+        createOnGround(ac, "END-Parking", SGGeod::fromDeg(lon, lat), aptElev,
                        vTaxiReduced);
     pushBackWaypoint(wpt);
     return true;