From: Durk Talsma Date: Sun, 4 Jul 2010 19:00:36 +0000 (+0200) Subject: Whoops, forgot to add this file. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74549784b48a3258a7d46148b4b2fcf04acfcd9c;p=flightgear.git Whoops, forgot to add this file. --- diff --git a/src/AIModel/AIFlightPlan.cxx b/src/AIModel/AIFlightPlan.cxx index 381f9e944..1ad358e0e 100644 --- a/src/AIModel/AIFlightPlan.cxx +++ b/src/AIModel/AIFlightPlan.cxx @@ -419,9 +419,11 @@ void FGAIFlightPlan::setLeadDistance(double speed, double bearing, //lead_distance = turn_radius * sin(leadInAngle * SG_DEGREES_TO_RADIANS); lead_distance = turn_radius * tan((leadInAngle * SG_DEGREES_TO_RADIANS)/2); - // if ((errno == EDOM) || (errno == ERANGE) || lead_distance < 1.0) - // { - // } + if (lead_distance > (3*turn_radius)) { + // cerr << "Warning: Lead-in distance is large. Inbound = " << inbound + // << ". Outbound = " << outbound << ". Lead in angle = " << leadInAngle << ". Turn radius = " << turn_radius << endl; + lead_distance = 3 * turn_radius; + } } void FGAIFlightPlan::setLeadDistance(double distance_ft){