288 const SGGeod& current,
291 const string& fltType)
296 wpt = createInAir(ac,
"Cruise", current, alt, vCruise);
297 if (waypoints.size() == 0) {
298 pushBackWaypoint(wpt);
299 SG_LOG(SG_AI, SG_DEBUG,
"Cruise spawn " << ac->
getCallSign());
301 SG_LOG(SG_AI, SG_DEBUG,
"Cruise start " << ac->
getCallSign());
309 SG_LOG(SG_AI, SG_WARN, ac->
getCallSign() <<
" cruise to" << arr->
getId() << activeRunway <<
" not active");
314 assert( rwy != NULL );
316 double distanceOut = arr->
getDynamics()->getRunwayQueue(rwy->
name())->getApproachDistance();
321 double distanceToRwy = SGGeodesy::distanceM(current, secondaryDescentPoint);
322 if (distanceToRwy>4*distanceOut) {
323 FGAIWaypoint *bodWpt = createInAir(ac,
"BOD", beginDescentPoint, alt, vCruise);
324 pushBackWaypoint(bodWpt);
325 FGAIWaypoint *bod2Wpt = createInAir(ac,
"BOD2", secondaryDescentPoint, alt, vCruise);
326 pushBackWaypoint(bod2Wpt);
329 FGAIWaypoint *bodWpt = createInAir(ac,
"BOD", SGGeodesy::direct(current, ac->
getTrueHeadingDeg(), 10000), alt, vCruise);
330 pushBackWaypoint(bodWpt);
331 FGAIWaypoint *bod2Wpt = createInAir(ac,
"BOD2", SGGeodesy::direct(current, ac->
getTrueHeadingDeg(), 15000), alt, vCruise);
332 pushBackWaypoint(bod2Wpt);
PerformanceData * getPerformance()
FGAISchedule * getTrafficRef()
double getTrueHeadingDeg() const
const std::string & getCallSign() const
const char * getRunwayClassFromTrafficType(const std::string &fltType)
FGAirportDynamicsRef getDynamics() const
FGRunwayRef getRunwayByIdent(const std::string &aIdent) const
bool hasRunwayWithIdent(const std::string &aIdent) const
const std::string & getId() const
virtual const std::string & name() const
Return the name of this positioned.
SGGeod pointOnCenterline(double aOffset) const
Retrieve a position on the extended centerline.