Return landing type
This commit is contained in:
parent
98a752d9e7
commit
c0137d93af
2 changed files with 16 additions and 1 deletions
|
@ -139,6 +139,7 @@ void FGAILocalTraffic::GetRwyDetails() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
There are two possible scenarios during initialisation:
|
There are two possible scenarios during initialisation:
|
||||||
The first is that the user is flying towards the airport, and hence the traffic
|
The first is that the user is flying towards the airport, and hence the traffic
|
||||||
|
@ -273,6 +274,17 @@ bool FGAILocalTraffic::Init(string ICAO, OperatingState initialState, PatternLeg
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Return what type of landing we're doing on this circuit
|
||||||
|
LandingType FGAILocalTraffic::GetLandingOption() {
|
||||||
|
if(circuitsToFly) {
|
||||||
|
return(touchAndGo ? TOUCH_AND_GO : STOP_AND_GO);
|
||||||
|
} else {
|
||||||
|
return(FULL_STOP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Commands to do something from higher level logic
|
// Commands to do something from higher level logic
|
||||||
void FGAILocalTraffic::FlyCircuits(int numCircuits, bool tag) {
|
void FGAILocalTraffic::FlyCircuits(int numCircuits, bool tag) {
|
||||||
//cout << "FlyCircuits called" << endl;
|
//cout << "FlyCircuits called" << endl;
|
||||||
|
@ -350,7 +362,7 @@ void FGAILocalTraffic::FlyCircuits(int numCircuits, bool tag) {
|
||||||
// Run the internal calculations
|
// Run the internal calculations
|
||||||
void FGAILocalTraffic::Update(double dt) {
|
void FGAILocalTraffic::Update(double dt) {
|
||||||
//cout << "A" << flush;
|
//cout << "A" << flush;
|
||||||
double responseTime = 10.0; // seconds - this should get more sophisticated at some point
|
//double responseTime = 10.0; // seconds - this should get more sophisticated at some point
|
||||||
responseCounter += dt;
|
responseCounter += dt;
|
||||||
if((contactTower) && (responseCounter >= 8.0)) {
|
if((contactTower) && (responseCounter >= 8.0)) {
|
||||||
// Acknowledge request before changing frequency so it gets rendered if the user is on the same freq
|
// Acknowledge request before changing frequency so it gets rendered if the user is on the same freq
|
||||||
|
|
|
@ -70,6 +70,9 @@ public:
|
||||||
// Go out and practice circuits
|
// Go out and practice circuits
|
||||||
void FlyCircuits(int numCircuits, bool tag);
|
void FlyCircuits(int numCircuits, bool tag);
|
||||||
|
|
||||||
|
// Return what type of landing we're doing on this circuit
|
||||||
|
LandingType GetLandingOption();
|
||||||
|
|
||||||
// TODO - this will get more complex and moved into the main class
|
// TODO - this will get more complex and moved into the main class
|
||||||
// body eventually since the position approved to taxi to will have
|
// body eventually since the position approved to taxi to will have
|
||||||
// to be passed.
|
// to be passed.
|
||||||
|
|
Loading…
Add table
Reference in a new issue