Make sure taxiways get generated.
This commit is contained in:
parent
27cfc32e4e
commit
e711b18d20
2 changed files with 8 additions and 1 deletions
|
@ -217,6 +217,7 @@ static TGPolygon calc_elevations( TGAptSurface &surf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0 // DEAD CODE 10/15/2004 CLO
|
||||||
// strip trailing spaces
|
// strip trailing spaces
|
||||||
static void my_chomp( string& str ) {
|
static void my_chomp( string& str ) {
|
||||||
SG_LOG(SG_GENERAL, SG_DEBUG, "my_chomp()");
|
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 ) << "'");
|
SG_LOG(SG_GENERAL, SG_DEBUG, "'" << str.substr( str.length() - 1, 1 ) << "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// build a runway
|
// build a runway
|
||||||
|
@ -387,6 +389,7 @@ void build_airport( string airport_id, float alt_m,
|
||||||
SG_LOG(SG_GENERAL, SG_DEBUG, rwy_str);
|
SG_LOG(SG_GENERAL, SG_DEBUG, rwy_str);
|
||||||
rwy.rwy_no = token[3];
|
rwy.rwy_no = token[3];
|
||||||
rwy.really_taxiway = (rwy.rwy_no == "xxx");
|
rwy.really_taxiway = (rwy.rwy_no == "xxx");
|
||||||
|
rwy.generated = false;
|
||||||
|
|
||||||
rwy.lat = atof( token[1].c_str() );
|
rwy.lat = atof( token[1].c_str() );
|
||||||
apt_lat += rwy.lat;
|
apt_lat += rwy.lat;
|
||||||
|
@ -569,8 +572,10 @@ void build_airport( string airport_id, float alt_m,
|
||||||
int largest_idx = -1;
|
int largest_idx = -1;
|
||||||
double max_size = 0;
|
double max_size = 0;
|
||||||
for ( i = 0; i < (int)taxiways.size(); ++i ) {
|
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;
|
double size = taxiways[i].length * taxiways[i].width;
|
||||||
if ( size > max_size && !taxiways[i].generated ) {
|
if ( size > max_size && !taxiways[i].generated ) {
|
||||||
|
SG_LOG( SG_GENERAL, SG_DEBUG, "taxiway max i = " << i );
|
||||||
max_size = size;
|
max_size = size;
|
||||||
largest_idx = i;
|
largest_idx = i;
|
||||||
}
|
}
|
||||||
|
@ -583,6 +588,7 @@ void build_airport( string airport_id, float alt_m,
|
||||||
&apt_base, &apt_clearing );
|
&apt_base, &apt_clearing );
|
||||||
taxiways[largest_idx].generated = true;
|
taxiways[largest_idx].generated = true;
|
||||||
} else {
|
} else {
|
||||||
|
SG_LOG( SG_GENERAL, SG_DEBUG, "done with taxiways." );
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,8 @@ struct TGRunway {
|
||||||
TGPolygon aim_point;
|
TGPolygon aim_point;
|
||||||
|
|
||||||
bool really_taxiway;
|
bool really_taxiway;
|
||||||
bool generated;};
|
bool generated;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef vector < TGRunway > runway_list;
|
typedef vector < TGRunway > runway_list;
|
||||||
|
|
Loading…
Reference in a new issue