X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2Ftower.cxx;h=d44e33018b857cad21a50a9060aa18b8d5929b1c;hb=7aba4333a261df723fcbe9eaf86c16af89372595;hp=d1886c3389691a8ca6226f9df68ab6db253d115b;hpb=8933486a564f84d4a64008dca2a800396a6fc684;p=flightgear.git diff --git a/src/ATCDCL/tower.cxx b/src/ATCDCL/tower.cxx index d1886c338..d44e33018 100644 --- a/src/ATCDCL/tower.cxx +++ b/src/ATCDCL/tower.cxx @@ -55,6 +55,8 @@ using std::cout; TowerPlaneRec::TowerPlaneRec() : planePtr(NULL), + eta(0), + dist_out(0), clearedToLand(false), clearedToLineUp(false), clearedToTakeOff(false), @@ -85,6 +87,8 @@ TowerPlaneRec::TowerPlaneRec() : TowerPlaneRec::TowerPlaneRec(const PlaneRec& p) : planePtr(NULL), + eta(0), + dist_out(0), clearedToLand(false), clearedToLineUp(false), clearedToTakeOff(false), @@ -115,6 +119,8 @@ TowerPlaneRec::TowerPlaneRec(const PlaneRec& p) : TowerPlaneRec::TowerPlaneRec(const SGGeod& pt) : planePtr(NULL), + eta(0), + dist_out(0), clearedToLand(false), clearedToLineUp(false), clearedToTakeOff(false), @@ -146,6 +152,8 @@ TowerPlaneRec::TowerPlaneRec(const SGGeod& pt) : TowerPlaneRec::TowerPlaneRec(const PlaneRec& p, const SGGeod& pt) : planePtr(NULL), + eta(0), + dist_out(0), clearedToLand(false), clearedToLineUp(false), clearedToTakeOff(false), @@ -1497,7 +1505,11 @@ void FGTower::DoRwyDetails() { // Based on the airport-id and wind get the active runway const FGAirport* apt = fgFindAirportID(ident); - assert(apt); + if (!apt) { + SG_LOG(SG_ATC, SG_WARN, "FGTower::DoRwyDetails: unknown ICAO:" << ident); + return; + } + FGRunway* runway = apt->getActiveRunwayForUsage(); activeRwy = runway->ident(); @@ -2125,6 +2137,7 @@ void FGTower::VFRArrivalContact(const string& ID, const LandingType& opt) { t->plane.type = GA_SINGLE; // FIXME - Another assumption! t->plane.callsign = usercall; + CalcETA(t); t->vfrArrivalReported = true; responseReqd = true;