1
0
Fork 0

Further tweak the displaced threshold routine for short variants.

Explicitly fixes EDCJ but many more, too
This commit is contained in:
Christian Schmitt 2012-08-12 12:19:07 +02:00
parent 9918956c45
commit 84e88858b1

View file

@ -591,8 +591,15 @@ void Runway::gen_rwy( superpoly_list *rwy_polys,
if ( rwy.threshold[rwhalf] > 0.0 ) {
SG_LOG( SG_GENERAL, SG_DEBUG, "Displaced threshold for RW side " << rwhalf << " is " << rwy.threshold[rwhalf] );
double final_arrow = rwy.threshold[rwhalf];
// If a runway has a displaced threshold we have to make sure
// it is long enough to build all the features
if (rwy.threshold[rwhalf] > 24.0)
{
// reserve 24m for final arrows
double thresh = rwy.threshold[rwhalf] - 24.0;
final_arrow = 24.0;
double thresh = rwy.threshold[rwhalf] - final_arrow;
// number of full center arrows, each 60m long
int count = (int)( thresh / 60.0 );
@ -630,10 +637,11 @@ void Runway::gen_rwy( superpoly_list *rwy_polys,
accum, slivers,
make_shapefiles );
}
}
// final arrows
start1_pct = end1_pct;
end1_pct = start1_pct + ( 24.0 / length );
end1_pct = start1_pct + ( final_arrow / length );
gen_runway_section( runway_half,
start1_pct, end1_pct,
0.0, 1.0,