]> git.mxchange.org Git - flightgear.git/commitdiff
Moved the RunwayDetails struct definition out of tower.hxx to ATC.hxx
authordaveluff <daveluff>
Fri, 28 Mar 2003 15:24:02 +0000 (15:24 +0000)
committerdaveluff <daveluff>
Fri, 28 Mar 2003 15:24:02 +0000 (15:24 +0000)
src/ATC/ATC.hxx
src/ATC/tower.cxx
src/ATC/tower.hxx

index cc952f4be1ab62f2144a6b56fca223cc1093abf7..be3d4ccb764656df7933383df7a9b58e9a64ecbc 100644 (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 {
index 0eb98c79a979375f4271a2f6017409702e666559..e55107968b65f02a143a276e17b5efa7938958b2 100644 (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
index 25e0ab91a5e7644925926e10f8b3b540eaa30dba..48f1c4fd548045f102acba52bb5a986be2af7601 100644 (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; }