rwy._smoothness = smoothness;
rwy._dist_remaining = dist_remaining;
- if ( rwy_no == "xxx" ) {
+ if ( rwy_no[0] == 'x' ) {
rwy._type = "taxiway";
- // don't insert taxiways into the DB for now
} else {
rwy._type = "runway";
- runways.insert(pair<const string, FGRunway>(rwy._id, rwy));
}
+ runways.insert(pair<const string, FGRunway>(rwy._id, rwy));
}
static string GetReverseRunwayNo(string& rwyno) {
// cout << "Original rwyno = " << rwyNo << '\n';
+ // Helipads don't have a seperate number per end
+ if(rwyno.size() && (rwyno[0] == 'H' || rwyno[0] == 'h' || rwyno[0] == 'x')) {
+ return rwyno;
+ }
+
// standardize input number
string tmp = rwyno.substr(1, 1);
if (( tmp == "L" || tmp == "R" || tmp == "C" ) || (rwyno.size() == 1)) {
found_dir = 180.0;
}
- next( &tmp_r );
+ if (!next( &tmp_r ))
+ break;
}
// SG_LOG( SG_GENERAL, SG_INFO, "closest runway = " << r._rwy_no