Enhancements to AI plane transmissions
This commit is contained in:
parent
2666ce81d9
commit
a28bf4d9ea
1 changed files with 15 additions and 5 deletions
|
@ -340,9 +340,17 @@ void FGAILocalTraffic::Update(double dt) {
|
||||||
//Transmit("DING!");
|
//Transmit("DING!");
|
||||||
// Contact the tower, even if only virtually
|
// Contact the tower, even if only virtually
|
||||||
changeFreq = false;
|
changeFreq = false;
|
||||||
tower->ContactAtHoldShort(plane, this, CIRCUIT);
|
pending_transmission = plane.callsign;
|
||||||
pending_transmission = ""; // Transmit an empty string until we do it properly to activate the ATC response timer mechanism
|
pending_transmission += " at hold short for runway ";
|
||||||
Transmit();
|
pending_transmission += ConvertRwyNumToSpokenString(rwy.rwyID);
|
||||||
|
pending_transmission += " traffic pattern ";
|
||||||
|
if(circuitsToFly) {
|
||||||
|
pending_transmission += ConvertNumToSpokenDigits(circuitsToFly + 1);
|
||||||
|
pending_transmission += " circuits touch and go";
|
||||||
|
} else {
|
||||||
|
pending_transmission += " one circuit to full stop";
|
||||||
|
}
|
||||||
|
Transmit(2);
|
||||||
break;
|
break;
|
||||||
case GROUND:
|
case GROUND:
|
||||||
tuned_station = ground;
|
tuned_station = ground;
|
||||||
|
@ -958,8 +966,7 @@ void FGAILocalTraffic::TransmitPatternPositionReport(void) {
|
||||||
trns += "pattern ";
|
trns += "pattern ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// FIXME - I've hardwired the runway call as well!! (We could work this out from rwy heading and mag deviation)
|
trns += ConvertRwyNumToSpokenString(rwy.rwyID);
|
||||||
trns += ConvertRwyNumToSpokenString(1);
|
|
||||||
|
|
||||||
// And add the airport name again
|
// And add the airport name again
|
||||||
trns += tower->get_name();
|
trns += tower->get_name();
|
||||||
|
@ -972,12 +979,15 @@ void FGAILocalTraffic::TransmitPatternPositionReport(void) {
|
||||||
// TODO - Really should enumerate these coded values.
|
// TODO - Really should enumerate these coded values.
|
||||||
void FGAILocalTraffic::ProcessCallback(int code) {
|
void FGAILocalTraffic::ProcessCallback(int code) {
|
||||||
// 1 - Request Departure from ground
|
// 1 - Request Departure from ground
|
||||||
|
// 2 - Report at hold short
|
||||||
// 10 - report crosswind
|
// 10 - report crosswind
|
||||||
// 11 - report downwind
|
// 11 - report downwind
|
||||||
// 12 - report base
|
// 12 - report base
|
||||||
// 13 - report final
|
// 13 - report final
|
||||||
if(code == 1) {
|
if(code == 1) {
|
||||||
ground->RequestDeparture(plane, this);
|
ground->RequestDeparture(plane, this);
|
||||||
|
} else if(code == 2) {
|
||||||
|
tower->ContactAtHoldShort(plane, this, CIRCUIT);
|
||||||
} else if(code == 11) {
|
} else if(code == 11) {
|
||||||
tower->ReportDownwind(plane.callsign);
|
tower->ReportDownwind(plane.callsign);
|
||||||
} else if(code == 13) {
|
} else if(code == 13) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue