Quiet down Traffic error logging.
This commit is contained in:
parent
865bb365ed
commit
0e71a9593b
5 changed files with 22 additions and 5 deletions
|
@ -210,7 +210,12 @@ void FGAIFlightPlan::createWaypoints(FGAIAircraft *ac,
|
|||
if (timeDiff >= 2000)
|
||||
leg = 5;
|
||||
*/
|
||||
SG_LOG(SG_AI, SG_INFO, "Route from " << dep->getId() << " to " << arr->getId() << ". Set leg to : " << leg << " " << ac->getTrafficRef()->getCallSign());
|
||||
|
||||
if( sglog().would_log(SG_AI,SG_BULK) ) {
|
||||
SG_LOG(SG_AI, SG_BULK, "Route from " << dep->getId() << " to " << arr->getId() <<
|
||||
". Set leg to : " << leg << " " << ac->getTrafficRef()->getCallSign());
|
||||
}
|
||||
|
||||
wpt_iterator = waypoints.begin();
|
||||
bool dist = 0;
|
||||
isValid = create(ac, dep, arr, leg, alt, speed, lat, lon,
|
||||
|
|
|
@ -219,8 +219,7 @@ bool FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft * ac, bool firstFlight,
|
|||
// If this function is called during initialization,
|
||||
// make sure we obtain a valid gate ID first
|
||||
// and place the model at the location of the gate.
|
||||
if (firstFlight)
|
||||
{
|
||||
if (firstFlight && apt->getDynamics()->hasParkings()) {
|
||||
gate = apt->getDynamics()->getAvailableParking(radius, fltType,
|
||||
acType, airline);
|
||||
if (!gate.isValid()) {
|
||||
|
|
|
@ -66,10 +66,16 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
|
|||
|
||||
// establish the parking position / gate if required
|
||||
if (firstFlight) {
|
||||
// if the airprot has no parking positions defined, don't log
|
||||
// the warning below.
|
||||
if (!dep->getDynamics()->hasParkings()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gate = dep->getDynamics()->getAvailableParking(radius, fltType,
|
||||
aircraftType, airline);
|
||||
if (!gate.isValid()) {
|
||||
SG_LOG(SG_AI, SG_WARN, "Warning: Could not find parking for a " <<
|
||||
SG_LOG(SG_AI, SG_WARN, "Could not find parking for a " <<
|
||||
aircraftType <<
|
||||
" of flight type " << fltType <<
|
||||
" of airline " << airline <<
|
||||
|
|
|
@ -208,6 +208,11 @@ FGParking* FGAirportDynamics::innerGetAvailableParking(double radius, const stri
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool FGAirportDynamics::hasParkings() const
|
||||
{
|
||||
return !groundNetwork->allParkings().empty();
|
||||
}
|
||||
|
||||
ParkingAssignment FGAirportDynamics::getAvailableParking(double radius, const string & flType,
|
||||
const string & acType,
|
||||
const string & airline)
|
||||
|
|
|
@ -133,7 +133,9 @@ public:
|
|||
int action,
|
||||
std::string& runway,
|
||||
double heading );
|
||||
|
||||
|
||||
bool hasParkings() const;
|
||||
|
||||
/**
|
||||
* retrieve an available parking by GateID, or -1 if no suitable
|
||||
* parking location could be found.
|
||||
|
|
Loading…
Add table
Reference in a new issue