Tweak size of grass area surrounding taxiways.
This commit is contained in:
parent
19d9392863
commit
f9a8370433
3 changed files with 68 additions and 9 deletions
|
@ -1707,7 +1707,12 @@ void build_runway( const FGRunway& rwy_info,
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
FGPolygon base = gen_runway_area( rwy_info, 1.05, 1.5 );
|
||||
FGPolygon base;
|
||||
if ( rwy_info.really_taxiway ) {
|
||||
base = gen_runway_area_w_expand( rwy_info, 10, 10 );
|
||||
} else {
|
||||
base = gen_runway_area_w_scale( rwy_info, 1.05, 1.5 );
|
||||
}
|
||||
|
||||
// add base to apt_base
|
||||
*apt_base = polygon_union( base, *apt_base );
|
||||
|
|
|
@ -113,10 +113,11 @@ FGPolygon gen_area(Point3D origin, double angle, const FGPolygon& cart_list) {
|
|||
}
|
||||
|
||||
|
||||
// generate an area for a runway
|
||||
FGPolygon gen_runway_area( const FGRunway& runway,
|
||||
double len_scale,
|
||||
double width_scale ) {
|
||||
// generate an area for a runway with expantion specified as a scale
|
||||
// factor (return result points in degrees)
|
||||
FGPolygon gen_runway_area_w_scale( const FGRunway& runway,
|
||||
double len_scale,
|
||||
double width_scale ) {
|
||||
|
||||
FGPolygon result_list;
|
||||
FGPolygon tmp_list;
|
||||
|
@ -157,6 +158,51 @@ FGPolygon gen_runway_area( const FGRunway& runway,
|
|||
}
|
||||
|
||||
|
||||
// generate an area for a runway with expansion specified in meters
|
||||
// (return result points in degrees)
|
||||
FGPolygon gen_runway_area_w_expand( const FGRunway& runway,
|
||||
double len_expand,
|
||||
double wid_expand ) {
|
||||
|
||||
FGPolygon result_list;
|
||||
FGPolygon tmp_list;
|
||||
|
||||
double l, w;
|
||||
|
||||
/*
|
||||
printf("runway: lon = %.2f lat = %.2f hdg = %.2f len = %.2f width = %.2f\n",
|
||||
lon, lat, heading, length, width);
|
||||
*/
|
||||
|
||||
Point3D origin(runway.lon, runway.lat, 0);
|
||||
l = runway.length * SG_FEET_TO_METER / 2.0 + len_expand;
|
||||
w = runway.width * SG_FEET_TO_METER / 2.0 + wid_expand;
|
||||
|
||||
// generate untransformed runway area vertices
|
||||
tmp_list.add_node( 0, Point3D( l, w, 0 ) );
|
||||
tmp_list.add_node( 0, Point3D( l, -w, 0 ) );
|
||||
tmp_list.add_node( 0, Point3D( -l, -w, 0 ) );
|
||||
tmp_list.add_node( 0, Point3D( -l, w, 0 ) );
|
||||
|
||||
// display points
|
||||
// cout << "Untransformed, unrotated runway" << endl;
|
||||
// for ( int i = 0; i < tmp_list.contour_size( 0 ); ++i ) {
|
||||
// cout << " " << tmp_list.get_pt(0, i) << endl;
|
||||
// }
|
||||
|
||||
// rotate, transform, and convert points to lon, lat in degrees
|
||||
result_list = gen_area(origin, runway.heading * SGD_DEGREES_TO_RADIANS, tmp_list);
|
||||
|
||||
// display points
|
||||
// cout << "Results in radians." << endl;
|
||||
// for ( int i = 0; i < result_list.contour_size( 0 ); ++i ) {
|
||||
// cout << " " << result_list.get_pt(0, i) << endl;
|
||||
// }
|
||||
|
||||
return result_list;
|
||||
}
|
||||
|
||||
|
||||
// generate an area for a runway and include midpoints
|
||||
FGPolygon gen_runway_w_mid( const FGRunway& runway,
|
||||
double len_scale,
|
||||
|
|
|
@ -67,10 +67,18 @@ typedef runway_list::iterator runway_list_iterator;
|
|||
typedef runway_list::const_iterator const_runway_list_iterator;
|
||||
|
||||
|
||||
// generate an area for a runway (return result points in degrees)
|
||||
FGPolygon gen_runway_area( const FGRunway& runway,
|
||||
double len_scale = 1.0,
|
||||
double width_scale = 1.0 );
|
||||
// generate an area for a runway with expantion specified as a scale
|
||||
// factor (return result points in degrees)
|
||||
FGPolygon gen_runway_area_w_scale( const FGRunway& runway,
|
||||
double len_scale = 1.0,
|
||||
double width_scale = 1.0 );
|
||||
|
||||
// generate an area for a runway with expansion specified in meters
|
||||
// (return result points in degrees)
|
||||
FGPolygon gen_runway_area_w_expand( const FGRunway& runway,
|
||||
double len_expand = 0.0,
|
||||
double wid_expand = 0.0 );
|
||||
|
||||
|
||||
// generate an area for half a runway
|
||||
FGPolygon gen_runway_w_mid( const FGRunway& runway,
|
||||
|
|
Loading…
Add table
Reference in a new issue