Whoops, forgot to add this file.
This commit is contained in:
parent
b78bf2e9e6
commit
74549784b4
1 changed files with 5 additions and 3 deletions
|
@ -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 * sin(leadInAngle * SG_DEGREES_TO_RADIANS);
|
||||||
lead_distance = turn_radius * tan((leadInAngle * SG_DEGREES_TO_RADIANS)/2);
|
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){
|
void FGAIFlightPlan::setLeadDistance(double distance_ft){
|
||||||
|
|
Loading…
Reference in a new issue