1
0
Fork 0

Moved the RunwayDetails struct definition out of tower.hxx to ATC.hxx

This commit is contained in:
daveluff 2003-03-28 15:24:02 +00:00
parent d936531600
commit b19e54c78a
3 changed files with 12 additions and 13 deletions

View file

@ -83,6 +83,16 @@ struct ATCData {
string name;
};
// perhaps we could use an FGRunway instead of this
struct RunwayDetails {
Point3D threshold_pos;
Point3D end1ortho; // ortho projection end1 (the threshold ATM)
Point3D end2ortho; // ortho projection end2 (the take off end in the current hardwired scheme)
double hdg; // true runway heading
double length; // In *METERS*
string rwyID;
};
ostream& operator << (ostream& os, atc_type atc);
class FGATC {

View file

@ -336,6 +336,7 @@ void FGTower::DoRwyDetails() {
bool rwyGood = runways.search(ident, int(hdg), &runway);
if(rwyGood) {
activeRwy = runway.rwy_no;
rwy.rwyID = runway.rwy_no;
SG_LOG(SG_ATC, SG_INFO, "Active runway for airport " << ident << " is " << activeRwy);
// Get the threshold position

View file

@ -62,18 +62,6 @@ enum TwrPatternLeg {
TWR_UNKNOWN
};
// perhaps we could use an FGRunway instead of this
struct RunwayDetails {
Point3D threshold_pos;
Point3D end1ortho; // ortho projection end1 (the threshold ATM)
Point3D end2ortho; // ortho projection end2 (the take off end in the current hardwired scheme)
//double mag_hdg;
//double mag_var;
double hdg; // true runway heading
double length; // In *METERS*
string rwyID;
};
// Structure for holding details of a plane under tower control.
// Not fixed yet - may include more stuff later.
class TowerPlaneRec {
@ -148,7 +136,7 @@ public:
// Public interface to the active runway - this will get more complex
// in the future and consider multi-runway use, airplane weight etc.
inline string GetActiveRunway() { return activeRwy; }
inline RunwayDetails* GetActiveRunwayDetails() { return &rwy; }
inline RunwayDetails GetActiveRunwayDetails() { return rwy; }
inline void SetDisplay() { display = true; }
inline void SetNoDisplay() { display = false; }