init_waypoint->flaps_down= false;
init_waypoint->finished = false;
init_waypoint->on_ground = false;
- waypoints.push_back(init_waypoint);
+ pushBackWaypoint(init_waypoint);
routefile.append("Data/AI/FlightPlans");
snprintf(buffer, 32, "%s-%s.txt",
dep->getId().c_str(),
wpt->flaps_down= false;
wpt->finished = false;
wpt->on_ground = false;
- waypoints.push_back(wpt);
+ pushBackWaypoint(wpt);
}
if (!(routefile.exists()))
wpt->flaps_down= false;
wpt->finished = false;
wpt->on_ground = false;
- waypoints.push_back(wpt);
+ pushBackWaypoint(wpt);
}
*/
double alt, const string& fltType)
{
double vCruise = ac->getPerformance()->vCruise();
- waypoint *wpt;
+ FGAIWaypoint *wpt;
wpt = createInAir(ac, "Cruise", SGGeod::fromDeg(longitude, latitude), alt, vCruise);
- waypoints.push_back(wpt);
+ pushBackWaypoint(wpt);
string rwyClass = getRunwayClassFromTrafficType(fltType);
double heading = ac->getTrafficRef()->getCourse();
arr->getDynamics()->getActiveRunway(rwyClass, 2, activeRunway, heading);
- rwy = arr->getRunwayByIdent(activeRunway);
+ FGRunway* rwy = arr->getRunwayByIdent(activeRunway);
+ assert( rwy != NULL );
// begin descent 110km out
SGGeod beginDescentPoint = rwy->pointOnCenterline(0);
SGGeod secondaryDescentPoint = rwy->pointOnCenterline(-10000);
wpt = createInAir(ac, "BOD", beginDescentPoint, alt, vCruise);
- waypoints.push_back(wpt);
+ pushBackWaypoint(wpt);
wpt = createInAir(ac, "BOD2", secondaryDescentPoint, alt, vCruise);
- waypoints.push_back(wpt);
+ pushBackWaypoint(wpt);
+ return true;
}