//cout << "GetRwyDetails called" << endl;
const FGAirport* apt = fgFindAirportID(ident);
- assert(apt);
+ if (!apt) {
+ SG_LOG(SG_ATC, SG_WARN, "FGGround::DoRwyDetails: unknown ICAO:" << ident);
+ return;
+ }
+
FGRunway* runway = apt->getActiveRunwayForUsage();
activeRwy = runway->ident();
}
// move to the +l end/center of the runway
//cout << "Runway center is at " << runway._lon << ", " << runway._lat << '\n';
- double tshlon, tshlat, tshr;
- double tolon, tolat, tor;
+ double tshlon = 0.0, tshlat = 0.0, tshr = 0.0;
+ double tolon = 0.0, tolat = 0.0, tor = 0.0;
rwy.length = runway->lengthM();
geo_direct_wgs_84 ( aptElev, runway->latitude(), runway->longitude(), other_way,
rwy.length / 2.0 - 25.0, &tshlat, &tshlon, &tshr );