//
// Written by Curtis Olson, started August 2000.
//
-// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
if (( tmp == "L" || tmp == "R" || tmp == "C" ) || (rwyno.size() == 1)) {
tmp = rwyno;
rwyno = "0" + tmp;
- SG_LOG( SG_GENERAL, SG_INFO, "Standardising rwy number from " << tmp
- << " to " << rwyno );
+ SG_LOG( SG_GENERAL, SG_INFO,
+ "Standardising rwy number from " << tmp << " to " << rwyno );
}
char buf[4];
} else if (rwyno.substr(2,1) == "C") {
buf[2] = 'C';
buf[3] = '\0';
+ } else if (rwyno.substr(2,1) == "T") {
+ buf[2] = 'T';
+ buf[3] = '\0';
} else {
SG_LOG(SG_GENERAL, SG_ALERT, "Unknown runway code "
<< rwyno << " passed to GetReverseRunwayNo(...)");
}
}
- return((string)buf);
+ return(buf);
}
bool FGRunwayList::search( const string& aptid, const string& rwyno,
FGRunway *r )
{
- // standardize input number
+ string revrwyno = "";
string runwayno = rwyno;
- string tmp = runwayno.substr(1, 1);
- if (( tmp == "L" || tmp == "R" || tmp == "C" ) || (runwayno.size() == 1)) {
- tmp = runwayno;
- runwayno = "0" + tmp;
- SG_LOG( SG_GENERAL, SG_INFO,
- "Standardising rwy number from " << tmp << " to " << runwayno );
+ if ( runwayno.length() ) {
+ // standardize input number
+ string tmp = runwayno.substr(1, 1);
+ if (( tmp == "L" || tmp == "R" || tmp == "C" )
+ || (runwayno.size() == 1))
+ {
+ tmp = runwayno;
+ runwayno = "0" + tmp;
+ SG_LOG( SG_GENERAL, SG_INFO, "Standardising rwy number from "
+ << tmp << " to " << runwayno );
+ }
+ revrwyno = GetReverseRunwayNo(runwayno);
}
- string revrwyno = GetReverseRunwayNo(runwayno);
runway_map_iterator pos;
for ( pos = runways.lower_bound( aptid );