From: James Turner Date: Wed, 20 Oct 2010 16:54:16 +0000 (+0100) Subject: Remove references to old (unused) airways code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f5c2c630ebe3599f2b72dc4e0bca2ad427767b80;p=flightgear.git Remove references to old (unused) airways code --- diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index f117810c1..a525d7ef1 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/src/AIModel/AIFlightPlan.hxx b/src/AIModel/AIFlightPlan.hxx index 1de5658bd..fd3968305 100644 --- a/src/AIModel/AIFlightPlan.hxx +++ b/src/AIModel/AIFlightPlan.hxx @@ -24,26 +24,18 @@ #include -#include -#include - -#include "AIBase.hxx" - - - -using std::vector; -using std::string; - class FGTaxiRoute; class FGRunway; class FGAIAircraft; +class FGAirport; +class SGGeod; class FGAIFlightPlan { public: typedef struct { - string name; + std::string name; double latitude; double longitude; double altitude; @@ -56,11 +48,11 @@ public: int routeIndex; // For AI/ATC purposes; double time_sec; double trackLength; // distance from previous waypoint (for AI purposes); - string time; + std::string time; } waypoint; FGAIFlightPlan(); - FGAIFlightPlan(const string& filename); + FGAIFlightPlan(const std::string& filename); FGAIFlightPlan(FGAIAircraft *, const std::string& p, double course, @@ -73,9 +65,9 @@ public: double lat, double lon, double speed, - const string& fltType, - const string& acType, - const string& airline); + const std::string& fltType, + const std::string& acType, + const std::string& airline); ~FGAIFlightPlan(); waypoint* const getPreviousWaypoint( void ) const; @@ -91,18 +83,18 @@ public: double getLeadDistance( void ) const {return lead_distance;} double getBearing(waypoint* previous, waypoint* next) const; double getBearing(double lat, double lon, waypoint* next) const; - double checkTrackLength(string wptName); + double checkTrackLength(std::string wptName); time_t getStartTime() const { return start_time; } time_t getArrivalTime() const { return arrivalTime; } void create(FGAIAircraft *, FGAirport *dep, FGAirport *arr, int leg, double alt, double speed, double lat, double lon, - bool firstLeg, double radius, const string& fltType, const string& aircraftType, const string& airline, double distance); + bool firstLeg, double radius, const std::string& fltType, const std::string& aircraftType, const std::string& airline, double distance); void setLeg(int val) { leg = val;} void setTime(time_t st) { start_time = st; } int getGate() const { return gateId; } double getLeadInAngle() const { return leadInAngle; } - const string& getRunway() const; + const std::string& getRunway() const; void setRepeat(bool r) { repeat = r; } bool getRepeat(void) const { return repeat; } @@ -111,16 +103,16 @@ public: int getRouteIndex(int i); // returns the AI related index of this current routes. FGTaxiRoute *getTaxiRoute() { return taxiRoute; } void deleteTaxiRoute(); - string getRunway() { return activeRunway; } + std::string getRunway() { return activeRunway; } bool isActive(time_t time) {return time >= this->getStartTime();} - void setRunway(string rwy) { activeRunway = rwy; }; - string getRunwayClassFromTrafficType(string fltType); + void setRunway(std::string rwy) { activeRunway = rwy; }; + std::string getRunwayClassFromTrafficType(std::string fltType); void addWaypoint(waypoint* wpt) { waypoints.push_back(wpt); }; - void setName(string n) { name = n; }; - string getName() { return name; }; + void setName(std::string n) { name = n; }; + std::string getName() { return name; }; void setSID(FGAIFlightPlan* fp) { sid = fp;}; FGAIFlightPlan* getSID() { return sid; }; @@ -128,7 +120,7 @@ public: private: FGRunway* rwy; FGAIFlightPlan *sid; - typedef vector wpt_vector_type; + typedef std::vector wpt_vector_type; typedef wpt_vector_type::const_iterator wpt_vector_iterator; @@ -143,26 +135,25 @@ private: time_t arrivalTime; // For AI/ATC purposes. int leg; int gateId, lastNodeVisited; - string activeRunway; - FGAirRoute airRoute; + std::string activeRunway; FGTaxiRoute *taxiRoute; - string name; - - void createPushBack(FGAIAircraft *, bool, FGAirport*, double, double, double, const string&, const string&, const string&); - void createPushBackFallBack(FGAIAircraft *, bool, FGAirport*, double, double, double, const string&, const string&, const string&); - void createTakeOff(FGAIAircraft *, bool, FGAirport *, double, const string&); - void createClimb(FGAIAircraft *, bool, FGAirport *, double, double, const string&); - void createCruise(FGAIAircraft *, bool, FGAirport*, FGAirport*, double, double, double, double, const string&); - void createDescent(FGAIAircraft *, FGAirport *, double latitude, double longitude, double speed, double alt,const string&, double distance); - void createLanding(FGAIAircraft *, FGAirport *, const string&); + std::string name; + + void createPushBack(FGAIAircraft *, bool, FGAirport*, double, double, double, const std::string&, const std::string&, const std::string&); + void createPushBackFallBack(FGAIAircraft *, bool, FGAirport*, double, double, double, const std::string&, const std::string&, const std::string&); + void createTakeOff(FGAIAircraft *, bool, FGAirport *, double, const std::string&); + void createClimb(FGAIAircraft *, bool, FGAirport *, double, double, const std::string&); + void createCruise(FGAIAircraft *, bool, FGAirport*, FGAirport*, double, double, double, double, const std::string&); + void createDescent(FGAIAircraft *, FGAirport *, double latitude, double longitude, double speed, double alt,const std::string&, double distance); + void createLanding(FGAIAircraft *, FGAirport *, const std::string&); void createParking(FGAIAircraft *, FGAirport *, double radius); void deleteWaypoints(); void resetWaypoints(); - void createLandingTaxi(FGAIAircraft *, FGAirport *apt, double radius, const string& fltType, const string& acType, const string& airline); + void createLandingTaxi(FGAIAircraft *, FGAirport *apt, double radius, const std::string& fltType, const std::string& acType, const std::string& airline); void createDefaultLandingTaxi(FGAIAircraft *, FGAirport* aAirport); void createDefaultTakeoffTaxi(FGAIAircraft *, FGAirport* aAirport, FGRunway* aRunway); - void createTakeoffTaxi(FGAIAircraft *, bool firstFlight, FGAirport *apt, double radius, const string& fltType, const string& acType, const string& airline); + void createTakeoffTaxi(FGAIAircraft *, bool firstFlight, FGAirport *apt, double radius, const std::string& fltType, const std::string& acType, const std::string& airline); double getTurnRadius(double, bool); diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index 790de6923..a0a396d8f 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -27,6 +27,7 @@ #include #include +#include #include #include #include "AIAircraft.hxx" diff --git a/src/AIModel/AIFlightPlanCreateCruise.cxx b/src/AIModel/AIFlightPlanCreateCruise.cxx index 269acda94..1932de9ce 100644 --- a/src/AIModel/AIFlightPlanCreateCruise.cxx +++ b/src/AIModel/AIFlightPlanCreateCruise.cxx @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -40,6 +40,7 @@ using std::iostream; +/* void FGAIFlightPlan::evaluateRoutePart(double deplat, double deplon, double arrlat, @@ -97,7 +98,7 @@ void FGAIFlightPlan::evaluateRoutePart(double deplat, } } - +*/ /* void FGAIFlightPlan::createCruise(bool firstFlight, FGAirport *dep, FGAirport *arr, double latitude, diff --git a/src/AIModel/AIFlightPlanCreatePushBack.cxx b/src/AIModel/AIFlightPlanCreatePushBack.cxx index d97e30da2..34f21a1fc 100644 --- a/src/AIModel/AIFlightPlanCreatePushBack.cxx +++ b/src/AIModel/AIFlightPlanCreatePushBack.cxx @@ -23,6 +23,8 @@ #endif #include + +#include #include #include diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index 53ddf28b5..8079933b1 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -34,7 +34,7 @@ #include #include #include - +#include using std::sort; diff --git a/src/Airports/groundnetwork.cxx b/src/Airports/groundnetwork.cxx index 3d96ccf7d..2fb8127a5 100644 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/src/Airports/sidstar.hxx b/src/Airports/sidstar.hxx index ef388e49b..ad8d10e94 100644 --- a/src/Airports/sidstar.hxx +++ b/src/Airports/sidstar.hxx @@ -24,6 +24,7 @@ #define _SIDSTAR_HXX_ #include +#include #include @@ -36,12 +37,10 @@ #include "runwayprefs.hxx" -using std::string; - class FGAirport; -typedef vector FlightPlanVec; -typedef vector::iterator FlightPlanVecIterator; +typedef std::vector FlightPlanVec; +typedef std::vector::iterator FlightPlanVecIterator; typedef std::map < std::string, FlightPlanVec > FlightPlanVecMap; @@ -49,7 +48,7 @@ typedef std::map < std::string, FlightPlanVec > FlightPlanVecMap; class FGSidStar { private: - string id; + std::string id; bool initialized; FlightPlanVecMap data; @@ -57,9 +56,9 @@ class FGSidStar FGSidStar(FGAirport *ap); FGSidStar(const FGSidStar &other); - string getId() { return id; }; + std::string getId() { return id; }; void load(SGPath path); - FGAIFlightPlan *getBest(string activeRunway, double heading); + FGAIFlightPlan *getBest(std::string activeRunway, double heading); }; diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 184e5623a..fa2cc45a5 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -58,6 +58,8 @@ #include #include #include +#include + #include #include #include @@ -1072,16 +1074,6 @@ fgInitNav () fixlist.init( p_fix ); // adds fixes to the DB in positioned.cxx SG_LOG(SG_GENERAL, SG_INFO, " Airways"); - #if 0 - SGPath p_awy( globals->get_fg_root() ); - p_awy.append( "Navaids/awy.dat" ); - FGAirwayNetwork *awyNet = new FGAirwayNetwork; - //cerr << "Loading Airways" << endl; - awyNet->load (p_awy ); - awyNet->init(); - //cerr << "initializing airways" << endl; - globals->set_airwaynet( awyNet ); -#endif flightgear::Airway::load(); return true; diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index a5eb32563..7fafd0516 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -149,9 +148,7 @@ FGGlobals::FGGlobals() : dmelist( NULL ), tacanlist( NULL ), carrierlist( NULL ), - channellist( NULL ), - airwaynet( NULL ) - + channellist( NULL ) { simgear::ResourceManager::instance()->addProvider(new AircraftResourceProvider()); } @@ -199,7 +196,6 @@ FGGlobals::~FGGlobals() delete tacanlist; delete carrierlist; delete channellist; - delete airwaynet; soundmgr->unbind(); delete soundmgr; diff --git a/src/Main/globals.hxx b/src/Main/globals.hxx index 50bd24e67..097e3acb5 100644 --- a/src/Main/globals.hxx +++ b/src/Main/globals.hxx @@ -60,7 +60,6 @@ class FGAircraftModel; class FGControls; class FGFlightPlanDispatcher; class FGNavList; -class FGAirwayNetwork; class FGTACANList; class FGModelMgr; class FGRouteMgr; @@ -171,7 +170,6 @@ private: FGNavList *tacanlist; FGNavList *carrierlist; FGTACANList *channellist; - FGAirwayNetwork *airwaynet; /// roots of Aircraft trees string_list fg_aircraft_dirs; @@ -322,10 +320,6 @@ public: inline FGTACANList *get_channellist() const { return channellist; } inline void set_channellist( FGTACANList *c ) { channellist = c; } - inline FGAirwayNetwork *get_airwaynet() const { return airwaynet; } - inline void set_airwaynet( FGAirwayNetwork *a ) { airwaynet = a; } - - /** * Save the current state as the initial state. */ diff --git a/src/Navaids/Makefile.am b/src/Navaids/Makefile.am index 30016afe3..93985cacf 100644 --- a/src/Navaids/Makefile.am +++ b/src/Navaids/Makefile.am @@ -13,8 +13,7 @@ libNavaids_a_SOURCES = \ airways.hxx airways.cxx \ route.hxx route.cxx \ waypoint.hxx waypoint.cxx \ - procedure.hxx procedure.cxx \ - awynet.cxx awynet.hxx + procedure.hxx procedure.cxx # # testnavs_SOURCES = testnavs.cxx