AITraffic fix - forgot two files
This commit is contained in:
parent
4d9439d0c1
commit
8057c50849
2 changed files with 12 additions and 12 deletions
|
@ -127,7 +127,7 @@ void FGAIFlightPlan::createCruise(bool firstFlight, FGAirport *dep,
|
||||||
init_waypoint->flaps_down= false;
|
init_waypoint->flaps_down= false;
|
||||||
init_waypoint->finished = false;
|
init_waypoint->finished = false;
|
||||||
init_waypoint->on_ground = false;
|
init_waypoint->on_ground = false;
|
||||||
waypoints.push_back(init_waypoint);
|
pushBackWaypoint(init_waypoint);
|
||||||
routefile.append("Data/AI/FlightPlans");
|
routefile.append("Data/AI/FlightPlans");
|
||||||
snprintf(buffer, 32, "%s-%s.txt",
|
snprintf(buffer, 32, "%s-%s.txt",
|
||||||
dep->getId().c_str(),
|
dep->getId().c_str(),
|
||||||
|
@ -221,7 +221,7 @@ void FGAIFlightPlan::createCruise(bool firstFlight, FGAirport *dep,
|
||||||
wpt->flaps_down= false;
|
wpt->flaps_down= false;
|
||||||
wpt->finished = false;
|
wpt->finished = false;
|
||||||
wpt->on_ground = false;
|
wpt->on_ground = false;
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(routefile.exists()))
|
if (!(routefile.exists()))
|
||||||
|
@ -274,7 +274,7 @@ void FGAIFlightPlan::createCruise(bool firstFlight, FGAirport *dep,
|
||||||
wpt->flaps_down= false;
|
wpt->flaps_down= false;
|
||||||
wpt->finished = false;
|
wpt->finished = false;
|
||||||
wpt->on_ground = false;
|
wpt->on_ground = false;
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ bool FGAIFlightPlan::createCruise(FGAIAircraft *ac, bool firstFlight, FGAirport
|
||||||
double vCruise = ac->getPerformance()->vCruise();
|
double vCruise = ac->getPerformance()->vCruise();
|
||||||
FGAIWaypoint *wpt;
|
FGAIWaypoint *wpt;
|
||||||
wpt = createInAir(ac, "Cruise", SGGeod::fromDeg(longitude, latitude), alt, vCruise);
|
wpt = createInAir(ac, "Cruise", SGGeod::fromDeg(longitude, latitude), alt, vCruise);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
|
|
||||||
string rwyClass = getRunwayClassFromTrafficType(fltType);
|
string rwyClass = getRunwayClassFromTrafficType(fltType);
|
||||||
double heading = ac->getTrafficRef()->getCourse();
|
double heading = ac->getTrafficRef()->getCourse();
|
||||||
|
@ -306,8 +306,8 @@ bool FGAIFlightPlan::createCruise(FGAIAircraft *ac, bool firstFlight, FGAirport
|
||||||
SGGeod secondaryDescentPoint = rwy->pointOnCenterline(-10000);
|
SGGeod secondaryDescentPoint = rwy->pointOnCenterline(-10000);
|
||||||
|
|
||||||
wpt = createInAir(ac, "BOD", beginDescentPoint, alt, vCruise);
|
wpt = createInAir(ac, "BOD", beginDescentPoint, alt, vCruise);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
wpt = createInAir(ac, "BOD2", secondaryDescentPoint, alt, vCruise);
|
wpt = createInAir(ac, "BOD2", secondaryDescentPoint, alt, vCruise);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
||||||
//FGTaxiNode *tn = dep->getDynamics()->getGroundNetwork()->findNode(node);
|
//FGTaxiNode *tn = dep->getDynamics()->getGroundNetwork()->findNode(node);
|
||||||
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiBackward);
|
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiBackward);
|
||||||
wpt->setRouteIndex(-1);
|
wpt->setRouteIndex(-1);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
}
|
}
|
||||||
//cerr << "Success : GateId = " << gateId << endl;
|
//cerr << "Success : GateId = " << gateId << endl;
|
||||||
SG_LOG(SG_INPUT, SG_WARN, "Warning: Succesfully found a parking for a " <<
|
SG_LOG(SG_INPUT, SG_WARN, "Warning: Succesfully found a parking for a " <<
|
||||||
|
@ -134,7 +134,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
||||||
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiBackward);
|
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiBackward);
|
||||||
|
|
||||||
wpt->setRouteIndex(rte);
|
wpt->setRouteIndex(rte);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
}
|
}
|
||||||
// some special considerations for the last point:
|
// some special considerations for the last point:
|
||||||
waypoints.back()->setName(string("PushBackPoint"));
|
waypoints.back()->setName(string("PushBackPoint"));
|
||||||
|
@ -176,7 +176,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
||||||
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiReduced);
|
FGAIWaypoint *wpt = createOnGround(ac, string(buffer), coord, dep->getElevation(), vTaxiReduced);
|
||||||
|
|
||||||
wpt->setRouteIndex((*ts)->getIndex());
|
wpt->setRouteIndex((*ts)->getIndex());
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
}
|
}
|
||||||
// cerr << "Done " << endl;
|
// cerr << "Done " << endl;
|
||||||
waypoints.back()->setName(string("PushBackPoint"));
|
waypoints.back()->setName(string("PushBackPoint"));
|
||||||
|
@ -220,7 +220,7 @@ void FGAIFlightPlan::createPushBackFallBack(FGAIAircraft *ac, bool firstFlight,
|
||||||
SGGeod coord = coord.fromDeg(lon, lat);
|
SGGeod coord = coord.fromDeg(lon, lat);
|
||||||
FGAIWaypoint *wpt = createOnGround(ac, string("park"), coord, dep->getElevation(), vTaxiBackward);
|
FGAIWaypoint *wpt = createOnGround(ac, string("park"), coord, dep->getElevation(), vTaxiBackward);
|
||||||
|
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
|
|
||||||
geo_direct_wgs_84 ( 0, lat, lon, heading,
|
geo_direct_wgs_84 ( 0, lat, lon, heading,
|
||||||
10,
|
10,
|
||||||
|
@ -228,13 +228,13 @@ void FGAIFlightPlan::createPushBackFallBack(FGAIAircraft *ac, bool firstFlight,
|
||||||
coord = coord.fromDeg(lon2, lat2);
|
coord = coord.fromDeg(lon2, lat2);
|
||||||
wpt = createOnGround(ac, string("park2"), coord, dep->getElevation(), vTaxiBackward);
|
wpt = createOnGround(ac, string("park2"), coord, dep->getElevation(), vTaxiBackward);
|
||||||
|
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
|
|
||||||
geo_direct_wgs_84 ( 0, lat, lon, heading,
|
geo_direct_wgs_84 ( 0, lat, lon, heading,
|
||||||
2.2*radius,
|
2.2*radius,
|
||||||
&lat2, &lon2, &az2 );
|
&lat2, &lon2, &az2 );
|
||||||
coord = coord.fromDeg(lon2, lat2);
|
coord = coord.fromDeg(lon2, lat2);
|
||||||
wpt = createOnGround(ac, string("taxiStart"), coord, dep->getElevation(), vTaxiReduced);
|
wpt = createOnGround(ac, string("taxiStart"), coord, dep->getElevation(), vTaxiReduced);
|
||||||
waypoints.push_back(wpt);
|
pushBackWaypoint(wpt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue