]> git.mxchange.org Git - flightgear.git/commitdiff
Remove references to old (unused) airways code
authorJames Turner <zakalawe@mac.com>
Wed, 20 Oct 2010 16:54:16 +0000 (17:54 +0100)
committerJames Turner <zakalawe@mac.com>
Wed, 20 Oct 2010 16:54:16 +0000 (17:54 +0100)
12 files changed:
src/AIModel/AIAircraft.cxx
src/AIModel/AIFlightPlan.hxx
src/AIModel/AIFlightPlanCreate.cxx
src/AIModel/AIFlightPlanCreateCruise.cxx
src/AIModel/AIFlightPlanCreatePushBack.cxx
src/ATC/trafficcontrol.cxx
src/Airports/groundnetwork.cxx
src/Airports/sidstar.hxx
src/Main/fg_init.cxx
src/Main/globals.cxx
src/Main/globals.hxx
src/Navaids/Makefile.am

index f117810c17f447e29884d8e496cbf265e434efd7..a525d7ef1bd427449b8562c9ac25b10fbdd07a53 100644 (file)
@@ -29,6 +29,7 @@
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Airports/dynamics.hxx>
+#include <Airports/simple.hxx>
 
 #include <string>
 #include <math.h>
index 1de5658bdb8eb569a838445491c6b267555c2b5e..fd39683056aa4d42f88a84d768dc37ac0da0e3cf 100644 (file)
 #include <string>
 
 
-#include <Airports/simple.hxx>
-#include <Navaids/awynet.hxx>
-
-#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 <waypoint*> wpt_vector_type;
+  typedef std::vector <waypoint*> 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);
         
index 790de692359dadeda50b42245a8b07ee05d31bc6..a0a396d8fe02ea0874f77432e78b2d4d41911943 100644 (file)
@@ -27,6 +27,7 @@
 #include <simgear/props/props.hxx>
 #include <simgear/props/props_io.hxx>
 
+#include <Airports/simple.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/dynamics.hxx>
 #include "AIAircraft.hxx"
index 269acda945bec5bc919609a8d28f085ac319ec86..1932de9ce3586c640b4842564e6beb2b3fc95be4 100644 (file)
@@ -27,7 +27,7 @@
 #include <iostream>
 #include <simgear/route/waypoint.hxx>
 
-#include <Navaids/awynet.hxx>
+#include <Airports/simple.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/dynamics.hxx>
 
@@ -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,
index d97e30da22eea2b37eef3bc372cc1a72a0386c46..34f21a1fc196b0faabef515b10a6c18e6b4613fe 100644 (file)
@@ -23,6 +23,8 @@
 #endif
 
 #include <simgear/math/sg_geodesy.hxx>
+
+#include <Airports/simple.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/dynamics.hxx>
 
index 53ddf28b5ec394dfdfd65cb83fbe513eccef230e..8079933b167d45a6542518ec292049c112a9f594 100644 (file)
@@ -34,7 +34,7 @@
 #include <Traffic/TrafficMgr.hxx>
 #include <Airports/groundnetwork.hxx>
 #include <Airports/dynamics.hxx>
-
+#include <Airports/simple.hxx>
 
 using std::sort;
 
index 3d96ccf7dd4e4723cfaddb27a8bdbc4a3fe165e6..2fb8127a5f675b4547b05f33b7ac420c29de6a92 100644 (file)
@@ -30,6 +30,7 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/route/waypoint.hxx>
 
+#include <Airports/simple.hxx>
 #include <Airports/dynamics.hxx>
 
 #include <AIModel/AIAircraft.hxx>
index ef388e49bb24bcffd3ffafd0484f5a8c747666f7..ad8d10e94e418c24001cf6fd9e2cb8d566965ad6 100644 (file)
@@ -24,6 +24,7 @@
 #define _SIDSTAR_HXX_
 
 #include <string>
+#include <map>
 
 #include <simgear/misc/sg_path.hxx>
 
 #include "runwayprefs.hxx"
 
 
-using std::string;
-
 class FGAirport;
 
-typedef vector<FGAIFlightPlan*>           FlightPlanVec;
-typedef vector<FGAIFlightPlan*>::iterator FlightPlanVecIterator;
+typedef std::vector<FGAIFlightPlan*>           FlightPlanVec;
+typedef std::vector<FGAIFlightPlan*>::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);
 };
 
 
index 184e5623ab3ad83aff7a1d32079731c4fff5c332..fa2cc45a567e6efec7c57d2362464c4b2249462c 100644 (file)
@@ -58,6 +58,8 @@
 #include <simgear/structure/event_mgr.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sg_dir.hxx>
+#include <simgear/misc/sgstream.hxx>
+
 #include <simgear/misc/interpolator.hxx>
 #include <simgear/scene/material/matlib.hxx>
 #include <simgear/scene/model/particles.hxx>
@@ -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;
index a5eb32563f3729f09a1aab13ec65c28ad775bf81..7fafd0516c891658a85c14bc85e3676396f03b7a 100644 (file)
@@ -45,7 +45,6 @@
 #include <Model/acmodel.hxx>
 #include <Model/modelmgr.hxx>
 #include <MultiPlayer/multiplaymgr.hxx>
-#include <Navaids/awynet.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Navaids/navlist.hxx>
@@ -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;
index 50bd24e679a5c6a756fc67ff8e01e151fc1fe585..097e3acb5ea441eede4909884dd07338cb432fef 100644 (file)
@@ -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.
      */
index 30016afe3ef73e50ce8a2b493b1254b9f68bbf12..93985cacf37d1cd07892e8ce1aa7d6190ab029c5 100644 (file)
@@ -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