// Init en-route to destID at point pt.
// TODO - no idea what to do if pt is above planes ceiling due mountains!!
-bool FGAIGAVFRTraffic::Init(Point3D pt, string destID, const string& callsign) {
+bool FGAIGAVFRTraffic::Init(const Point3D& pt, const string& destID, const string& callsign) {
FGAILocalTraffic::Init(callsign, destID, EN_ROUTE);
// TODO FIXME - to get up and running we're going to ignore elev and get FGAIMgr to
// pass in known good values for the test location. Need to fix this!!! (or at least canonically decide who has responsibility for setting elev).
}
// Init at srcID to fly to destID
-bool FGAIGAVFRTraffic::Init(string srcID, string destID, const string& callsign, OperatingState state) {
+bool FGAIGAVFRTraffic::Init(const string& srcID, const string& destID, const string& callsign, OperatingState state) {
_enroute = false;
FGAILocalTraffic::Init(callsign, srcID, PARKED);
return(true);
_clearedDownwindEntry = true;
break;
default:
+ SG_LOG(SG_ATC, SG_WARN, "FGAIGAVFRTraffic::RegisterTransmission(...) called with unknown code " << code);
+ FGAILocalTraffic::RegisterTransmission(code);
break;
}
}
// 12 - report base
// 13 - report final
// 14 - Contact Tower for VFR arrival
+ // 99 - Remove self
if(code < 14) {
FGAILocalTraffic::ProcessCallback(code);
} else if(code == 14) {
tower->VFRArrivalContact(plane, this, FULL_STOP);
}
// TODO else possibly announce arrival intentions at uncontrolled airport?
+ } else if(code == 99) {
+ // Might handle this different in future - hence separated from the other codes to pass to AILocalTraffic.
+ FGAILocalTraffic::ProcessCallback(code);
}
}