From e711b18d2098fc73ae98e48b4caa36a91c91a725 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 15 Oct 2004 20:38:56 +0000 Subject: [PATCH] Make sure taxiways get generated. --- src/Airports/GenAirports/build.cxx | 6 ++++++ src/Airports/GenAirports/runway.hxx | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx index 42ac8ac2..f4becd15 100644 --- a/src/Airports/GenAirports/build.cxx +++ b/src/Airports/GenAirports/build.cxx @@ -217,6 +217,7 @@ static TGPolygon calc_elevations( TGAptSurface &surf, } +#if 0 // DEAD CODE 10/15/2004 CLO // strip trailing spaces static void my_chomp( string& str ) { SG_LOG(SG_GENERAL, SG_DEBUG, "my_chomp()"); @@ -226,6 +227,7 @@ static void my_chomp( string& str ) { SG_LOG(SG_GENERAL, SG_DEBUG, "'" << str.substr( str.length() - 1, 1 ) << "'"); } } +#endif // build a runway @@ -387,6 +389,7 @@ void build_airport( string airport_id, float alt_m, SG_LOG(SG_GENERAL, SG_DEBUG, rwy_str); rwy.rwy_no = token[3]; rwy.really_taxiway = (rwy.rwy_no == "xxx"); + rwy.generated = false; rwy.lat = atof( token[1].c_str() ); apt_lat += rwy.lat; @@ -569,8 +572,10 @@ void build_airport( string airport_id, float alt_m, int largest_idx = -1; double max_size = 0; for ( i = 0; i < (int)taxiways.size(); ++i ) { + SG_LOG( SG_GENERAL, SG_DEBUG, "taxiway i = " << i ); double size = taxiways[i].length * taxiways[i].width; if ( size > max_size && !taxiways[i].generated ) { + SG_LOG( SG_GENERAL, SG_DEBUG, "taxiway max i = " << i ); max_size = size; largest_idx = i; } @@ -583,6 +588,7 @@ void build_airport( string airport_id, float alt_m, &apt_base, &apt_clearing ); taxiways[largest_idx].generated = true; } else { + SG_LOG( SG_GENERAL, SG_DEBUG, "done with taxiways." ); done = true; } } diff --git a/src/Airports/GenAirports/runway.hxx b/src/Airports/GenAirports/runway.hxx index aae1eb10..011e46a7 100644 --- a/src/Airports/GenAirports/runway.hxx +++ b/src/Airports/GenAirports/runway.hxx @@ -62,7 +62,8 @@ struct TGRunway { TGPolygon aim_point; bool really_taxiway; - bool generated;}; + bool generated; +}; typedef vector < TGRunway > runway_list;