From b19e54c78a47c0c31c2daf19e3c69371aacbc9e4 Mon Sep 17 00:00:00 2001 From: daveluff Date: Fri, 28 Mar 2003 15:24:02 +0000 Subject: [PATCH] Moved the RunwayDetails struct definition out of tower.hxx to ATC.hxx --- src/ATC/ATC.hxx | 10 ++++++++++ src/ATC/tower.cxx | 1 + src/ATC/tower.hxx | 14 +------------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/ATC/ATC.hxx b/src/ATC/ATC.hxx index cc952f4be..be3d4ccb7 100644 --- a/src/ATC/ATC.hxx +++ b/src/ATC/ATC.hxx @@ -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 { diff --git a/src/ATC/tower.cxx b/src/ATC/tower.cxx index 0eb98c79a..e55107968 100644 --- a/src/ATC/tower.cxx +++ b/src/ATC/tower.cxx @@ -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 diff --git a/src/ATC/tower.hxx b/src/ATC/tower.hxx index 25e0ab91a..48f1c4fd5 100644 --- a/src/ATC/tower.hxx +++ b/src/ATC/tower.hxx @@ -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; } -- 2.39.5