diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx index 8ac0c6ed..60f76e52 100644 --- a/src/Airports/GenAirports/build.cxx +++ b/src/Airports/GenAirports/build.cxx @@ -337,10 +337,10 @@ static void build_runway( const TGRunway& rwy_info, safe_base = gen_runway_area_w_extend( rwy_info, 0.0, 40.0, 0.0, 0.0, 40.0 ); } else { - base = gen_runway_area_w_extend( rwy_info, 0.0, 20.0, -rwy_info.stopway1, -rwy_info.stopway2, 20.0 ); + base = gen_runway_area_w_extend( rwy_info, 0.0, 20.0, -rwy_info.stopway1* SG_FEET_TO_METER, -rwy_info.stopway2* SG_FEET_TO_METER, 20.0 ); // also clear a safe area around the runway safe_base - = gen_runway_area_w_extend( rwy_info, 0.0, 180.0, -rwy_info.stopway2, -rwy_info.stopway2, 50.0 ); + = gen_runway_area_w_extend( rwy_info, 0.0, 180.0, -rwy_info.stopway1* SG_FEET_TO_METER, -rwy_info.stopway2* SG_FEET_TO_METER, 50.0 ); } *apt_clearing = tgPolygonUnion(safe_base, *apt_clearing); diff --git a/src/Airports/GenAirports/rwy_common.cxx b/src/Airports/GenAirports/rwy_common.cxx index f88e76b7..0f26f918 100644 --- a/src/Airports/GenAirports/rwy_common.cxx +++ b/src/Airports/GenAirports/rwy_common.cxx @@ -103,36 +103,61 @@ void gen_runway_stopway( const TGRunway& rwy_info, texparams_list *texparams, TGPolygon* accum ) { const float length = rwy_info.length / 2.0 + 2.0; + double start1_pct = 0.0; + double start2_pct = 0.0; + double end1_pct = 0.0; + double end2_pct = 0.0; + double part_len = 0.0; + + int count=0; + int i=0; + if (rwy_info.stopway1 > 0.0) { /* Generate approach end stopway */ - gen_runway_section( rwy_info, - runway_a, - - rwy_info.stopway1 / length, 0, - 0.0, 1.0, - 0.0, 1.0, 0.0, 1.0, - rwy_info.heading, - prefix, - "tiedown", - rwy_polys, - texparams, - accum); + count = (int) (rwy_info.stopway1 * 2.0/ rwy_info.width); + if(count < 1) count = 1; + part_len = rwy_info.stopway1 / (double) count; + for(i=0;i 0.0) { /* Generate reciprocal end stopway */ - gen_runway_section( rwy_info, - runway_b, - - rwy_info.stopway2 / length, 0, - 0.0, 1.0, - 0.0, 1.0, 0.0, 1.0, - rwy_info.heading + 180.0, - prefix, - "tiedown", - rwy_polys, - texparams, - accum); + count = (int) (rwy_info.stopway2 * 2.0 / rwy_info.width); + if(count < 1) count = 1; + part_len = rwy_info.stopway2 / (double) count; + for(i=0;i