if (AIManagerRef) {
// Check if this aircraft has been released.
- FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("Traffic Manager");
+ FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("traffic-manager");
if (tmgr->isReleased(AIManagerRef)) {
AIManagerRef = 0;
} else {
aircraft->setLatitude(position.getLatitudeDeg());
aircraft->setLongitude(position.getLongitudeDeg());
aircraft->setAltitude(flight->getCruiseAlt()*100); // convert from FL to feet
- aircraft->setSpeed(speedKnots);
+ aircraft->setSpeed(0);
aircraft->setBank(0);
courseToDest = SGGeodesy::courseDeg(position, arr->geod());
airline);
if (fp->isValidPlan()) {
aircraft->SetFlightPlan(fp);
- FGAIManager* aimgr = (FGAIManager *) globals-> get_subsystem("ai_model");
+ FGAIManager* aimgr = (FGAIManager *) globals-> get_subsystem("ai-model");
aimgr->attach(aircraft);
AIManagerRef = aircraft->getID();
return true;
if (!flight) {
break;
}
- //if (startingPort.empty()) {
- // startingPort = flight->getDepartureAirport()->getId();
- //}
currentDestination = flight->getArrivalAirport()->getId();
//cerr << "Current destination " << currentDestination << endl;
if (!initialized) {
string departurePort = flight->getDepartureAirport()->getId();
- //cerr << "Scheduled " << registration << " " << score << " for Flight "
- // << flight-> getCallSign() << " from " << departurePort << " to " << currentDestination << endl;
if (userPort == departurePort) {
lastRun = 1;
hits++;
{
time_t now = time(NULL) + fgGetLong("/sim/time/warp");
- FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("Traffic Manager");
+ FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("traffic-manager");
FGScheduledFlightVecIterator fltBegin, fltEnd;
fltBegin = tmgr->getFirstFlight(req);
fltEnd = tmgr->getLastFlight(req);