X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIFlightPlanCreate.cxx;h=64df906f5fb51400a9848fd04f6da461a09d8b98;hb=47a7952f893dcb3d0b1372907cac375fedf81703;hp=59e011e6ccaaf9b760467c3aa836b1efb8b20ec6;hpb=a4debec12277fcb2d0ac109f1af33f0491af52a7;p=flightgear.git diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index 59e011e6c..64df906f5 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -286,7 +286,7 @@ void FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft *ac, bool firstFlight, char buffer[10]; snprintf (buffer, 10, "%d", node); FGTaxiNode *tn = apt->getDynamics()->getGroundNetwork()->findNode(node); - waypoint* wpt = createOnGround(ac, buffer, tn->geod(), apt->getElevation(), ac->getPerformance()->vTaxi()); + waypoint* wpt = createOnGround(ac, buffer, tn->getGeod(), apt->getElevation(), ac->getPerformance()->vTaxi()); wpt->routeIndex = route; waypoints.push_back(wpt); } @@ -358,7 +358,7 @@ void FGAIFlightPlan::createLandingTaxi(FGAIAircraft *ac, FGAirport *apt, char buffer[10]; snprintf (buffer, 10, "%d", node); FGTaxiNode *tn = gn->findNode(node); - waypoint* wpt = createOnGround(ac, buffer, tn->geod(), apt->getElevation(), ac->getPerformance()->vTaxi()); + waypoint* wpt = createOnGround(ac, buffer, tn->getGeod(), apt->getElevation(), ac->getPerformance()->vTaxi()); wpt->routeIndex = route; waypoints.push_back(wpt); } @@ -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(); @@ -529,10 +529,10 @@ void FGAIFlightPlan::createParking(FGAIAircraft *ac, FGAirport *apt, double radi { waypoint* wpt; double aptElev = apt->getElevation(); - double lat, lat2; - double lon, lon2; - double az2; - double heading; + double lat = 0.0, lat2 = 0.0; + double lon = 0.0, lon2 = 0.0; + double az2 = 0.0; + double heading = 0.0; double vTaxi = ac->getPerformance()->vTaxi(); double vTaxiReduced = vTaxi * (2.0/3.0);