From ea58728f5c546072b7eee7269c77a2e0d5ce6865 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 11 Mar 2003 20:17:57 +0000 Subject: [PATCH] With the latest version of the libnurbs++, the include file extension has changed from .hh -> .h Generate a complete enclosing area around the airport including taxiways, not just runways. --- src/Airports/GenAirports/apt_surface.cxx | 4 ++-- src/Airports/GenAirports/apt_surface.hxx | 2 +- src/Airports/GenAirports/build.cxx | 18 +++++++++--------- src/Airports/GenAirports/process.pl | 4 ++-- src/Airports/GenAirports/testnurbs.cxx | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Airports/GenAirports/apt_surface.cxx b/src/Airports/GenAirports/apt_surface.cxx index 9059a82a..8abd3854 100644 --- a/src/Airports/GenAirports/apt_surface.cxx +++ b/src/Airports/GenAirports/apt_surface.cxx @@ -23,8 +23,8 @@ // -#include -#include +#include +#include #include #include diff --git a/src/Airports/GenAirports/apt_surface.hxx b/src/Airports/GenAirports/apt_surface.hxx index 993305bc..bf0f95f2 100644 --- a/src/Airports/GenAirports/apt_surface.hxx +++ b/src/Airports/GenAirports/apt_surface.hxx @@ -29,7 +29,7 @@ #include -#include +#include #include diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx index ce16ea67..ec25b2ad 100644 --- a/src/Airports/GenAirports/build.cxx +++ b/src/Airports/GenAirports/build.cxx @@ -370,16 +370,17 @@ static void build_runway( const TGRunway& rwy_info, throw sg_exception("Unknown runway code in build.cxx:build_airport()"); } - TGPolygon base; + TGPolygon base, safe_base; if ( rwy_info.really_taxiway ) { base = gen_runway_area_w_extend( rwy_info, 10, 10 ); + // also clear a safe area around the taxiway + safe_base = gen_runway_area_w_extend( rwy_info, 40, 40 ); } else { base = gen_runway_area_w_extend( rwy_info, 20, 20 ); - // also clear a safe area around the runway - TGPolygon safe_base = gen_runway_area_w_extend( rwy_info, 300, 120 ); - *apt_clearing = polygon_union(safe_base, *apt_clearing); + safe_base = gen_runway_area_w_extend( rwy_info, 300, 120 ); } + *apt_clearing = polygon_union(safe_base, *apt_clearing); // add base to apt_base *apt_base = polygon_union( base, *apt_base ); @@ -985,10 +986,10 @@ void build_airport( string airport_raw, float alt_m, // Extend the area a bit so we don't have wierd things on the edges double dlon = max_deg.lon() - min_deg.lon(); double dlat = max_deg.lat() - min_deg.lat(); - min_deg.setlon( min_deg.lon() - 0.5 * dlon ); - max_deg.setlon( max_deg.lon() + 0.5 * dlon ); - min_deg.setlat( min_deg.lat() - 0.5 * dlat ); - max_deg.setlat( max_deg.lat() + 0.5 * dlat ); + min_deg.setlon( min_deg.lon() - 0.25 * dlon ); + max_deg.setlon( max_deg.lon() + 0.25 * dlon ); + min_deg.setlat( min_deg.lat() - 0.25 * dlat ); + max_deg.setlat( max_deg.lat() + 0.25 * dlat ); TGAptSurface apt_surf( root, min_deg, max_deg ); cout << "Surface created" << endl; @@ -1220,7 +1221,6 @@ void build_airport( string airport_raw, float alt_m, obj.set_fan_materials( fan_materials ); bool result; - /* result = obj.write_ascii( objpath, name, b ); */ result = obj.write_bin( objpath, name, b ); if ( !result ) { throw sg_exception("error writing file. :-("); diff --git a/src/Airports/GenAirports/process.pl b/src/Airports/GenAirports/process.pl index 713f1893..f26f5b7e 100755 --- a/src/Airports/GenAirports/process.pl +++ b/src/Airports/GenAirports/process.pl @@ -23,10 +23,10 @@ # Edit the following values to set up your preferences: -$workdir = "/stage/fgfs01/curt/Work"; +$workdir = "/stage/fgfs04/curt/Work"; $inputfile = "./default.apt"; $binary = "./genapts"; -$startid = "EGLL"; +$startid = ""; # end of user configurable section diff --git a/src/Airports/GenAirports/testnurbs.cxx b/src/Airports/GenAirports/testnurbs.cxx index 4b9a8b9e..c0056887 100644 --- a/src/Airports/GenAirports/testnurbs.cxx +++ b/src/Airports/GenAirports/testnurbs.cxx @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include int main(){